Messages posted by Pesho4uka
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: Pesho4uka  XML
Profile for Pesho4uka -> Messages posted by Pesho4uka [93] Go to Page: 1, 2, 3, 4, 5, 6, 7 Next 
Author Message
I am using composition yes. It is component because one of my not successfull tryings.

But the main problem is that method binding cannot be passed as parameter to facelets. Something I was doing before with the help of this call:

#{controller[listenerName]}

Now this is not working inside the facelet.
Hi thank you for your reply, I will give you more details now. I am using icefaces 1.7.2, jboss 4.2.3 jsf 1.2 mojara that is packed with icefaces.
My facelets components code is :
<ui:component xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component">

<ice:inputText id="#{id}" required="#{required}" disabled="#{disabled}" size="#{size}" maxlength="#{maxLength}" valueChangeListener="#{entity[valueChangeListenerName]}" value="#{value}"
partialSubmit="#{partialSubmit}">
<ui:insert/>
</ice:inputText>
</ui:component>


I call this component in the folowing fashion:

<fs:inputText id="sds" value="#{testComp.someValue}" partialSubmit="true" maxLength="20" entity="#{testComp}" valueChangeListenerName="filterChange"/>


My seam component code is:
@Name(value="testComp")
@Scope(value=ScopeType.PAGE)
public class TestComponent implements Serializable{
private String someValue = "hello";

@BypassInterceptors
public void filterChange(ValueChangeEvent e) {
System.out.println("Hello");
}

public String getSomeValue() {
return someValue;
}

public void setSomeValue(String someValue) {
this.someValue = someValue;
}


}

my faces-config file is:
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">

<application>
<view-handler>
com.icesoft.faces.facelets.D2DSeamFaceletViewHandler
</view-handler>

</application>


</faces-config>

and my web.xml file is:
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<display-name>OrgEditor</display-name>


<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/faces-config/fs.facelets.xml</param-value>
</context-param>
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>

<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.web.SeamFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
</listener>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.actionURLSuffix</param-name>
<param-value>.seam</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.doJSFStateManagement</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>com.icesoft.faces.uploadDirectory</param-name>
<param-value>/</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.uploadMaxFileSize</param-name>
<param-value>100000</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.standardRequestScope</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.jboss.seam.core.init.debug</param-name>
<param-value>true</param-value>
</context-param>

<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>uploadServlet</servlet-name>
<servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>

<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>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.seam</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<!-- Blocking Servlet Mapping -->
<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>

<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>
http://www.icesoft.com/icefaces/component
</taglib-uri>
<taglib-location>
/WEB-INF/tld/icefaces_component.tld
</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsf/facelets</taglib-uri>
<taglib-location>/WEB-INF/tld/jsf-ui.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/fs</taglib-uri>
<taglib-location>/WEB-INF/tld/fs.tld</taglib-location>
</taglib>
</jsp-config>


</web-app>

Do you need any more info?

Hello I have troubles with method binding in facelets. I have the following fragment custom facelets inputText fiels.

<ice:inputText id="#{id}" required="#{required}" disabled="#{disabled}" size="#{size}" maxlength="#{maxLength}" valueChangeListener="#{entity[valueChangeListenerName]}" value="#{value}"
partialSubmit="#{partialSubmit}">
<ui:insert/>
</ice:inputText>

from my jsp page I am using this custom component in the following fashion:

<fs:inputText id="somId" value="#{orgUnitManager.grid.filter.userName}" partialSubmit="true" maxLength="20" entity="#{orgUnitManager.grid}" valueChangeListenerName="filterChange"/>

When value change event occurs the valuechange listener method is executed. It executes successfully the listener method. But after the method is executed the following Exception is thrown:
java.lang.ClassCastException: com.icesoft.faces.el.PartialSubmitValueBinding
at javax.faces.component.StateHolderSaver.<init>(StateHolderSaver.java:63)
at javax.faces.component.UIComponentBase.saveAttachedState(UIComponentBase.java:1389)
at javax.faces.component.UIComponentBase.saveBindingsState(UIComponentBase.java:1477)
at javax.faces.component.UIComponentBase.saveState(UIComponentBase.java:1266)
at javax.faces.component.UIOutput.saveState(UIOutput.java:214)
at javax.faces.component.UIInput.saveState(UIInput.java:1218)
at javax.faces.component.html.HtmlInputText.saveState(HtmlInputText.java:844)
at com.icesoft.faces.component.ext.HtmlInputText.saveState(HtmlInputText.java:611)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1103)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1135)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at javax.faces.component.UIComponentBase.processSaveState(UIComponentBase.java:1119)
at com.sun.faces.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:245)
at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:64)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:163)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:94)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:54)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)

This class castException is really strange. I have totaly no idea where it comes from. In the ear file I have included icefaces packages as java modules in the application.xml and I have no other entries in the MANIFEST files or anywhere else.
The web.xml is configured exactly like the seam-showcase.

If i dont use the custom facelets component but use the standart icefaces component

ice:inputText everything works fine as it is supposed to.

Is this a bug?
Do you know any workaround for method binding in facelets?


Thanks!
Well it is as you say most probably but I have the following strange case which kills me. I am on page A go to page B/external page for the application/ then page A and the request is preserved!!!
If I go to page A then page B then page C the request is not preserved, Any ideas why this is so? And I also believe this is no application specific, because I have this behaviour in two applications from the moment I upgraded icefaces from 1.5.3 to 1.6.1
Yes there is no explanation of Non Standart and standart request scope. I also think that there should be more clarity on this question.
Ok I am stating the question one more time., several months later.

We have page A I use the browser to go to page B the I go to page A again. This mean that the transitions between A and B is redirect.

for example google.com then yahoo.com than again google.com.
I have request beans that are initialized on google.com. So when I do the redirect to the yahoo.com and than I am back the request is the SAME!!! The Request is not destroyed.

Why?

I use icefaces 1.6.2.
I cannot change my request scope as I am using ConcurentDomupdates!
Is there any other way to change this behaviour. Is it possible to delete the coockies somehow and this way to destroy the session?
Still interested in this question.
I am still interested on this topic.
I still need an answere. Why when I redirect to the same page the request preserves??!!!!

Please give feedback.
I have one problem and one question:

1. When I redirect to the same page the request is not destroyed. How can I destroy the request? The request scoped bean hase survived the redirect.

2. In order to destroy the bean I set the standartRequestScope to true. But then on avery actionListener executed a new request bean is created. Is this normal behaviour? I mean I have not changed the page or something, it is the same page but for some reason the bean has bean reinitialized!!!
I believe that you can always put some parameter in the URL and this way using it on the next page to ressurect the state from the previous request.
It's an option.
Still looking for answere. Looks like the redirect does not create a new request. Any ideas?
Hi, i have a table with categories. On double click inside the rowSelectionListener I do redirect to the same page but with different URL parameters. In Icefaces 1.5.3 it was working correctly, but for some reason in 1.6.1 although redirect is done the request scoped bean is the same but not newly constructed one. I believe that redirect means new request which means new instance of the request bean. The redirect source is:

FacesContext.getCurrentInstance().getExternalContext().redirect("catalog.iface?cPath="+(row.getId()));

I will apreciate some help here. Thanks!
Hi, I have a datatable with categories. After the user double click on the row inside the RowSelector listener he is redirected to the same page but with categoryId as URL parameter.
The problem is that in IceFaces 1.5.3 when redirect is used the managedbean below is constructed on each redirect, but in Icefaces 1.6.1 the request bean preservers. The coder for the redirect is:

FacesContext.getCurrentInstance().getExternalContext().redirect("catalog.iface?cPath="+(row.getId()));

How can this be fixed? Why request bean is not reconstructed after Redirect. It is a different request isn't it?

Thanks.
 
Profile for Pesho4uka -> Messages posted by Pesho4uka [93] Go to Page: 1, 2, 3, 4, 5, 6, 7 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team