1 2 Previous Next 18 Replies Latest reply on Apr 8, 2011 10:24 AM by balteo

    issue with h:form prependId=false within rich:datagrid

    balteo

      Hello,

      I have a h:form with the prependId=false as follows:

      <h:form id="formulaireInscriptionSculpture" prependId="false">

      <ui:include src="WEB-INF/include/formulaire-inscription-sculpture.xhtml"/>

      </h:form>

      This form is located within a rich:datagrid and oddly enough the prependId=false is not respected and all my form fields have the usual pattern for the name i.e:

      name="j_idt100:6:email"

      How can I make sure my form fields follow this pattern:

      name="email"

      instead - if that is possible at all?

      Thanks in advance,

      J.

        • 1. issue with h:form prependId=false within rich:datagrid
          boy18nj

          which richfaces/jsf version you are using, any multiple forms by any chance and the content of formulaire-inscription-sculpture.xhtml?

           

          Is email id component child of h:form? If it is outside this won't work. You have to make it child of h:form. In your case I see j_idt100:6:email instead it should be formulaireInscriptionSculpture:email?


          • 2. issue with h:form prependId=false within rich:datagrid
            balteo

            Hi Aman!

            I use RF4.0 and JSF 2.0. There's only one form. Of course email is within the h:form.

            The "j_idt100:6" means that "j_idt100" = datagrid component and "6"=sixth element in the datagrid.

            Do you see the problem?

            J.

            • 3. issue with h:form prependId=false within rich:datagrid
              boy18nj

              Hi Julien,

               

              You have explicitly defined id for your h:form, then it should be shown in your j_idt100:6:email.

              • 4. issue with h:form prependId=false within rich:datagrid
                balteo

                I am not sure about that Aman because I did specify prependId=false.

                Anyway what I want to achieve is this: name="email" i.e. just the id for the email h:inputtext field.

                Do you know how to achieve this?

                J.

                • 5. issue with h:form prependId=false within rich:datagrid
                  boy18nj

                  using the prependId attribute = false, is the correct way to achieve this. Can you post your whole code for that page?

                  • 6. issue with h:form prependId=false within rich:datagrid
                    balteo

                    Sure. Here it is:

                              <rich:dataGrid value="#{galerieView.sculptures}" var="sculpture" columns="3" styleClass="datagrid-galerie" iterationStatusVar="iterations">

                                            <h:panelGroup rendered="#{!iterations.last}">

                                                <p>

                                                    <pretty:link mappingId="sculptureAction" styleClass="miniature-link">

                                                        <f:param value="#{view.locale.language}"/>

                                                        <f:param value="#{jbm:normaliserURL(sculpture.sculpturei18nMap[view.locale.language].titre)}" />

                                                        <f:param value="#{sculpture.sculptureID}" />

                                                        <h:graphicImage value="#{initParam['com.jeanbaptistemartin.static.url']}/#{sculpture.photoMiniature}" styleClass="miniature-image" alt="#{sculpture.sculpturei18nMap[view.locale.language].titre}, #{sculpture.sculpturei18nMap[view.locale.language].matiere}, #{jbm:renvoyerAnnee(sculpture.annee)}."/>

                                                    </pretty:link>

                                                </p>

                                                <p>

                                                    <pretty:link mappingId="sculptureAction" styleClass="miniature-link-text">

                                                        <f:param value="#{view.locale.language}"/>

                                                        <f:param value="#{jbm:normaliserURL(sculpture.sculpturei18nMap[view.locale.language].titre)}" />

                                                        <f:param value="#{sculpture.sculptureID}" />

                                                        <h:outputText value="#{sculpture.sculpturei18nMap[view.locale.language].titre}, " />

                                                        <h:outputText value="#{sculpture.sculpturei18nMap[view.locale.language].matiere}" />

                                                    </pretty:link>

                                                </p>

                                            </h:panelGroup>

                                            <h:panelGroup rendered="#{iterations.last}" styleClass="bidon">

                                                <p id="sellette">

                                                    <img src="#{facesContext.externalContext.requestContextPath}/images/200x200.gif" class="miniature-image" alt="" onclick="slideUp()"/>

                                                </p>

                                                <div class="formulaireInscriptionSculpture">

                                                    <h:form id="formulaireInscriptionSculpture" prependId="false">

                                                        <ui:include src="WEB-INF/include/formulaire-inscription-sculpture.xhtml"/>

                                                    </h:form>

                                                </div>

                                            </h:panelGroup>

                                            <rich:jQuery name="slideUp" query="slideUp({duration:'slow'});slideDownForm()" selector="#sellette"/>

                                            <rich:jQuery name="slideDownForm" query="slideDown({duration:'slow'})" selector="div.formulaireInscriptionSculpture" />

                                            <rich:jQuery name="slideDownSellette" query="slideDown({duration:'slow'})" selector="#sellette"/>

                                        </rich:dataGrid>

                    • 7. Re: issue with h:form prependId=false within rich:datagrid
                      boy18nj

                      I guess you email is part of formulaire-inscription-sculpture.xhtml.

                       

                      Move the h:form around/outside rich:dataGrid to see what difference it makes.

                       

                      Post the code for formulaire-inscription-sculpture.xhtml

                      • 8. Re: issue with h:form prependId=false within rich:datagrid
                        balteo

                        If I move the h:form outside of the rich:datagrid then I will get the desired behavior. The problem is that I need this h:form to be within the rich:datagrid...

                         

                        formulaire-inscription-sculpture.xhtml is just a list of inputfields one of which is the email.

                         

                        J.

                        • 9. issue with h:form prependId=false within rich:datagrid
                          boy18nj

                          I see this is not working as expected in richfaces 4 final. I guess this is intentional behaviour introuced. Still you can open a new JIRA request.

                           

                           

                          I do see similar issues also has been raised thru jira-

                           

                          https://issues.jboss.org/browse/RF-10397?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

                          https://issues.jboss.org/browse/RF-4137?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel

                          • 10. issue with h:form prependId=false within rich:datagrid
                            balteo

                            Thanks Aman!

                            • 11. issue with h:form prependId=false within rich:datagrid
                              nbelaevski

                              Hi Julien,

                               

                              'prependId' attribte only affects prepending ID of the form itself, but not the IDs of parent naming container components (like rich:dataGrid is). Actually, 'formulaireInscriptionSculpture' is not being added to client id, so it works as expected.

                              • 12. issue with h:form prependId=false within rich:datagrid
                                balteo

                                Hello Nick and thanks for the input,

                                Do you know a way for the name attribute of my input component to be equal to "email" without the Id for the datagrid? (I use jsf 2.0).

                                Thanks in advance,

                                J.

                                • 13. issue with h:form prependId=false within rich:datagrid
                                  nbelaevski

                                  Is it nested in rich:dataGrid?

                                  • 14. issue with h:form prependId=false within rich:datagrid
                                    balteo

                                    Yes it is...

                                    1 2 Previous Next