Just bind the 'disabled' parameter of your submit to a property
and get/set that property according to your conditions...

On Tue, Mar 18, 2008 at 2:00 PM, Grigoris Ioannou
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  I have a Submit button in my form that I want to have disabled and to only
>  be disabled if the form does not contain any errors and the form is not
>  rewinding.
>
>  So, what I would like to do is (I assume)
>  public void pageBeginRender(PageEvent event) {
>    disable button ???
>  }
>
>  if (!delegate.getHasErrors()) {
>   enable button ???
>  }
>
>  Is this possible? I looked at the tapestry API and I found code similar to
>
>  Submit reservationButton = (Submit) getComponent("submitReservationButton");
>  IBinding b = (IBinding) component.getBinding("disabled");
>
>  but I cant set a new value (i.e. "ognl:false") to the button. How to do it?
>  Any help would be appreciated
>
>  Grigoris
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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

Reply via email to