1 Reply Latest reply on May 25, 2010 6:30 AM by Nick Belaevski

    h:selectBooleanCheckbox with UI:param

    ajaykumar kadiyala Novice

      Hi ,

      Hi,

       

      I have to invoke the particular property method when user clicked on checkbox.

       

       

      <h:commandButton action="#{library.getSelectedMenus}" value="submit" />


        <h:selectBooleanCheckbox value="#{library[menu]}">
            <f:selectItem itemValue="administratorUserProfileView" itemLabel="New" />
                 <ui:param name="menu" value="administratorUserProfileNew" />   
         </h:selectBooleanCheckbox>

         
        <h:selectBooleanCheckbox value="#{library[menu}">
             <f:selectItem itemValue="administratorUserProfileView" itemLabel="View" />
              <ui:param name="menu" value="administratorUserProfileView" />
        </h:selectBooleanCheckbox>

       

       

       

      public

       

       

      class Library {

       

       

       

       

       

       

      private

       

       

       

      private Boolean administratorUserProfileView;

       

       

       

      private Boolean administratorUserRoleNew;

       

       

      private Boolean administratorUserRoleView;

       

      //Will have a setter and getter motheds

       

       

       

      Boolean administratorUserProfileNew;

       

      public void getSelectedMenus()
      {
        System.out.println("--------administratorUserProfileNew "+administratorUserProfileNew); 
        System.out.println("--------administratorUserProfileView "+administratorUserProfileView);

       

      //getting

      May 25, 2010 12:01:59 PM javax.faces.component.UIInput updateModel

      SEVERE: j_id354:j_id357: An error occurred when processing your submitted information.

      java.lang.NullPointerException

      at com.sun.faces.el.FacesResourceBundleELResolver.setValue(

       

       

      FacesResourceBundleELResolver.java:136)

      at javax.el.CompositeELResolver.setValue(

       

      CompositeELResolver.java:69)

      at com.sun.faces.el.FacesCompositeELResolver.setValue(

       

      FacesCompositeELResolver.java:100)

      at org.jboss.el.parser.AstBracketSuffix.setValue(

       

      AstBracketSuffix.java:75)

      at org.jboss.el.parser.AstValue.setValue(

       

      AstValue.java:84)

      at org.jboss.el.ValueExpressionImpl.setValue(

       

      ValueExpressionImpl.java:249)

      at com.sun.facelets.el.TagValueExpression.setValue(

       

      TagValueExpression.java:93)

      at javax.faces.component.UIInput.updateModel(

       

      UIInput.java:771)

      at javax.faces.component.UIInput.processUpdates(

       

      UIInput.java:703)

      at javax.faces.component.UIForm.processUpdates(

       

      UIForm.java:261)

      at javax.faces.component.UIComponentBase.processUpdates(

       

      UIComponentBase.java:1081)

      at org.richfaces.component.UISwitchablePanel.processUpdates(

       

      UISwitchablePanel.java:190)

      at org.ajax4jsf.component.AjaxViewRoot$2.invokeContextCallback(

       

      AjaxViewRoot.java:419)

      at org.ajax4jsf.component.AjaxViewRoot.processPhase(

       

      AjaxViewRoot.java:235)

      at org.ajax4jsf.component.AjaxViewRoot.processUpdates(

       

      AjaxViewRoot.java:435)

      at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(

       

      UpdateModelValuesPhase.java:78)

      at com.sun.faces.lifecycle.Phase.doPhase(

       

      Phase.java:100)

      at com.sun.faces.lifecycle.LifecycleImpl.execute(

       

      LifecycleImpl.java:118)

      at javax.faces.webapp.FacesServlet.service(

       

      FacesServlet.java:265)

      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.web.IdentityFilter.doFilter(

       

      IdentityFilter.java:38)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(

       

      SeamFilter.java:69)

      at org.jboss.seam.web.MultipartFilter.doFilter(

       

      MultipartFilter.java:90)

      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.RedirectFilter.doFilter(

       

      RedirectFilter.java:45)

      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(

       

      SeamFilter.java:69)

      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(

       

      BaseXMLFilter.java:178)

      at org.ajax4jsf.webapp.BaseFilter.handleRequest(

       

      BaseFilter.java:290)

      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(

       

      BaseFilter.java:388)

      at org.ajax4jsf.webapp.BaseFilter.doFilter(

       

      BaseFilter.java:515)

      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(

       

      Ajax4jsfFilter.java:56)

      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.apache.catalina.core.StandardWrapperValve.invoke(

       

      StandardWrapperValve.java:233)

      at org.apache.catalina.core.StandardContextValve.invoke(

       

      StandardContextValve.java:191)

      at org.apache.catalina.core.StandardHostValve.invoke(

       

      StandardHostValve.java:127)

      at org.apache.catalina.valves.ErrorReportValve.invoke(

       

      ErrorReportValve.java:102)

      at org.apache.catalina.core.StandardEngineValve.invoke(

       

      StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(

       

      CoyoteAdapter.java:298)

      at org.apache.coyote.http11.Http11Processor.process(

       

      Http11Processor.java:852)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

       

      Http11Protocol.java:588)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(

       

      JIoEndpoint.java:489)

      at java.lang.Thread.run(Unknown Source)

      May 25, 2010 12:01:59 PM com.sun.faces.lifecycle.RenderResponsePhase execute

      INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

      sourceId=j_id354:j_id357[severity=(ERROR 2), summary=(j_id354:j_id357: An error occurred when processing your submitted information.), detail=(j_id354:j_id357: An error occurred when processing your submitted information.)]

       

       


      }

       

      }