You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Alex Mayer (JIRA)" <in...@incubator.apache.org> on 2005/03/29 13:04:35 UTC

[jira] Commented: (MYFACES-148) datalist: problems with modelupdate and verbatim tag

     [ http://issues.apache.org/jira/browse/MYFACES-148?page=comments#action_61730 ]
     
Alex Mayer commented on MYFACES-148:
------------------------------------

i tried to embed inputText in dataList too, like that:

<x:dataList value="#{user.currentApp.fields}" var="a" layout="unorderedList">                
   <h:outputLabel value="#{a.label}" />
   <h:inputText maxlength="#{a.maxlength}" value="#{a.currentValue}" />
</x:dataList>

when i then tried to read the field-values, i always got "null" which means that no value was set at all. 
i looked at the created html-code of the jsp-page and saw that the name-attribute for every <h:inputText>-Field generated was the same, e.g.: <input type="text" name="_id0:_id2:0:_id6" maxlength="8" />

for a <h:dataTable>-tag the name-attribute generated is always different, counted up like this: name="_id0:_id2:0:_id6" name="_id0:_id2:1:_id6" name="_id0:_id2:2:_id6"

maybe there is a problem in the namingContainer for dataList?



> datalist: problems with modelupdate and verbatim tag
> ----------------------------------------------------
>
>          Key: MYFACES-148
>          URL: http://issues.apache.org/jira/browse/MYFACES-148
>      Project: MyFaces
>         Type: Wish
>     Versions: 1.0.9 beta
>     Reporter: Mario Ivankovits

>
> I try to use the "datalist" with embedded inputText to change fields in my datamodel.
> After some debugging it turns out it is needet to put the inputText tag within an column tag
> e.g.
> <x:dataList>
> <h:colum>
> <h:inputText ...>
> </h:colum>
> <h:colum>
> <h:inputText ...>
> </h:colum>
> </x:dataList>
> I dont understand why this is needet as there is no need to render "columns" within an dataList.
> Which brings me to the next problem. If I try to embed verbatim tag ...
> <x:dataList>
> <f:verbatim><tr><td></f:verbatim>
> <h:colum>
> <h:inputText ...>
> <f:verbatim></td><td></f:verbatim>
> </h:colum>
> <h:colum>
> <h:inputText ...>
> <f:verbatim></td></tr></f:verbatim>
> </h:colum>
> </x:dataList>
> (It makes no difference how the tags are ordered only the classname in ClassCastException changes)
> ... I get the following exception:
> java.lang.ClassCastException: javax.faces.component.UIColumn
>         at org.apache.myfaces.taglib.core.VerbatimTag.doAfterBody(VerbatimTag.java:76)
>         at org.apache.jsp.suntools_at.onlineshop.warenkorb_jsp._jspx_meth_f_verbatim_0(warenkorb_jsp.java:387)
>         at org.apache.jsp.suntools_at.onlineshop.warenkorb_jsp._jspx_meth_x_dataList_0(warenkorb_jsp.java:325)
>         at org.apache.jsp.suntools_at.onlineshop.warenkorb_jsp._jspx_meth_h_form_0(warenkorb_jsp.java:244)
>         at org.apache.jsp.suntools_at.onlineshop.warenkorb_jsp._jspx_meth_f_view_0(warenkorb_jsp.java:183)
>         at org.apache.jsp.suntools_at.onlineshop.warenkorb_jsp._jspService(warenkorb_jsp.java:86)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
>         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
>         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:405)
>         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:280)
>         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira