scope « Page « JSF Q&A





1. JSF 2.0 constant declaration (assign values to page scope)    stackoverflow.com

In a JSF component what is the best way to "refactor" common constants, e.g. names in a h:graphicImage tag to a single local, temporary property?

<ui:composite>

  <h:graphicImage library="mylib" name="/a/b/c/img1.png"/>
  <h:graphicImage ...

3. page flow scope from httpsessionlistener    coderanch.com

Hello all, i wanted to know if it was possible to retrieve the map of pageflow scope attributes before the session is destroyed. I have searched around and found that JSF is not very session tracking friendly, however most of the examples i have seen use filters to check, and dont really focus of retrieving values from the page flow scope. ...

4. A-la "page" scope in JSF 1.2    coderanch.com

Hi all, I've "heard" that there is "page" scope for managed-beans in JSF 2.0. However, there is no such a thing in JSF 1.2. Currently I don't have any ability to upgrade, but would like to have similar functionality. So, the question is - what are the possible ways to store the data (ideally - any object) between several requests to ...

5. Use multiple scopes in a page?    coderanch.com

Good Day, Sorry about that, Well here's my code. Session Scoped @ManagedBean(name = "jobPositionBeanSessionScoped") @SessionScoped public class JobPositionBeanSessionScoped implements Serializable { private JobPositionBeanRequestScoped jobPositionBeanRequestScoped; private JobPosition selectedJobPosition; private List jobPositionList = new ArrayList(); private String currentJobPosition; private String currentJobPositionDescription; public void positionChanged(ValueChangeEvent event) throws Exception { jobPositionList = jobPositionBeanRequestScoped.getJobPositionList(); int size = jobPositionList.size(); for (int index = 0; index < size; ...

6. ServerAuthModule cannot forward to JSF page - No active contexts for scope    java.net

[#|2010-07-13T20:08:07.502+1000|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=27;_ThreadName=http-thread-pool-18081-(2);|ApplicationDispatcher[/projectx] PWC1231: Servlet.service() for servlet Faces Servlet threw exception org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:679) at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:138) at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:100) at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43) at org.jboss.weld.servlet.HttpSessionManager_$$_javassist_19.setSession(HttpSessionManager_$$_javassist_19.java) at org.jboss.weld.jsf.WeldPhaseListener.initiateSessionAndConversation(WeldPhaseListener.java:168) at org.jboss.weld.jsf.WeldPhaseListener.beforeRestoreView(WeldPhaseListener.java:118) at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:87) at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:822) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:517) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:488) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:379) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:336) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:314) at ...