You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Matthias Wessendorf <ma...@apache.org> on 2006/10/27 08:46:50 UTC

[Struts-Faces] possible Bug in FormRenderer

Hey,

two things.

a) is this the right place to ask questions on Struts-Faces, or where ?

if so b)

the demos of struts faces show a "portal" which uses links (done w/
JSF-components) to navigate to a tiles pages, which finally contains a
<s:form> based formular. that is the key... ActionForm/Action on the
java side and JSF comp.s on the page side.

Every thing works. A form-submit sends a req. to the action

So far so good...

When I am converting one of my own apps w/ struts-faces I'd like to
stay with <html:link> for linking to form pages (that are using
<s:form>). But ...

since that is a GET request the form renders html like

<form name="fooForm" action="/blub/tilesMasterLayout.do" ...>


(only when using GET / html:link)

so ... a submit causes a 404. Not wondering :)

When I use firebug to change the action attr value to
/blub/tilesMasterLayout.faces every thing works. Action is called.


The action() method in FormRenderer returns in the wrong szenario a .do URL
I think it is not to bad to check agains a struts pattern in that URL
and replace that .do
(if needed) with the jsf pattern (like .faces or add /faces/)

I think this is valid, because the form renders already fine, which
ensures you are inside the FacesContext ...

If you all agree, I'd like to provide the patch for that.

Greetz,
Matt


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

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


Re: [Struts-Faces] possible Bug in FormRenderer

Posted by Matthias Wessendorf <ma...@apache.org>.
> > a) is this the right place to ask questions on Struts-Faces, or where ?
>
>
> It's the right place for dev type questions ... the Struts User list for
> user type questions :-).

:) I was more concerned about "Faces stuff" in Struts-dev ;)
Not sure if that lib will be maintained. ;)


> In other words, you want to use the Struts <html:link> tag in a form
> surrounded by the JSF <s:form> component?  That's very likely not going to

No. the tile which has the <s:form/> uses faces stuff only. That's fine.
I have a "navigation" tile, which *links* to to several tiles pages.

I'd like to use the html:link to *link* to a tile, containing the s:form

> work reliably.  You should stick to one technology or the other for all of
> your view tier tags on any particular page -- either the Struts HTML tags or
> the appropriate JSF component tags.  You are only scratching the surface of
> a lot of problems that will show up trying to mix them.

Right, one technology/framework for the view tier is enough. To be
honest, I have been
faster in porting the struts stuff to *pure* Faces w/ Facelets now.

I think the migration lib is nice, for playing with both, but in
production, you won't be
interesting in really mixing them ;)

-M

> Craig
>
> since that is a GET request the form renders html like
> >
> > <form name="fooForm" action="/blub/tilesMasterLayout.do" ...>
> >
> >
> > (only when using GET / html:link)
> >
> > so ... a submit causes a 404. Not wondering :)
> >
> > When I use firebug to change the action attr value to
> > /blub/tilesMasterLayout.faces every thing works. Action is called.
> >
> >
> > The action() method in FormRenderer returns in the wrong szenario a .do
> > URL
> > I think it is not to bad to check agains a struts pattern in that URL
> > and replace that .do
> > (if needed) with the jsf pattern (like .faces or add /faces/)
> >
> > I think this is valid, because the form renders already fine, which
> > ensures you are inside the FacesContext ...
> >
> > If you all agree, I'd like to provide the patch for that.
> >
> > Greetz,
> > Matt
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

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


Re: [Struts-Faces] possible Bug in FormRenderer

Posted by Craig McClanahan <cr...@apache.org>.
On 10/26/06, Matthias Wessendorf <ma...@apache.org> wrote:
>
> Hey,
>
> two things.
>
> a) is this the right place to ask questions on Struts-Faces, or where ?


It's the right place for dev type questions ... the Struts User list for
user type questions :-).

if so b)
>
> the demos of struts faces show a "portal" which uses links (done w/
> JSF-components) to navigate to a tiles pages, which finally contains a
> <s:form> based formular. that is the key... ActionForm/Action on the
> java side and JSF comp.s on the page side.
>
> Every thing works. A form-submit sends a req. to the action
>
> So far so good...
>
> When I am converting one of my own apps w/ struts-faces I'd like to
> stay with <html:link> for linking to form pages (that are using
> <s:form>). But ...


In other words, you want to use the Struts <html:link> tag in a form
surrounded by the JSF <s:form> component?  That's very likely not going to
work reliably.  You should stick to one technology or the other for all of
your view tier tags on any particular page -- either the Struts HTML tags or
the appropriate JSF component tags.  You are only scratching the surface of
a lot of problems that will show up trying to mix them.

Craig

since that is a GET request the form renders html like
>
> <form name="fooForm" action="/blub/tilesMasterLayout.do" ...>
>
>
> (only when using GET / html:link)
>
> so ... a submit causes a 404. Not wondering :)
>
> When I use firebug to change the action attr value to
> /blub/tilesMasterLayout.faces every thing works. Action is called.
>
>
> The action() method in FormRenderer returns in the wrong szenario a .do
> URL
> I think it is not to bad to check agains a struts pattern in that URL
> and replace that .do
> (if needed) with the jsf pattern (like .faces or add /faces/)
>
> I think this is valid, because the form renders already fine, which
> ensures you are inside the FacesContext ...
>
> If you all agree, I'd like to provide the patch for that.
>
> Greetz,
> Matt
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>