0 Replies Latest reply on Mar 19, 2009 4:22 PM by cfoushee.carey.foushee.cc

    Creating new EntityHome automatically when loading page, but its never managed.

    cfoushee.carey.foushee.cc
      I have overriden the creatInstance in my ActionHome to default the actiontype to my default, and I want to simply click on my s:button from one page and have that open my ActionEdit.xhtml page with the newly created Action already for an update, but the actionHome is not maanged when I do.  Whats the best approach for this?


      I tried adding a factory to a new component (actionBean) but when I put the actionBean.component_value_name it didn't work.



      <f:facet name="header">#{actionHome.managed ? 'Edit' : 'Add'} Action</f:facet>
                 
           <s:decorate id="emailAddressField" template="layout/edit.xhtml">
                      <ui:define name="label">Email Address:</ui:define>
                      <h:inputText id="emailAddress"
                                    value="#{actionHome.instance.emailAddress}"
                                    required="true" style="height : 44px; width : 352px;">
                              <f:validator validatorId="emailValidator"/>
                                   <a:support event="onblur" reRender="emailAddressField"/>
                </h:inputText>
                  </s:decorate>



      @Override
           protected Action createInstance() {
                Action action = new Action();
                action.setActiontype(new Actiontype(0));
                return action;
           }