3 Replies Latest reply on Jun 15, 2011 9:58 AM by jonask

    RF4 rich:select no submit without selection(focus) possible?

    jonask

      Hi, i have the follwowing code on my page:

       

      <h:form>
           <rich:popupPanel domElementAttachment="parent" show="false" id="popup" modal="true" autosized="true" resizeable="false" onmaskclick="#{rich:component('popup')}.hide(); return false;">
                <f:facet name="header">
                     <h:outputText value="#{treeBean.popupHeader}" />
                 </f:facet>
                <f:facet name="controls">
                     <h:outputLink value="#" onclick="#{rich:component('popup')}.hide(); return false;">X</h:outputLink>
                 </f:facet>
                 <a4j:outputPanel id="popupContent" layout="block">
                     <h:panelGroup>
                          <fieldset><legend>Details</legend>
                          <h:panelGrid columnClasses="bold" columns="2">
                               <h:outputText value="Name" />
                               <h:inputText id="inputName" value="#{treeBean.newMember.name}"/>
                               <h:outputText value="Alias" />
                               <h:inputText id="inputAlias" value="#{treeBean.newMember.alias}"/>
                               <h:outputText value="Parent_ID" />
                               <rich:select defaultLabel="mach" selectFirst="true" required="false" id="parentIdSelect" enableManualInput="true" value="#{treeBean.selectedParentId}">
                                     <f:selectItem itemValue="0" itemLabel="0 - (Root)"/>
                                    <f:selectItems value="#{treeBean.memberValues}"/>
                               </rich:select>
                               <h:outputText value="Attribute" />
                               <rich:dataTable id="table2" value="#{treeBean.newMember.items}" var="item" width="350px" columnClasses=";columns;columns;columns" rows="15">
                                    <rich:column>
                                         <f:facet name="header">
                                              <h:outputText value="AttributBezeichnung" />
                                         </f:facet>
                                         <h:outputText layout="block" value="#{item.attributBezeichnung}" />
                                    </rich:column>
                                    <rich:column>
                                         <f:facet name="header">
                                              <h:outputText value="AttributWert" />
                                        </f:facet>
                                                   <h:inputText layout="block" value="#{item.attributWert}"/>
                                              </rich:column>
                                         </rich:dataTable>
                                    </h:panelGrid>
                               <!-- execute="@this,inputName,inputAlias,parentIdSelect,"  -->
                               <a4j:commandButton action="#{treeBean.invokePopupAction}" oncomplete="#{rich:component('popup')}.hide(); return false;" id="saveMemberButton" value="speichern" render="tree,saveButton,undoButton,calendar"/>
                          </fieldset>
                     </h:panelGroup>
                </a4j:outputPanel>
           </rich:popupPanel>
      </h:form>
      

       

      when i now call the popup and edit a value in the datatable and click save nothing happends..

      when i only select (focus) the select box before i click submit it works... when i use it without the select box it works too...

       

      Why do i have to focus it? i used "@this,inputName,inputAlias,parentIdSelect," etc. before i used an own form, but i didnt mange it for the datatable which can have 0-n inputFields which have no id...

       

      Maybe someone knows a solution! Thanks.