0

i have a problem in a rich POPUPPANEL in my form i have a selectonemenu with converter it works great if i make the component in simple form with panel grid but when i make this on popuppanel the value of selectonemenu not send to my bankingbean i find it null

i tried a multi trick but no result

so here my code in view .xhtml

<h:form>
<rich:popupPanel id="piecePanel" autosized="true" width="500"
    domElementAttachment="form" header="Modifier">
    <a4j:outputPanel>
        <b><h:messages style="color: red;" /></b>
    </a4j:outputPanel>
    <rich:panel>
        <h:panelGrid columns="3">
            <h:outputText value="Piece *"></h:outputText>

            <h:selectOneMenu converter="#{GenericConverter}"
                value="#{pieceBean.piece}">
                <f:selectItem itemLabel="" />
                <f:selectItems value="#{listBean.selectPiece}" />

            </h:selectOneMenu>

            <a4j:commandButton action="#{pieceBean.affectpiece2Vehicule}"
                limitRender="true" render="tablePiece"
                onclick="#{rich:component('waitFormPanel')}.show()"
                oncomplete="#{rich:component('waitFormPanel')}.hide()"
                value="affecter" />
        </h:panelGrid>


    </rich:panel>

    <rich:panel>
        <rich:dataTable id="tablePiece" value="#{pieceBean.piecesByVehicule}"
            var="dataItem" rows="12">

            <rich:column>
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="prix" />
                    </h:panelGroup>
                </f:facet>


                <h:outputText value="#{dataItem.piece.prix}" />
            </rich:column>

            <rich:column>
                <f:facet name="header">
                    <h:panelGroup>
                        <h:outputText value="action" />
                    </h:panelGroup>
                </f:facet>
                <a4j:commandButton action="#{pieceBean.disaffectpiece}"
                    limitRender="true" render="tablePiece" execute="@this"
                    onclick="#{rich:component('waitFormPanel')}.show()"
                    oncomplete="#{rich:component('waitFormPanel')}.hide()"
                    styleClass="ajoutBtn" value="desaffecte">
                    <f:setPropertyActionListener value="#{dataItem}"
                        target="#{pieceBean.currentPieceVehicule}" />
                </a4j:commandButton>
            </rich:column>
        </rich:dataTable>

    </rich:panel>



</rich:popupPanel>

mogiwara
  • 47
  • 1
  • 6
  • Look in your javascript console for the browser for conversion/validation errors (although I do see a `` there). Also, try to make each popup panel its own ``; makes for easier reading and debugging – kolossus Feb 05 '14 at 22:07
  • i try your road but no result thanks at all – mogiwara Feb 07 '14 at 17:47

1 Answers1

0

you are facing problem how rich:popupPanel is generated on page, when you try to find his ID via firebug on page you will realize that is not in form any longer on client but was generated outside of form! Only solution is to make sure that h:form is always inside of rich:popupPanel not outside. Please try and let me know.

Mr.B
  • 91
  • 2
  • The OP has `domElementAttachment=form`. – mabi Feb 05 '14 at 15:18
  • i do it but i find my pooup in the form exactly :( – mogiwara Feb 05 '14 at 15:46
  • And Which button are you submiting?? Check that your a4j:commandButton has defined unique id tag and also try execute="@form" or at least execute="idOfYoutSelectMenu", please try to use for all component which submit value some id, its better for you also to navigate when you debug your application. – Mr.B Feb 05 '14 at 19:19
  • i try what you tell me to do But no result @Mr.B by the way you should know when i use a another page test , i make just a a4j button call a popup with seletone it works good but when i make it in my page dosnt work – mogiwara Feb 06 '14 at 10:07
  • And Which from those two buttons are you trying submit?? Check also some strange behavior describe in following link: https://community.jboss.org/thread/230211 What you could also try is to use Firebug - Net tab to see what information are send from client to server. Is your select value in request to server?? If it is, then you have problem on server during phase 4 - Update model (this is related to your a4j:commondButton setting). If it is not, then you have problem in your xhtml page and constructionf of it, in this case please post whole your page not just snapshot. – Mr.B Feb 07 '14 at 12:50
  • well i try to create another page and work carefully and it works good thanks for all advices Mr and wish for you the best :) – mogiwara Feb 07 '14 at 17:59