You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by draegoon Z <dr...@hotmail.com> on 2005/08/03 21:21:36 UTC
Pass errors to tile for popup
I need some code snippets please:
I'm trying to have a page popup a window that will display all the errors in
the first page.
For cleanliness purposes, and modularity, I will use a tile to <insert> this
code.
I will do this either by putting the errors in the session, or by getting
them from a dynamically built <putList>.
So how do I actually access each error in the page (maybe iterate through),
so that I can build my putList or put them in the session.
Thanx :)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Pass errors to tile for popup
Posted by draegoon Z <dr...@hotmail.com>.
Is the only solution a tiles controller?
Ok, I gotta go to my day job. I'll check in this afternoon.
Thanx.
>From: "draegoon Z" <dr...@hotmail.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: user@struts.apache.org
>Subject: RE: Pass errors to tile for popup
>Date: Thu, 04 Aug 2005 00:15:07 +0000
>
>I tried this, but got a null error at the end of the <tile:insert>:
>
><logic:messagesPresent>
>
> <%-- Need to show error popup --%>
> <tiles:insert definition="tile.error_box.insert" flush="false">
>
> <%-- define putList dynamically --%>
> <tiles:putList name="errors">
>
> <%-- iterate through error messages --%>
> <html:messages id="error">
>
> <%-- add error to the list --%>
> <tiles:add value="${error}" direct="true" />
>
> </html:messages>
> </tiles:putList>
> </tiles:insert>
> </logic:messagesPresent>
>
>I could see the value of ${error}, so I'm definitely reading the errors.
>Can this not be done with tiles like this?
>
>Later
>
>>From: "draegoon Z" <dr...@hotmail.com>
>>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>>To: struts-user@jakarta.apache.org
>>Subject: Pass errors to tile for popup
>>Date: Wed, 03 Aug 2005 19:21:36 +0000
>>
>>I need some code snippets please:
>>
>>I'm trying to have a page popup a window that will display all the errors
>>in the first page.
>>For cleanliness purposes, and modularity, I will use a tile to <insert>
>>this code.
>>
>>I will do this either by putting the errors in the session, or by getting
>>them from a dynamically built <putList>.
>>
>>So how do I actually access each error in the page (maybe iterate
>>through), so that I can build my putList or put them in the session.
>>
>>Thanx :)
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Pass errors to tile for popup
Posted by draegoon Z <dr...@hotmail.com>.
I tried this, but got a null error at the end of the <tile:insert>:
<logic:messagesPresent>
<%-- Need to show error popup --%>
<tiles:insert definition="tile.error_box.insert" flush="false">
<%-- define putList dynamically --%>
<tiles:putList name="errors">
<%-- iterate through error messages --%>
<html:messages id="error">
<%-- add error to the list --%>
<tiles:add value="${error}" direct="true" />
</html:messages>
</tiles:putList>
</tiles:insert>
</logic:messagesPresent>
I could see the value of ${error}, so I'm definitely reading the errors.
Can this not be done with tiles like this?
Later
>From: "draegoon Z" <dr...@hotmail.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: struts-user@jakarta.apache.org
>Subject: Pass errors to tile for popup
>Date: Wed, 03 Aug 2005 19:21:36 +0000
>
>I need some code snippets please:
>
>I'm trying to have a page popup a window that will display all the errors
>in the first page.
>For cleanliness purposes, and modularity, I will use a tile to <insert>
>this code.
>
>I will do this either by putting the errors in the session, or by getting
>them from a dynamically built <putList>.
>
>So how do I actually access each error in the page (maybe iterate through),
>so that I can build my putList or put them in the session.
>
>Thanx :)
>
>
>
>---------------------------------------------------------------------
>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