You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2004/09/15 17:35:58 UTC
Validation and Tiles
I am using tiles; a bar on the top, a pane on the left
hand side, and a bar at the bottom of all web pages.
I am also using the Struts validation to validate the
form submitted.
When users do not fill out forms as required, we have
a "page" shown in the browser that shows the errors
for all invalid entries and the form per se. However,
this page does not have other pieces of tiles
surrounded.
Am I doing anything wrong so that other tiles do not
show up. Or there is a way to get it to work.
Need your brilliant ideas, please.
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation and Tiles
Posted by josh <jo...@ink.org>.
I may be assuming too much, but you didn't give me any of your xml files
to look at so this is the best I can do. One thing you might be doing
wrong is in your struts-config. You need to make sure that your input
parameter in your action mapping points to the tiles definition for you
page, and not the content jsp. When the validation.xml finds errors it
returns you to the "input" page after populating the errors bean.
Example:
############ Struts-config.xml
#snip
<action path="/loginAction"
type="org.app.actions.LoginAction"
name="loginForm"
input="/WEB-INF/templates/login.jsp"
scope="request">
<forward name="timeout"
path="/WEB-INF/templates/login.jsp"
redirect="false"/>
</action>
#snip
#################login.jsp
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %>
<tiles:insert definition="LayoutDef">
<tiles:put name="title" type="string" value="Login"/>
<tiles:put name="content" value="/WEB-INF/templates/loginContent.jsp"/>
</tiles:insert>
I'm leaving out the validation stuff because I you must have it right if
it is detecting the errors and sending you someplace.
Hope this helps.
josh
On Wed, 2004-09-15 at 10:35, Caroline Jen wrote:
> I am using tiles; a bar on the top, a pane on the left
> hand side, and a bar at the bottom of all web pages.
>
> I am also using the Struts validation to validate the
> form submitted.
>
> When users do not fill out forms as required, we have
> a "page" shown in the browser that shows the errors
> for all invalid entries and the form per se. However,
> this page does not have other pieces of tiles
> surrounded.
>
> Am I doing anything wrong so that other tiles do not
> show up. Or there is a way to get it to work.
>
> Need your brilliant ideas, please.
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
--
Joshua Cronemeyer
***********************