0

Test1.xhtml..

I want to use one panel id=d from the composite component on selecting a dropdown value in another (test2.xhtml).I am new to jsf2.2 and struggling to implement my logic with custom components.Thanks in advance.

<composite:interface>
    <composite:attribute name="AA" required="true" type="java.util.ArrayList" />
    <composite:attribute name="BB" required="true" type="java.lang.Object" />
    <composite:attribute name="CC" required="false" type="java.lang.String" />
    </composite:interface>

    <p:selectOneMenu id="a" value="#{}" >
    </p:selectOneMenu>

    <p:selectOneRadio id="b" plain="true" layout="custom" value="#{cc.attrs.bean.hhhh}">  
    </p:selectOneRadio>


    <p:accordionPanel  id="c">
    <p:outputPanel  id="d > 
    <ui:repeat id="post" value="#{cc.attrs.foo}" var="pooo">
    ---------code---------------------------------
    </p:outputPane>
    </ui:repeat>

    </composite:implementation>

Test2.xhtml

How can i use only id=abc from test1.xhtml on the update of selected dropdown

//With these i can acces all the attributes.It is working fine
    <p:outputPanel id="ZZZZ" >
                <deal:Test1 AA="#{someCode}" BB="someCode" CC="#{}" />
            </p:outputPanel>

// But I want to update only one panel id from test1.xhtml.How to achieve that on selecting a drop down value.

    <p:selectOneMenu id="a" value="#{}">
    <p:ajax listener="#{someMethod}" update="d"/>
    </p:selectOneMenu>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Rahul
  • 17
  • 1
  • 7
  • I guess you've the same question as http://stackoverflow.com/q/13313207 Is this true? – BalusC Feb 09 '16 at 11:44
  • @BalusC.Thanks for replying..No it is not the same question.But It has given a good idea to go for..If you can give an idea how to re write ( ) this section of code in a more right approach. – Rahul Feb 09 '16 at 12:16
  • Huh? What is `#{cc.t1}`? Why are you doing it differently from the answer? It says to use `#{cc.clientId}` for that. – BalusC Feb 09 '16 at 12:18
  • @BalusC Thanks a lot. – Rahul Feb 09 '16 at 13:03
  • @BalusC can you please help me on this http://stackoverflow.com/questions/35392360/ui-repeat-to-show-one-more-value-and-method-is-not-invoking-in-manged-bean-in-js – Rahul Feb 15 '16 at 06:47
  • @BalusC I realy need your help.my question is similar to this http://stackoverflow.com/questions/25673729/commandbutton-action-bean-deleterow-in-datatable-seems-to-pass-wrong-row – Rahul Mar 07 '16 at 12:31

0 Answers0