Tapestry is trying to assign null to your value (when you don't select
a radiogroup nothing is returned). An int can't be null so you can
change your property type to Integer, then it will be null when you
choose nothing. If you want null to represent 0 then write your
setRatingValue method to do that translation.

Josh

On Tue, Apr 29, 2008 at 2:31 PM, algirdas <[EMAIL PROTECTED]> wrote:
>
> If no star is selected and form is submitted, I get an exception
>
>
> org.apache.tapestry.runtime.ComponentEventException
> Failure writing parameter 'value' of component
> Index:ratingfield1.radiogroup: Failure writing parameter 'value' of
> component Index:ratingfield1:
> org.apache.tapestry.ioc.internal.util.TapestryException
>
>
> This happens when parameter that will hold rating value is a number (int)
> and value is 0 (or it would be "not set"), e.g.
>
>
>        @Property
>
>        private int _ratingValue1 = 0;
>
>
>
> This does not happen when parameter is string.
>
>        @Property
>
>        private string _ratingValue1 = "";
>
>
> Any suggestions?
> --
> View this message in context: 
> http://www.nabble.com/T5Components-help---RatingField-exception-tp16970977p16970977.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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

Reply via email to