You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinicius Carvalho <ca...@superig.com.br> on 2004/01/19 11:29:19 UTC

Presenting Errors and messages

Hi there! Is there another way to present the messages or erros dropped by 
ActionMessages/ActionErrors, besides the <html:errors>/<html:messages> ?
Like a <bean:write>? If so, what's the name of the bean?

Thanks

Vinicius

	


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


Re[2]: Presenting Errors and messages

Posted by Foux <fo...@foux.net>.
Hello Vinicius,

Monday, January 19, 2004, 7:02:55 PM, you wrote:

VC> Couldn't see your technique ....


.. try to read the email in plain-text instead of in HTML. The tags
might be interpreted in undisplayable HTML tags.

-Foux



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


Re: Presenting Errors and messages

Posted by Vinicius Carvalho <ca...@superig.com.br>.
Couldn't see your technique ....

At 11:05 19/1/2004, you wrote:
>Hello Vinicius,
>
>Monday, January 19, 2004, 11:29:19 AM, you wrote:
>
>VC> Hi there! Is there another way to present the messages or erros dropped by
>VC> ActionMessages/ActionErrors, besides the
>VC> <html:errors>/<html:messages> ?
>VC> Like a <bean:write>? If so, what's the name of the bean?
>
>VC> Thanks
>
>VC> Vinicius
>
>Sure there is another way to present errors instead of using the
>tag (which is quiet annoying in terms of design). For example I'm using a 
>subscription page holding different sections. Therefore I wanted to 
>extract errors according to the form bean properties relative to each 
>section. I've been using this technique:
>    * ......
>with this technique, I can extract errors for each property and also 
>control de presentation. It's working fine for me (I'm using the CVS 
>version of Struts). I hope this will help you. Cheers, Foux 
>--------------------------------------------------------------------- To 
>unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For 
>additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Re: Presenting Errors and messages

Posted by Foux <fo...@foux.net>.
Hello Vinicius,

Monday, January 19, 2004, 11:29:19 AM, you wrote:

VC> Hi there! Is there another way to present the messages or erros dropped by
VC> ActionMessages/ActionErrors, besides the
VC> <html:errors>/<html:messages> ?
VC> Like a <bean:write>? If so, what's the name of the bean?

VC> Thanks

VC> Vinicius

Sure there is another way to present errors instead of using the
<html:error> tag (which is quiet annoying in terms of design).

For example I'm using a subscription page holding different sections.
Therefore I wanted to extract errors according to the form bean
properties relative to each section.

I've been using this technique:

<logic:messagesPresent>
    <ul>
        <logic:messagesPresent property="adminFirstname">
            <html:messages id="error" property="adminFirstname">
                <li class="FormErrorMessage"><bean:write name="error"/></li>
            </html:messages>
        </logic:messagesPresent>

        <logic:messagesPresent property="adminLastname">
            <html:messages id="error" property="adminLastname">
                <li class="FormEactrrorMessage"><bean:write name="error"/></li>
            </html:messages>
        </logic:messagesPresent>

        <logic:messagesPresent property="adminUsername">
            <html:messages id="error" property="adminUsername">
                <li class="FormErrorMessage"><bean:write name="error"/></li>
            </html:messages>
        </logic:messagesPresent>

        <logic:messagesPresent property="adminPassword">
            <html:messages id="error" property="adminPassword">
                <li class="FormErrorMessage"><bean:write name="error"/></li>
            </html:messages>
        </logic:messagesPresent>

        ......
        
    </ul>
</logic:messagesPresent>


with this technique, I can extract errors for each property and also
control de presentation. It's working fine for me (I'm using the CVS version
of Struts).

I hope this will help you.

Cheers,
Foux




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