voyent
Messages posted by: xchander  XML
Profile for xchander -> Messages posted by xchander [9]
Author Message
I am using IceFaces 1.6 and Weblogic 9.2 as Application server.
Hi,

Seems I am missing something..

In the below code :

Code:
 <ice:form id="myForm" partialSubmit="true" >
 
 <h:selectOneMenu id="firm" value="AA" 
   immediate="true"
 onchange="submit"
 valueChangeListener="#{cBean.firmSelected}"
 >
 <f:selectItems value="#{cBean.firms}"
 
 </h:selectOneMenu>
 
 </ice:form>
 
 


On Change of dropdown, I get

Error 404--Not found
and in the address bar :
http://localhost:7001/csadmin/iceSubmit('myForm');

Is onchange causing any problem ?
Seems its trying to submit the form..

I just want to change another component value, on change of this dropdown without refreshing the page
Pls help..

thanks

Chander


What ru using in your index.jsp forward

<jsp:forward page="/abc.iface" >

What ever you give here...same should be the <from-view-id > in the navigation rule.

Hi,

The faces-config file is correct, its typo mistake in writing this question. sorry for that.

I tried removing the <from- view-id> all together, but its giving me the same problem.

One thing I noticed is that, after login, it comes to the home.jsp, where the link for test.jsp is there.

But if i do the View source of this page, it still shows the html code for login page.

Any idea why ? Is Specifying .iface in navigation is correct.... I tried with .jsp too but that also failed giving same problem

And why clicking on Back button of browser throws the NullPointerExecption ?









In faces-config.xml , giving the <redirect/> in the navaigation-rules doen't give the Nullpointerexception and all seems to be fine.

Code:
 <navigation-rule>
          <from-view-id>/login.iface</from-view-id>
          <navigation-case>
              <from-outcome>success</from-outcome>
              <to-view-id>/home.iface</to-view-id>
 [b]<redirect />[/b]
          </navigation-case>
      </navigation-rule>


But why to give redirect if such cases when your navigation result is not purely redirect ?

Can anybody explain ...what I am missing here ?

Hi ,
I am using weblogic 9.2, Icefaces 1.6 and jsf1.1 .

I am stuck at a point, when after login , I try to click on any link, it gives me a NullPointerExcpetion at
com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:298)

com.icesoft.faces.context.DOMResponseWriter.endDocument(...
..
.

.
..
.
Even If you refresh (press F5) the page, the same error comes.
When you try to view the HTML Source of the page, it gives you the html of login page.


This is simple command link :

Code:
<h:commandLink id="homelink" action="gotest" >
   <h:outputText value="Home" />
 </h:commandLink>


My web.xml is ..........

Code:
 <?xml version="1.0"?>
 
 <!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">
 
 <web-app>
     <display-name>mu Application</display-name>
  
 
 	<!-- JavaServer Faces -->
     <context-param>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
         <param-value>server</param-value>
     </context-param>
 
     <context-param>
     	<param-name>javax.faces.CONFIG_FILES</param-name>
     	<param-value>/WEB-INF/faces-config.xml</param-value>
     </context-param>
 
     
     <filter>
         <filter-name>SecurityFilter</filter-name>
         <filter-class>mypetstore.view.util.SecurityFilter</filter-class>
     </filter>
     
     <filter-mapping>
         <filter-name>SecurityFilter</filter-name>
         <url-pattern>*.jsf</url-pattern>
     </filter-mapping>   
 
     <listener>
         <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
     </listener>
  
     <!-- Faces Servlet -->
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>
     
         
     <servlet>
 	  <servlet-name>SpringContextServlet</servlet-name>
 	  <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>	  
 	  <load-on-startup>1</load-on-startup>
     </servlet>
 	
     <!-- Faces Servlet Mapping -->
     <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>
 <servlet>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
         <load-on-startup> 1 </load-on-startup>
     </servlet>
 
     <servlet>
         <servlet-name>Blocking Servlet</servlet-name>
         <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
         <load-on-startup> 1 </load-on-startup>
     </servlet>
 
     <!-- extension mapping -->
     <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>*.iface</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>/xmlhttp/*</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
         <servlet-name>Blocking Servlet</servlet-name>
         <url-pattern>/block/*</url-pattern>
     </servlet-mapping>
 
     <session-config>
       <session-timeout>1</session-timeout>
     </session-config>
     
     <!-- Welcome files -->
     <welcome-file-list>
         <welcome-file>index.jsf</welcome-file>
         <welcome-file>index.jsp</welcome-file>
         <welcome-file>index.html</welcome-file>
     </welcome-file-list>
 
 </web-app>
 
 


.............

My faces-config.xml file is :

Code:
<?xml version='1.0' encoding='UTF-8'?>
 
 
 <!DOCTYPE faces-config PUBLIC
   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
 
 
 <faces-config>
     <application>
         <locale-config>
             <default-locale>en</default-locale>
         </locale-config>
                 
     </application>
 
     <navigation-rule>
         <from-view-id>*</from-view-id>
         <navigation-case>
             <from-outcome>gotest</from-outcome>
             <to-view-id>/test.iface</to-view-id>
             <redirect/>
         </navigation-case>
     </navigation-rule>
 
      
 
     <navigation-rule>
         <from-view-id>/login.iface</from-view-id>
         <navigation-case>
             <from-outcome>success</from-outcome>
             <to-view-id>/home.iface</to-view-id>
         </navigation-case>
     </navigation-rule>
 
     
   
 </faces-config>



Seems I am missing something in configuration

Pls help.

thanks








My ice face application is running fine , filtering results based on drop down value .

But when I add the Javacript for drag layer in the body onload event, it gives the error "form is null or not an object" and form fails to submit.

onclick="iceSubmit(form,this,event)
Somehow it is not able to find the form with this script



Below is the javascript I am using :

<body onLoad="MM_dragLayer('boxDrag','',0,0,0,0,true,false,-1,-1,-1,-1,51,17,50,'dropme()',true,'dragme()')">

===

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
//Copyright 1998 Macromedia, Inc. All rights reserved.
var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
retVal = true; if(IE && event) event.returnValue = true;



if (MM_dragLayer.arguments.length > 1) {
curDrag = MM_findObj(objName); if (!curDrag) return false;
if (!document.allLayers) { document.allLayers = new Array();
with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
} else {
if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div");
for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];
} }
curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
} else {
var theEvent = ((NS)?objName.type:event.type);
if (theEvent == 'mousedown') {
dragging = true;
dropReset = false;
//mouseX defined here
mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
var maxDragZ=null; document.MM_maxZ = 0;
for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
var parentL=0; var parentT=0;
if (NS6) { parentLayer = aLayer.parentNode;
while (parentLayer != null && parentLayer.style.position) {
parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
parentLayer = parentLayer.parentNode;
} } else if (IE) { parentLayer = aLayer.parentElement;
while (parentLayer != null && parentLayer.style.position) {
parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
parentLayer = parentLayer.parentElement; } }
var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
var tmpW = MM_hWidth; if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
|| maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
if (curDrag) {
dragging = true;
document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
document.MM_curDrag = curDrag; curDrag.MM_SNAPPED=false;
if(curDrag.MM_toFront) {
eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
if (!curDrag.MM_dropBack) document.MM_maxZ++; }
retVal = false; if(!NS4&&!NS6) event.returnValue = false;
} } else if (theEvent == 'mousemove') {
if (document.MM_curDrag) with (document.MM_curDrag) {
dragging = true;
mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
newLeft = mouseX-MM_oldX; newTop = mouseY-MM_oldY;
if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
if (MM_bT!=null) newTop = Math.max(newTop ,MM_bT);
if (MM_bB!=null) newTop = Math.min(newTop ,MM_bB);
MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
if (NS4) {left = newLeft; top = newTop;}
else if (NS6){style.left = newLeft; style.top = newTop;}
else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
if (MM_dragJS) eval(MM_dragJS);
retVal = false; if(!NS) event.returnValue = false;
} } else if (theEvent == 'mouseup') {
document.onmousemove = null;
dragging = false;
if(mouseY<100) dropReset=true;

if (NS) document.releaseEvents(Event.MOUSEMOVE);
if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
if (document.MM_curDrag) with (document.MM_curDrag) {
if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
(Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
if (NS4) {left = MM_targL; top = MM_targT;}
else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
retVal = false; if(!NS) event.returnValue = false; }
document.MM_curDrag = null;
}
if (NS) document.routeEvent(objName);



} return retVal;
}



Its working now.
Its that I have both jsf-api.jar and jsf-api-1.2.jar in the lib dir, thats causing some weird results.

thanks

I am getting this exception while running my first ICEFaces application

I checked the similar post ...I have el-api.jar, el-ri.jar in classpath


This is the simple JSP
#########################################
<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<html>
<head>
<title>
ICEFace
</title>
</head>
<body>
<f:view>
<f:verbatim><p>JavaServer Faces Page </p></f:verbatim>
</f:view>
</body>
</html>

###############################




####<Aug 8, 2007 11:37:17 AM CDT> <Error> <com.icesoft.faces.el.ELContextImpl> <CHOSDEV010> <cgServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1186591037502> <000000> <Failed to instantiate ELResolver. null
java.lang.reflect.InvocationTargetException
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.icesoft.faces.el.ELContextImpl.<init>(ELContextImpl.java:59)
at com.icesoft.faces.context.BridgeFacesContext.getELContext(BridgeFacesContext.java:121)
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:888)
at com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:294)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:164)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:25)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:125)
at com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:31)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.SingleViewServlet.service(SingleViewServlet.java:45)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:245)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:148)
at jsp_servlet.__index._jspService(__index.java:98)
java.lang.UnsupportedOperationException
at javax.faces.application.Application.getELResolver(Application.java:455)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.icesoft.faces.el.ELContextImpl.<init>(ELContextImpl.java:59)
at com.icesoft.faces.context.BridgeFacesContext.getELContext(BridgeFacesContext.java:121)
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:888)
at com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:294)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:164)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:25)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:125)
at com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:31)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.SingleViewServlet.service(SingleViewServlet.java:45)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:245)


Pls help

thanks


 
Profile for xchander -> Messages posted by xchander [9]
Go to:   
Powered by JForum 2.1.7ice © JForum Team