If you want to see if your field is empty and you don't want to use the required attribute, could you make your own converter? I'm thinking that you could catch in their that the field was empty and throw a message there. I don't know, but maybe that would work for you.
--- Heath Borders <[EMAIL PROTECTED]> wrote: > No, the submittedValue is null, no validators will > ever be fired. > > On Apr 8, 2005 10:13 AM, Borja Mart�n > <[EMAIL PROTECTED]> wrote: > > > > Heath Borders wrote: > > > > > This is a known issue with the JSF spec. The > spec says that for any > > > UIInput if the submittedValue is null, > validation should not be > > > called. There's nothing that we can do about it > if we want to remain > > > standards compliant. > > > > > then suppose I have a value that I should handle > throughtout the whole > > application but cannot use sessions for this (for > example a selected id > > of a newsitem in a editor) > > then if use the 'required' attribute I cannot > retrieve it as the model > > updating phase comes after the validating one. > > But if I use my own validator I can get this > variable and validate the > > field value as I want(including if was empty or > not) > > > > > > > > On Apr 8, 2005 9:59 AM, *Borja Mart�n* > <[EMAIL PROTECTED] > > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > > > hi, > > > I have seen that my own validator method isnt > called when the field > > > value is empty(I'm making this to be able to get > some sent form values > > > during the validation). I have this: > > > > > > ... > > > <h:inputText id="title" value="#{news.title}" > > > validator="#{news.validateTitle}" /> > > > <h:message for="title" /> > > > ... > > > > > > and in the NewsForm class: > > > ... > > > public void validateTitle(FacesContext context, > UIComponent comp, > > > Object > > > obj) > > > { > > > throw new ValidatorException( > > > new FacesMessage("just testing the method is > called")); > > > } > > > > > > as you can see the method should send the a > validatorexception > > > whenever > > > the form is sent(just for testing purposes). > well, if the field is > > > totally blank it isnt called, but when it > contains at least one > > > character it is. > > > > > > Maybe that has something to do with what we > talked before about that > > > previously blank fields where handled as empty > strings and now as null > > > values... > > > > > > thanks in advance > > > > > > > > > > > > > > > -- > > > -Heath Borders-Wing > > > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > > > > > -- > -Heath Borders-Wing > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail

