voyent
Force a "bit" of a page to re-fresh!  XML
Forum Index -> JBoss Seam Integration Go to Page: Previous  1, 2
Author Message
tony.herstell

Joined: 01/Dec/2006 00:00:00
Messages: 206
Offline


I think how I am using the icefaces suite is so far from the way you expected that this will not really go anywhere.

Please don't waste your time on this any more.

Its only a cosmetic bug in the paginator so I don't really care that much now.

The upload image seemed to work sometimes for DR 1 so I am hoping once Greg has looked at the stuff I sent him that that will work again with DR 2 and that should suffice for now (I can just tell the users to hit refresh if the image is not appearing!).

Tony.
tony.herstell

Joined: 01/Dec/2006 00:00:00
Messages: 206
Offline


I added getters/setters into the findController and got this:

Code:
 Close on exit  Lines  Category  Level
 
 3:54:58 debug [window] : Interup pressed
 3:54:58 debug [window.async-connection] : send >
 | partial=false |
 | ice.event.target=_id52:_id53:usersMenuSection:usersFindMenuOption:_id100 |
 | ice.event.captured=_id52:_id53:usersMenuSection:usersFindMenuOption:link |
 | ice.event.type=onclick |
 | ice.event.alt=false |
 | ice.event.ctrl=false |
 | ice.event.shift=false |
 | ice.event.meta=false |
 | ice.event.x=221 |
 | ice.event.y=111 |
 | ice.event.left=true |
 | ice.event.right=false |
 | _id52=_id52 |
 | icefacesCssUpdates= |
 | viewNumber=1 |
 | _id52:_idcl=_id52:_id53:usersMenuSection:usersFindMenuOption:link |
 | focus_hidden_field= |
 | conversationPropagation=none |
 | focus=_id52:_id53:usersMenuSection:usersFindMenuOption:link |
 | window=8107 |
 | icefacesID=-72hghFRIrpLXhAhCk0qOQ |
 | viewNumber=1 |
 3:54:58 debug [window.async-connection.ui] : [8764686] : send asynchronous POST
 3:54:58 debug [window.async-connection.ui] : [8764686] : receive [200] OK
 3:54:58 error [window] : Server side error
 3:54:58 error [window] : javax.faces.FacesException: Error calling action method of component with id _id52:_id53:usersMenuSection:usersFindMenuOption
 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
 at javax.faces.component.UICommand.broadcast(UICommand.java:106)
 at com.icesoft.faces.component.menubar.MenuItemBase.broadcast(MenuItemBase.java:129)
 at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
 at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
 at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
 at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:66)
 at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:46)
 at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
 at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
 at com.icesoft.faces.webapp.http.core.PushServer.service(PushServer.java:35)
 at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
 at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
 at com.icesoft.faces.webapp.http.servlet.PushServlet.service(PushServlet.java:27)
 at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:41)
 at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:18)
 at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:32)
 at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:31)
 at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:41)
 at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:18)
 at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:48)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: javax.faces.el.EvaluationException: /WEB-INF/pages/template.xhtml @109,180 action="#{findUserController.startFind}": javax.ejb.EJBException: java.lang.IllegalArgumentException: could not set field value: findUserController.dataPaginatorEventForBinding
 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
 at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
 ... 48 more
 Caused by: javax.ejb.EJBException: java.lang.IllegalArgumentException: could not set field value: findUserController.dataPaginatorEventForBinding
 at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
 at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
 at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
 at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
 at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
 at $Proxy131.startFind(Unknown Source)
 at nz.co.risingstars.actions.user.FindUserController$$FastClassByCGLIB$$d7deafdf.invoke(<generated>)
 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
 at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
 at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
 at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
 at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$3808b66b.startFind(<generated>)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
 at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
 at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
 at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
 ... 49 more
 Caused by: java.lang.IllegalArgumentException: could not set field value: findUserController.dataPaginatorEventForBinding
 at org.jboss.seam.Component.setFieldValue(Component.java:1527)
 at org.jboss.seam.Component.access$500(Component.java:132)
 at org.jboss.seam.Component$BijectedField.set(Component.java:2251)
 at org.jboss.seam.Component.injectAttributes(Component.java:1336)
 at org.jboss.seam.Component.inject(Component.java:1163)
 at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
 at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
 at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
 at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
 at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
 ... 85 more
 Caused by: java.lang.IllegalArgumentException: Could not set field value by reflection: FindUserControllerImpl.dataPaginatorEventForBinding on: nz.co.risingstars.actions.user.FindUserControllerImpl with value: class nz.co.risingstars.actions.user.DataPaginatorEventForBindingImpl$$EnhancerByCGLIB$$6619abeb
 at org.jboss.seam.util.Reflections.set(Reflections.java:75)
 at org.jboss.seam.Component.setFieldValue(Component.java:1523)
 ... 108 more
 Caused by: java.lang.IllegalArgumentException: Can not set nz.co.risingstars.actions.user.DataPaginatorEventForBinding field nz.co.risingstars.actions.user.FindUserControllerImpl.dataPaginatorEventForBinding to nz.co.risingstars.actions.user.DataPaginatorEventForBindingImpl$$EnhancerByCGLIB$$6619abeb
 at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
 at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
 at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
 at java.lang.reflect.Field.set(Field.java:657)
 at org.jboss.seam.util.Reflections.set(Reflections.java:61)
 ... 109 more
 3:54:58 debug [window.async-connection.blocking] : [8585570] : connection closed
 3:54:58 info [window] : page unloaded!
 


Code:
 package nz.co.risingstars.actions.user;
 
 import javax.faces.event.ValueChangeEvent;
 
 import nz.co.risingstars.entities.User;
 
 //import com.icesoft.faces.component.datapaginator.DataPaginator;
 //import com.icesoft.faces.component.ext.HtmlDataTable;
 
 /** 
  * @author Tony Herstell 
  * @version $Revision: 1.3 $ $Date: 2007-03-23 04:33:01 $ 
  */ 
 public interface FindUserController {
     
     /**
      * Initilises the Users to to the "full" list of Users.
      */
     public void initUsers();
 
     /**
      * Starts a Conversation to find a User.
      * @return A string that maps to the next "page" as determined by this method.
      */
     public String startFind();
 
     /**
      * Informs the Controller that the apply filter button has been pressed.
      * This will result in the list of Users being re-calculated based on the
      * filter settings.
      * @return A string that maps to the next "page" as determined by this method.
      */
     public String applyFilter();
 
     /**
      * Required by EJB3 when it wants to destroy an instance of this class.
      */
     public void destroy();
 
     /*
      * -----------------------------------------------------------------------------------
      * Used by external rountines to update the list of users held in this session object.
      * -----------------------------------------------------------------------------------
      */
 
     /**
      * Adds an Organisation to the list of Organisations being held. The filter
      * will be re-run to determine if it should be made visible or not.
      * @param organisation is the organisation to be added.
      */
     public void addUserToExistingList(User user);
 
     /**
      * Updates an existing User the list of Users being held.
      * TODO The filter will be re-run to determine if it should be made visible or not. -CHECK
      * @param user is the user to be updated.
      */
     public void updateUserInExistingList(User user);
 
     /**
      * Deletes an User from the list of Users being held.
      * @param user is the user to be delted.
      */
     public void deleteUserFromExistingList(User user);
 
     /*
      * ---------------------------------------------------------------------------
      * GUI Support Methods
      * ---------------------------------------------------------------------------
      */
     
     public void selectedSearchCriteriaPanelChanged(ValueChangeEvent event);
     
     public void setSelectedSearchCriteriaPanel(String selectedPanel);
     
     public String getSelectedSearchCriteriaPanel();
 
     public String getALL_OPTION();
 
     public String getFILTERED_OPTION();
 
     public boolean getAscending();
     
     public void setAscending(boolean ascending);
     
     public String getSortColumn();
     
     public void setSortColumn(String sortColumn);
 
     /* TODO Non working IceFaces stuff to try to sort out the pgaing problem where you filter when on page 3 and end up on a blank page 3
     public void setUsersTable(HtmlDataTable usersTable);
     
     public HtmlDataTable getUsersTable();
     
     public void setUsersTablePaginator(DataPaginator usersTablePaginator);
     
     public DataPaginator getUsersTablePaginator();
     */
 
     public DataPaginatorEventForBinding getDataPaginatorEventForBinding();
 
     public void setDataPaginatorEventForBinding(
             DataPaginatorEventForBinding dataPaginatorEventForBinding);
     
 }
 
 
ssandruchi

Joined: 07/Nov/2007 00:00:00
Messages: 2
Offline


Don't forget adding the following code in your faces-config.xml:
Code:
	<managed-bean>
 		<managed-bean-name>renderManagerBean</managed-bean-name>
 		<managed-bean-class>com.icesoft.faces.async.render.RenderManager</managed-bean-class>
 		<managed-bean-scope>application</managed-bean-scope>
 	</managed-bean>


and to add this bean to your "File Bean":
Code:
<managed-bean>
 		<managed-bean-name>fileBean</managed-bean-name>
 		<managed-bean-class>com.file.FileBean</managed-bean-class>
 		<managed-bean-scope>session</managed-bean-scope>
 		<managed-property>
 			<property-name>renderManager</property-name>
 			<value>#{renderManagerBean}</value>
 		</managed-property>		
 	</managed-bean>


Then, in the "#{uploadController.action}" you need to add:
Code:
	if (renderManager != null) {
      		    renderManager.requestRender(this);
             }
 
 	        if (state != null) {
 		        try {
 					state.execute();
 					state.render();
 					
 				} catch (RenderingException e) {
 					renderingException(e);
 				} 
 	        }	


And in "#{uploadController.progress}" method:
Code:
	if (renderManager != null) {
  		    renderManager.requestRender(this);
          }


I hope this help you!
jguglielmin

Joined: 20/Jul/2007 00:00:00
Messages: 181
Offline


Actually, for Seam, the Beans are annotated with Seam management....

The progress Monitor is trickier in Seam (standard request scope) than in normal ICEfaces extended request scope. Please see this forum posting for fileupload/progress information.

 
Forum Index -> JBoss Seam Integration Go to Page: Previous  1, 2
Go to:   
Powered by JForum 2.1.7ice © JForum Team