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

Mike Kienenberger commented on TOMAHAWK-1678:
---------------------------------------------

No one is currently working on the Tomahawk library, but if you submit patches, 
I will apply them. Once we get a few patches, we'll make a new release.

> Generation t:checkbox ID with layout='spread'
> ---------------------------------------------
>
>                 Key: TOMAHAWK-1678
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1678
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended SelectItems
>    Affects Versions: 1.1.14
>         Environment: GlassFish 4.1 
> Tomohawk 1.1.14
> JSF 2.2
> Windows 7
> Primefaces 4.0
>            Reporter: Alexey Poryadny
>
> I generate such blocks of two types: in the first case I use component 
> t:selectOneMenu with property layout='spread' and in the second I use 
> t:selectManyCheckbox. In both of them I hang handler f:ajax and generates 
> t:radio and t:checkbox respectively. On page property id for input 
> type="radio" (for t:radio) is generated in form 'j_idt ***', and property  id 
> for input type="'checkbox' is generated in the form 
> id_selectManyCheckbox:index because of which the processing in the event 
> onclick obtained here such line mojarra.ab ('id_selectManyCheckbox', event, 
> 'change', 0, 'q-smc-div-2 q-smc-panel-2') and ajax request is not processed 
> for t:selectManyCheckbox. For selectOneMenu line also looks mojarra.ab 
> ('j_idt1757', event, 'change', 0, 'q-sor-div-34 q-sor-panel-34') and ajax 
> request is executed.
> <c:forEach items="#{createTopicBean.currentTopic.questions}" var="ques" 
> varStatus="loopQues">
>                                 <c:if test="#{ques.type ne 4}">
>                                     <p:row>
>                                         <p:column>
>                                             <h:outputLabel 
> value="#{ques.position}. #{ques.description}"/> 
>                                             <c:if test="#{ques.type eq 2 and 
> ques.countAns eq 1}">
>                                                 <t:selectOneRadio 
> id="q-sor-#{ques.position}-#{loopQues.index}" converter="#{selectOneAnsBean}" 
>                                                                   
> value="#{ques.selectedAnswer}" layout="spread" > <!--TODO required="true"-->
>                                                     <f:selectItems 
> value="#{ques.qSelectItem}" itemLabel="#{ans.description}" />
>                                                     <f:ajax event="change" 
> render="q-sor-div-#{ques.position} 
> :createinterviewform:q-sor-panel-#{ques.position}" />
>                                                 </t:selectOneRadio>  
>                                             </c:if> 
>                                             <c:if test="#{ques.type eq 2 and 
> ques.countAns eq 2}">
>                                                 <t:selectManyCheckbox 
> id="q-smc-#{ques.position}-#{loopQues.index}" 
> converter="#{selectManyAnsBean}" 
>                                                                       
> value="#{ques.selectedAnswers}" layout="spread" forceId="true" > <!--TODO 
> required="true"-->
>                                                     <f:selectItems 
> value="#{ques.qSelectItem}" itemLabel="#{ans.description}" />
>                                                     <f:ajax event="change" 
> render="q-smc-div-#{ques.position} 
> :createinterviewform:q-smc-panel-#{ques.position}" />
>                                                 </t:selectManyCheckbox>
>                                             </c:if> 
>                                         </p:column>
>                                         <p:column> 
>                                             <!--TODO Колонка для валидации 
> ответов на вопрос-->
>                                         </p:column>
>                                     </p:row>   
>                                     <!--BEGIN-->
>                                     <c:if test="#{ques.type eq 2 and 
> ques.countAns eq 1}">
>                                         <p:row>
>                                             <p:column colspan="2"> 
>                                                 <p:outputPanel 
> id="q-sor-div-#{ques.position}">
>                                                     <p:panelGrid 
> id="q-sor-panel-#{ques.position}">
>                                                         <c:forEach 
> items="#{ques.qSelectItem}" var="ans" varStatus="loopAns">
>                                                             <p:row>
>                                                                 <p:column 
> colspan="2" class="rightMarg"  >
>                                                                     <c:if 
> test="#{ans ne null}">
>                                                                         
> <t:radio for=":createinterviewform:q-sor-#{ques.position}-#{loopQues.index}" 
> index="#{loopAns.index}" />
>                                                                     </c:if>
>                                                                     <c:if 
> test="#{ques.selectedAnswer.id ne 999 and ques.selectedAnswer.id gt 980}">
>                                                                         
> <p:outputPanel rendered="#{ans.value ne 999 and ans.value gt 980}" 
> layout="inline">
>                                                                             
> <p:inputText value="#{ques.userDescription}" style="width:140px;margin-left: 
> 20px;" /> <!--TODO required="true"-->
>                                                                         
> </p:outputPanel> 
>                                                                     </c:if> 
>                                                                 </p:column>
>                                                             </p:row> 
>                                                         </c:forEach>
>                                                     </p:panelGrid>
>                                                 </p:outputPanel>
>                                             </p:column>
>                                         </p:row>          
>                                     </c:if>
>                                     <!--END-->
>                                     <!--BEGIN-->
>                                     <c:if test="#{ques.type eq 2 and 
> ques.countAns eq 2}">
>                                         <p:row>
>                                             <p:column colspan="2">
>                                                 <p:outputPanel 
> id="q-smc-div-#{ques.position}">
>                                                     <p:panelGrid 
> id="q-smc-panel-#{ques.position}">
>                                                         <c:forEach 
> items="#{ques.answers}" var="ans" varStatus="loopAns">
>                                                             <p:row> 
>                                                                 <p:column 
> colspan="2" class="rightMarg" >
>                                                                     <c:if 
> test="#{ans ne null}">
>                                                                         
> <t:checkbox t:id="a-smc-#{ques.position}-#{loopQues.index}-#{loopAns.index}" 
> for=":createinterviewform:q-smc-#{ques.position}-#{loopQues.index}" 
> index="#{loopAns.index}" />
>                                                                     </c:if>
>                                                                 </p:column>
>                                                             </p:row> 
>                                                         </c:forEach>
>                                                     </p:panelGrid>
>                                                 </p:outputPanel>
>                                             </p:column>
>                                         </p:row>
>       </c:if>
>  </c:forEach>                                                                 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to