Re: Struts 2.1 validation with annotations

2009-02-20 Thread billgloff

I have the same exact problem now after upgrading to 2.1.

I have the following model-driven validation defined (which works fine in
2.0):

@VisitorFieldValidator(message="")

Now I get the same exception as above when validation fails.

If I add in any kind of text into the message param, it works but looks ugly
since it spits out that message along with the field message. So I get
something like this underneath my textfield

"My default messageLast Name cannot be blank or contain invalid characters"

Any ideas about what is going on here?

Thanks.



sheltonn wrote:
> 
> It is null.  Can you point me in the direction of what I am missing?
> 
>  
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Shelton Consulting, LLC
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
> 
> 
> 
> 
> 
> From: Musachy Barroso 
> To: Struts Users Mailing List 
> Sent: Thursday, February 19, 2009 3:45:35 PM
> Subject: Re: Struts 2.1 validation with annotations
> 
> It seems like the default message for that validator is null. Try
> adding a break point to ValidatorSupport:getMessage and see if the
> defaultMessage is null.
> 
> musachy
> 
> On Thu, Feb 19, 2009 at 3:31 PM, Norris Shelton 
> wrote:
>> validateObject
> 
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
>   
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1-validation-with-annotations-tp22109064p22124783.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: S2 Cannot get Submit button body to render as label...

2007-09-26 Thread billgloff

Laurie,

As you can see above in my sample code, I am already setting the
type="button" as you have suggested and I have also verified that the html
getting rendered is a  and not .

Can you try it for yourself as see if you can get it to work?

Maybe I will have to write up a bug report for this.

Thanks,
Bill



Laurie Harper wrote:
> 
> billgloff wrote:
>> Using the button element in normal HTML you can do the following:
>> 
>> 
>><img src="/images/icons/tick.png" alt=""/>  Save
>>  
>> 
>> which gives you an icon along with the label on the button itself.
>> 
>> When I attempt to try the same thing using S2 tags e.g.
>> 
>>   
>> 
>><img src="/images/icons/tick.png" alt=""/>  Save
>> 
>> 
>> 
>> is gets rendered in the following way:
>> 
>> <img src="/images/icons/tick.png" alt=""/>Save 
>> 
>> Submit
>> 
>> I also have tried using the following inside the body with no luck.
>> 
>> 
>>   <img src="/images/icons/tick.png" alt=""/>  Save
>>  
>> 
>> How can I add an icon to my button?
>> I do not understand why any text in the tag body gets pushed out to the
>> front of the tag. 
>> 
>> Thanks for any help on this!
> 
> s:submit is rendering an  the behaviour you're seeing is expected. If you want a button element, 
> set 's 'type' attribute to 'button', as listed in the tag docs 
> [1].
> 
> L.
> 
> [1] http://struts.apache.org/2.x/docs/submit.html
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/S2-Cannot-get-Submit-button-body-to-render-as-label...-tf4517330.html#a12902359
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



S2 Cannot get Submit button body to render as label...

2007-09-25 Thread billgloff

Using the button element in normal HTML you can do the following:


     Save
 

which gives you an icon along with the label on the button itself.

When I attempt to try the same thing using S2 tags e.g.

 
     Save   



is gets rendered in the following way:

Save

Submit

I also have tried using the following inside the body with no luck.


    Save
 

How can I add an icon to my button?
I do not understand why any text in the tag body gets pushed out to the
front of the tag. 

Thanks for any help on this!
-- 
View this message in context: 
http://www.nabble.com/S2-Cannot-get-Submit-button-body-to-render-as-label...-tf4517335.html#a12885678
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



S2 Cannot get Submit button body to render as label...

2007-09-25 Thread billgloff

Using the button element in normal HTML you can do the following:


     Save
 

which gives you an icon along with the label on the button itself.

When I attempt to try the same thing using S2 tags e.g.

 
     Save   



is gets rendered in the following way:

Save

Submit

I also have tried using the following inside the body with no luck.


    Save
 

How can I add an icon to my button?
I do not understand why any text in the tag body gets pushed out to the
front of the tag. 

Thanks for any help on this!
-- 
View this message in context: 
http://www.nabble.com/S2-Cannot-get-Submit-button-body-to-render-as-label...-tf4517330.html#a12885672
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]