I try to use s:button with action attribute and i use EntityHome class: 
xml-declarations kinds in components.xml:

  | <factory name="myEntity" value="#{myEntityHome.instance}"/>
  |     <fwk:entity-home name="myEntityHome" 
  |                      entity-class="com.mycompany.MyEntity"                  
   
  |                      entity-manager="#{entityManager}"/>    
  | 
With s:button action-attribute i assign following:
<s:button action="#{myEntityHome.persist}" view="/myPage.xhtml" value="Create" 
/>
Also I have following form:

  |     <s:validateAll>
  |         <div>
  |             <table>
  |                 <tr>
  |                     <td><h:outputLabel 
value="#{messages['common.name']}"/></td>
  |                     <td><s:decorate><h:inputText 
value="#{myEntity.name}"/></s:decorate></td>
  |                 </tr>
  |                 <tr>
  |                     <td><h:outputLabel 
value="#{messages['common.description']}"/></td>
  |                     <td><h:inputText value="#{myEntity.description}"/></td>
  |                 </tr>
  |             </table>
  |         </div>
  |     </s:validateAll>
  | 
But I get entity with empty fields in my database, when I click on the button. 
All works well, if I use <h:commandButton ... />

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994742#3994742

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994742
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to