1 Reply Latest reply on Jun 5, 2011 7:36 AM by fynd wong

    Got problem when putting <s:link> inside <f:facet name="header">

    fynd wong Newbie

      Hi,

      I am new to seam framework. I have a problem here, when i put a <s:link> inside <f:facet name="header">, the value="#{line}" can be display as table header, and because the table header is a link, when i click it, the value cannot be pass to backing bean and the page applicationconfig_lineid_view.xhtml also no display and I see error: "For input string: "line2""

      when i remove the whole <s:link> out of <f:facet name="header">, it work fine, the value can be pass to backing bean and page applicationconfig_lineid_view.xhtml can be display.

      How come <f:param> inside <f:facet name="header"> cannot get the value?? Pls kindly help, its quite urgent. Thanks a lot.



      Below is my code (applicationconfig_list.xhtml):

      <rich:columns value="#{appconfigList.latestAppconfigLines}"
           var="line" index="ind" id="line#{ind}">
           <f:facet name="header" >
              <s:link
                 view="/pages/applicationmgt/applicationconfig_lineid_view.xhtml"
                 id="appconfig#{ind}" value="#{line}">
                 <f:param name="lineid" value="#{line}" />
              </s:link>
           </f:facet>
           <h:outputText value="#{_appconfig[ind+1]}" />
      </rich:columns>



      Below is the error show:

      13:06:51,921 ERROR [viewhandler] Error Rendering View[/pages/applicationmgt/applicationconfig_list.xhtml]
      java.lang.NumberFormatException: For input string: "line2"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
              at java.lang.Integer.parseInt(Integer.java:447)
              at java.lang.Integer.parseInt(Integer.java:497)
              at javax.el.ArrayELResolver.coerce(ArrayELResolver.java:153)
              at javax.el.ArrayELResolver.getValue(ArrayELResolver.java:45)
              at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
              at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at org.richfaces.model.impl.expressive.ValueBindingExpression.evaluate(ValueBindingExpression.java:79)
              at org.richfaces.model.impl.expressive.ObjectWrapperFactory.wrapObject(ObjectWrapperFactory.java:209)
              at org.richfaces.model.ModifiableModel$RowKeyWrapperFactory.wrapObject(ModifiableModel.java:75)
              at org.richfaces.model.impl.expressive.ObjectWrapperFactory$2.convert(ObjectWrapperFactory.java:190)
              at org.richfaces.model.impl.expressive.ObjectWrapperFactory.convertList(ObjectWrapperFactory.java:151)
              at org.richfaces.model.impl.expressive.ObjectWrapperFactory.wrapList(ObjectWrapperFactory.java:188)
              at org.richfaces.model.ModifiableModel.sort(ModifiableModel.java:272)
              at org.richfaces.model.ModifiableModel.modify(ModifiableModel.java:241)
              at org.richfaces.component.UIScrollableDataTable.createDataModel(UIScrollableDataTable.java:226)
              at org.ajax4jsf.component.UIDataAdaptorBase.getExtendedDataModel(UIDataAdaptorBase.java:621)
              at org.ajax4jsf.component.UIDataAdaptorBase.getRowCount(UIDataAdaptorBase.java:248)
              at org.richfaces.component.UIScrollableDataTable.checkRange(UIScrollableDataTable.java:523)
              at org.richfaces.component.UIScrollableDataTable.encodeBegin(UIScrollableDataTable.java:200)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:200)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:195)
              at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:78)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
              at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:166)
              at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
              at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
              at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
              at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
              at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:124)
              at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:685)
              at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:556)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              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:40)
              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)