[ 
https://issues.apache.org/jira/browse/MYFACES-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13538480#comment-13538480
 ] 

Zhao Koh commented on MYFACES-3668:
-----------------------------------

Can re-produce using the attached files with following steps:

1) Using apache-tomcat 6.0.20 - Java SE 1.6.0_37-b06-434-11M3909
2) Copy the war file to webapp/
3) Access the URL http://localhost:8080/composite/test.faces
4) Click the button and you can see system.out (catalina.out) logging ###### 
BUTTON CLICK #######
5) Build the project again using the source (probably can skip this step).
6) Copy the war to webapp/ and wait for a few seconds for tomcat to reload.
7) Then refresh the URL http://localhost:8080/composite/test.faces again by 
going to the browser URL bar (make sure this is a GET request, not POST).
8) Click the button <-------- There is no system.out log here.
9) Click again the button (second click) and the log message appears.
                
> CLONE - UIForm.createUniqueId should take into account prependId logic
> ----------------------------------------------------------------------
>
>                 Key: MYFACES-3668
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3668
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>            Reporter: Zhao Koh
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.10, 2.1.4
>
>         Attachments: composite.src.tar.gz, composite.war, MYFACES-3668-1.patch
>
>
> If prependId="false", the generated id should get an unique id from the 
> parent naming container of UIForm, to ensure uniqueness on id generation.
> Reported by Zhao Koh on dev list : MyFaces 2.1.8 - Issues with composite 
> component renderFacet
> Hi all,
> I am currently using MyFaces 2.1.8 but discovered an issue with composite 
> component renderFacet - and this issue started at version 2.1.4.
> The following describes the problem:
> I have a composite component called buttonSelectBox that uses 
> composite:renderFacet to inject content from client - nothing fancy, only a 
> span that surrounds the content.
> <html xmlns="http://www.w3.org/1999/xhtml"; 
>         xmlns:h="http://java.sun.com/jsf/html"; 
>         xmlns:f="http://java.sun.com/jsf/core"; 
>         xmlns:c="http://java.sun.com/jsp/jstl/core"; 
>         xmlns:ui="http://java.sun.com/jsf/facelets"; 
>         xmlns:composite="http://java.sun.com/jsf/composite"; 
>         xmlns:p="http://primefaces.org/ui";> 
>         <composite:interface> 
>                 <composite:attribute name="compId" required="true" /> 
>                 <composite:attribute name="defaultText" required="true" /> 
>                 <composite:facet name="content" required="false" /> 
>         </composite:interface> 
>         <composite:implementation> 
>                 <span class="buttonlink"> 
>                         <composite:renderFacet name="content" /> 
>                   </span>                     
>         </composite:implementation> 
> </html> 
> Then I have a facelet page that uses this composite component and a standard 
> <h:commandButton> that invokes an action.
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> 
> <html xmlns="http://www.w3.org/1999/xhtml"; 
>         xmlns:h="http://java.sun.com/jsf/html"; 
>         xmlns:c="http://java.sun.com/jsp/jstl/core"; 
>         xmlns:f="http://java.sun.com/jsf/core"; 
>         xmlns:ui="http://java.sun.com/jsf/facelets"; 
>         xmlns:custom="http://java.sun.com/jsf/composite/components"; 
>         xmlns:p="http://primefaces.org/ui"; 
>         xmlns:pe="http://primefaces.org/ui/extensions"; 
>         lang="en"> 
> <h:head> 
> </h:head> 
> <h:body> 
>         <div class="container"> 
>         
>                 <div class="row"> 
>                         <div id="workspace"> 
>                                 <h:form id="taskListForm" prependId="false"> 
>                                         <custom:buttonSelectBox 
> compId="myLinksMenu" defaultText="2222"> 
>                                                 <f:facet name="content"> 
>                                             <ul> 
>                                                 <li><a href="#">My 
> Preferences</a></li> 
>                                         </ul> 
>                                         <ul> 
>                                                 <li><a href="#">My 
> Profile</a></li> 
>                                             <li><a 
> href="#{facesContext.externalContext.requestContextPath}/logout">Logout</a></li>
>  
>                                         </ul> 
>                                                 </f:facet> 
>                                         </custom:buttonSelectBox> 
>                                 
>                                         <h:commandButton 
> action="#{testBean.buttonAction}" value="Click ME" /> 
>                                 </h:form> 
>                         </div>         
>                 </div> 
>         </div> 
>         
> </h:body> 
> </html> 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to