Skip to Content
0
Former Member
Aug 11, 2005 at 07:55 AM

Cannot catch an event

14 Views

My code:

-


<hbj:form id="myFormId" >
  <hbj:inputField id="firstname" type="string" design="standard" />
 <hbj:button id="submitButtom" onClick="edit" text="send" tooltip="send" width="100" design="emphasized" />
</hbj:form>

DynaPage

-


....
   public void doProcessBeforeOutput() throws PageException {
      if (state == WELCOME_STATE) {
          setJspName("welcome.jsp");
      } else {
          setJspName("edit.jsp");
      }
   }

   public void onEdit(Event event) throws PageException {
        state = EDIT_STATE;
        InputField firstNameField = (InputField) getComponentByName("firstname");
        IPortalComponentRequest request = (IPortalComponentRequest) getRequest();
        request.putValue("firstname", firstNameField.getValue().toString());
   }

But my state is always WELCOME_STATE

Method doProcessAfterInput() doesn't work too.

What is wrong?