You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michał 'Gandalf' Stawicki <st...@gmail.com> on 2007/08/08 13:53:07 UTC

tc:in required sign and JS value update

This might sound lame, but if I have an empty required field with
required sign rendered in it (v), how do I make the sign dissappear
after updating input value via JS?

regards,
michał

-- 
Michał Stawicki

stawicki@gmail.com
http://stawicki.jasliska.pl

Re: tc:in required sign and JS value update

Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
Thanks for response!

I know it's evil :( But my case is:

I have some data in tc:sheet and" Submit and validate" button

The fields are initially empty and required (they have to be empty).
In each row I have a checkBox DO NOT PROCESS.

So, if one selects the checkbox it means that he doesn't want to fill
in the inputs => they shouldn't be validated and processed.

So I have written a JavaScript that parses ID of checkbox, calculates
id's of input fields and fills the inputs with some values (so they
can pass validation) but in my logic I know that I should skip checked
rows.

If you know of better solution, let me know :)

regards,
michał


On 08/08/07, Helmut Swaczinna <sw...@wlp-systems.de> wrote:
> Hi Michal,
>
> remove the style class tobago-in-required from the input field after setting
> the value. I think this can be done with
> Tobago.removeCssClass(element, "tobago-in-required");
>
> Regards
> Helmut
>
> ----- Original Message -----
> From: "Michał 'Gandalf' Stawicki" <st...@gmail.com>
> To: "MyFaces Discussion" <us...@myfaces.apache.org>
> Sent: Wednesday, August 08, 2007 1:53 PM
> Subject: tc:in required sign and JS value update
>
>
> > This might sound lame, but if I have an empty required field with
> > required sign rendered in it (v), how do I make the sign dissappear
> > after updating input value via JS?
> >
> > regards,
> > michał
> >
> > --
> > Michał Stawicki
> >
> > stawicki@gmail.com
> > http://stawicki.jasliska.pl
> >
>
>


-- 
Michał Stawicki

stawicki@gmail.com
http://stawicki.jasliska.pl

Re: tc:in required sign and JS value update

Posted by Helmut Swaczinna <sw...@wlp-systems.de>.
Hi Michal,

remove the style class tobago-in-required from the input field after setting 
the value. I think this can be done with
Tobago.removeCssClass(element, "tobago-in-required");

Regards
Helmut

----- Original Message ----- 
From: "Michał 'Gandalf' Stawicki" <st...@gmail.com>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Wednesday, August 08, 2007 1:53 PM
Subject: tc:in required sign and JS value update


> This might sound lame, but if I have an empty required field with
> required sign rendered in it (v), how do I make the sign dissappear
> after updating input value via JS?
>
> regards,
> michał
>
> -- 
> Michał Stawicki
>
> stawicki@gmail.com
> http://stawicki.jasliska.pl
> 


Re: tc:in required sign and JS value update

Posted by Arvid Hülsebus <ar...@atanion.com>.
Evil... updating tc:in controls via JS. Perhaps partial rendering would 
be the way to go.

Did you try to call blur() on the input field? This should trigger the 
necessary event.

Best regards,

Arvid


Michał 'Gandalf' Stawicki wrote:
> This might sound lame, but if I have an empty required field with
> required sign rendered in it (v), how do I make the sign dissappear
> after updating input value via JS?
>
> regards,
> michał
>
>