> Hi! I converted a page from struts to jsf, and I'm running to no end of
> problems using it.
>
> I previously posted a question about getting LookupDispatchActions to
> work. Since I received no replies and couldn't figure it out for myself,
> I made a new action that is specific to this page.
>
> Now the page is nothing special, jsut a lof of text-fields and a submit
> button. So part of it looks like this:
>
> <s:form action="/event">
> <label>Start of Problem</label>
> <h:inputText id="problemStart"
> value="#{equipment.problemStart}"/><br/>
> <h:commandButton id="submit" type="submit"
> value="#{messages['button.insertEvent']}" immediate="false">
> </h:commandButton>
> </s:form>
>
> In the struts-config file, the action maps an anctionform with the name
> "equipment" to the "/event" action.
> Now, the action is executed all right, but the form that is sent to the
> action is completely empty. Every field is null. Does anyone have any
> idea why this happens and how to fix it?
>
It sounds like you are not returning an ActionForward from your action execute
method. Make sure that you have a forward configured under your action or a
global forward. Returning null will result in a blank page.
<action path="/event" type="com.acme.MyAction">
<forward name="success" path="/event.faces" />
</action>
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
return mapping.findForward("view");
}
Gary
> Besides, I can't execute any action when I access the page
> "event.faces". When I enter event.faces into the address bar, the page
> loads correctly, but the action is not performed. When I enter event.do
> into the address bar, I land on the event page and the event is executed
> when the form is submitted.
>
>
> --
> Markus Koivisto
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]