myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (MYFACES-1770) components inside c:forEach has wrong id generation
Date Mon, 19 Nov 2007 02:06:43 GMT

     [ https://issues.apache.org/jira/browse/MYFACES-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe updated MYFACES-1770:
------------------------------------

    Status: Patch Available  (was: Open)

> components inside c:forEach has wrong id generation
> ---------------------------------------------------
>
>                 Key: MYFACES-1770
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1770
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>         Environment: jetty 6.1.3, myfaces 1.2.1-SNAPSHOT, jstl 1.2
>            Reporter: Leonardo Uribe
>         Attachments: patchWrongIdJstl.patch
>
>
> Using jsp pages I have made simple example to test if unified EL works and if I can mix
jstl 1.2 tags with myfaces 1.2 components on
> the same page, one of the behaviors that promotes jsf 1.2.
> The test is this:
> public class ListBean
> {
>     
>     Log log = LogFactory.getLog(ListBean.class);
>     public ListBean(){
>         
>     }
>     
>     public List getStringList(){
>         List list = new ArrayList();        
>         list.add("A");
>         list.add("B");
>         list.add("C");
>         list.add("D");
>         return list;
>     }
>     
>     
> }
> page:
> 	<h:form id="form">
> 		<c:forEach var="item" items="#{listBean.stringList}">
>                     &nbsp;<h:inputText value="#{item}" />
> 			<br>
> 		</c:forEach>
> 	</h:form>
> and that's all.
> On myfaces I have the following output:
> &nbsp;
> <input id="form:j_id_id28" name="form:j_id_id28" type="text" value="A" />
> &nbsp;
> 	
> 	
> &nbsp;
> 			
> 	
> &nbsp;
> <input id="form:j_id_id28j_id_0" name="form:j_id_id28j_id_0" type="text" value="B"
/>
> and on the log:
> Nov 18, 2007 7:06:09 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory
getLifecycleProvider
> INFO: Using LifecycleProvider org.apache.myfaces.config.annotation.ResourceAnnotationLifecycleProvider
> Nov 18, 2007 7:06:09 PM javax.faces.webapp.UIComponentClassicTagBase findComponent
> WARNING: There is more than one JSF tag with an id : j_id_id28j_id_0
> Nov 18, 2007 7:06:09 PM javax.faces.webapp.UIComponentClassicTagBase findComponent
> WARNING: There is more than one JSF tag with an id : j_id_id28j_id_0
> Nov 18, 2007 7:06:37 PM javax.faces.webapp.UIComponentClassicTagBase findComponent
> WARNING: There is more than one JSF tag with an id : j_id_id28j_id_0
> Nov 18, 2007 7:06:37 PM javax.faces.webapp.UIComponentClassicTagBase findComponent
> if I assign a custom id for h:inputText throws an error of duplicateId
> Using jsf ri 1.2_05 I have the following output:
> &nbsp;
> <input type="text" name="form:j_id_id28" value="A" />
> 		
> &nbsp;
> <input type="text" name="form:j_id_id28j_id_1" value="B" />
> 		
> &nbsp;
> <input type="text" name="form:j_id_id28j_id_2" value="C" />
> 		
> &nbsp;
> <input type="text" name="form:j_id_id28j_id_3" value="D" />
> This is that I expected. With this code:
> <c:forEach var="item" items="#{listBean.stringList}">
> 	&nbsp;
> 	<h:inputText id="item" value="#{item}" />
> </c:forEach>
> Render this:
> &nbsp;
> <input id="form:item" type="text" name="form:item" value="A" />
> 		
> &nbsp;
> <input id="form:itemj_id_1" type="text" name="form:itemj_id_1" value="B" />
> 		
> &nbsp;
> <input id="form:itemj_id_2" type="text" name="form:itemj_id_2" value="C" />
> 		
> &nbsp;
> <input id="form:itemj_id_3" type="text" name="form:itemj_id_3" value="D" />
> This is correct!.
> I have made a probe with tomcat 6.0.14 and do the same as jetty.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message