Have a look at the FormFragment component and the TriggerFragment mixin
for the Radio and Checkbox components. This is basically what you want. It
just hides the fragment of the form completely from the user instead of
disabling it.

Uli

Am Di, 30.09.2008, 16:27, schrieb Russell Brown:
>
> Thanks guys,
> Like I said in the initial post: I am doing this on the client side,
> because I have to.
>
> Doing it on the clientside involves jumping through some hoops. Namely,
> inject the component to get its id and then add some javascript to the
> page using RenderSupport. No problem. It iss done... but I am just
> wondering aloud on the list why I need to jump through the hoops. Why
> tapestry 5 has this feature that costs me a lot to circumvent and benefits
> me very little? I'd just like to know in what cases there is a benefit to
> this behavior so that I don't feel like I am being made to suffer (just
> like I used to in struts)
>
> Cheers
> Russell
>
> -----Original Message-----
> From: Kristian Marinkovic [mailto:[EMAIL PROTECTED]
> Sent: Tue 9/30/2008 2:55 PM
> To: Tapestry users
> Subject: Re: T5: t:select how to disable and re-enable
>
> it is not enough to enable the select box only on the client site.
> because if you render a select component with disabled="true"
> tapestry wont even "register" the necessary event handler to
> process the submission.
>
> in tapestry 5 words: no ProcessSubmission component
> event will be serialized into the form thus no values will be
> processed. :)  (see Select->AbstractField component source code)
>
> i see two possibilities: as mentiond by andy do everything on the
> client side or do a ajax request (zone) updatind the select component
> with disabled="false".
>
> g,
> kris
>
>
>
>
>
> Andy Pahne <[EMAIL PROTECTED]>
> 30.09.2008 15:45
> Bitte antworten an
> "Tapestry users" <users@tapestry.apache.org>
>
>
> An
> Tapestry users <users@tapestry.apache.org>
> Kopie
>
> Thema
> Re: T5: t:select how to disable and re-enable
>
>
>
>
>
>
>
>
> Maybe it's possible that you disable your select only clientside?
> If you do so there won't be any problems if you later on enable it again.
>
> Andy
>
>
> Russell Brown schrieb:
>> Hi,
>> I am using a T5 select component. When the form renders I wish the
> select to be disabled so I use disabled="true" parameter. However, some
> javascript causes the field to become enabled. If this happens however the
> value selected does not get sent into the property of the component. I am
> assuming this is thanks to the "feature" decribed here
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
> thussly :
>>
>> "If true, then the field will render out with a disabled attribute (to
> turn off client-side behavior). Further, a disabled field ignores any
> value in the request when the form is submitted. "
>>
>> So how to set the select value to disabled initially but not make it
> stay that way for ever?
>>
>> Thanks in advance for your ideas, I have resorted to adding a little
> javascript that sets it so on load but that is a bit of hack for some
> fairly simple functionality.
>>
>> Any reason WHY "Further, a disabled field ignores any value in the
> request when the form is submitted." this seems to offer zero advantage
> and loads of problems
>>
>> Cheers
>>
>> Russell
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to