0 Replies Latest reply on Nov 26, 2007 12:27 PM by rhancke

    Field is renderized in a wrong form place

    rhancke

      Richfaces users,

      According to the code below, after I select an option on the list, an onchange event is triggered, renderizing the input field name.
      All works fine except that the field name is renderized as the first field in form.
      Why the field name has not been renderized after field choose, respecting the page structure?

      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
       <table>
       <form jsfc="h:form">
       <tr>
       <td>
       <table>
       <tr>
       <td>Choose:</td>
       <td>
       <select jsfc="h:selectOneMenu" id="option" value="#{myBean.option}" label="Choose:">
       <f:selectItem itemLabel="select ..." itemValue="0"/>
       <f:selectItem itemLabel="Option1" itemValue="1" />
       <f:selectItem itemLabel="Option2" itemValue="2" />
       <f:selectItem itemLabel="Option3" itemValue="3" />
       <a4j:support event="onchange" reRender="nameArea" />
       </select>
       </td>
       </tr>
       <a4j:outputPanel id="nameArea">
       <h:outputText rendered="#{!empty myBean.option}">
       <tr>
       <td>Name:</td>
       <td>
       <input type="text" jsfc="h:inputText" id="name" value="#{myBean.name}" size="30" />
       </td>
       </tr>
       </h:outputText>
       </a4j:outputPanel>
       </table>
       </td>
       </tr>
       </form>
       </table>
      </html>