You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Xavier Vanderstukken <xv...@ionicsoft.com> on 2006/01/09 19:53:11 UTC

Null actionform

Sometimes in my application, I call an action by this way :

<html:link action="/list.do" ................

In this case the ActionForm received in my struts action is null, is it 
a way to obtain an empty form instead of a null form? (Of course not by 
using a html:form)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Null actionform

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hi,

I don't know if there is a way to tell Struts to give you an empty
ActionForm, I suspect not, but you can always do it yourself in your
Action:

if (actionForm == null) {
  actionForm = RequestUtils.createActionForm(request, mapping,
mapping.getModuleConfig(), getServlet());
}

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Mon, January 9, 2006 1:53 pm, Xavier Vanderstukken said:
> Sometimes in my application, I call an action by this way :
>
> <html:link action="/list.do" ................
>
> In this case the ActionForm received in my struts action is null, is it
> a way to obtain an empty form instead of a null form? (Of course not by
> using a html:form)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Null actionform

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Good catch Wendy!  I jumped right to trying to get what he asked for and I
didn't even stop to think about WHY he was getting it in the first place
:(

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

On Mon, January 9, 2006 2:15 pm, Xavier Vanderstukken said:
> Wendy Smoak wrote:
>
>>On 1/9/06, Xavier Vanderstukken <xv...@ionicsoft.com> wrote:
>>
>>
>>
>>>Sometimes in my application, I call an action by this way :
>>>
>>><html:link action="/list.do" ................
>>>
>>>In this case the ActionForm received in my struts action is null,
>>>
>>>
>>
>>Null usually means no form bean is associated with the Action.  What
>>does the action mapping in struts-config.xml look like?
>>
>>--
>>Wendy
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
> Nice advice ;-)
> I was missing that attribute in this action
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Null actionform

Posted by Xavier Vanderstukken <xv...@ionicsoft.com>.
Wendy Smoak wrote:

>On 1/9/06, Xavier Vanderstukken <xv...@ionicsoft.com> wrote:
>
>  
>
>>Sometimes in my application, I call an action by this way :
>>
>><html:link action="/list.do" ................
>>
>>In this case the ActionForm received in my struts action is null,
>>    
>>
>
>Null usually means no form bean is associated with the Action.  What
>does the action mapping in struts-config.xml look like?
>
>--
>Wendy
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>  
>
Nice advice ;-)
I was missing that attribute in this action


Re: Null actionform

Posted by Wendy Smoak <ws...@gmail.com>.
On 1/9/06, Xavier Vanderstukken <xv...@ionicsoft.com> wrote:

> Sometimes in my application, I call an action by this way :
>
> <html:link action="/list.do" ................
>
> In this case the ActionForm received in my struts action is null,

Null usually means no form bean is associated with the Action.  What
does the action mapping in struts-config.xml look like?

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org