Do you have an example? I never have use a converter, is code in the JSP? What about the second question, do you know how to do it?
On 8/15/07, Simon Lessard <[EMAIL PROTECTED]> wrote: > > Hello Daniel, > > What you want to do is not the responsibility of validators, but > converter's. What you need is a simple converter that will do a > .toUpperCase() in getAsObject(). However, if you want to respect the inverse > property of getAsObject() vs. getAsString() you'll have to also use > toUpperCase() in getAsString() and also make sure that your bean always > contains an uppercase default value (or null). > > > Regards, > > ~ Simon > > On 8/15/07, Volker Weber <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > i don't understand the first question. You can use getTipFeriado() on > > the bean instance > > independent of the readonly status of the ui component. > > When the ui component is readonly the value will not change. > > > > for the second question try: > > > > ((EditableValueHolder)uiComponent).setSubmittedValue( > > uiComponent.getSubmittedValue().toUpperCase()) > > > > in your validate method. > > > > > > Regards, > > Volker > > > > 2007/8/15, daniel ccss < [EMAIL PROTECTED]>: > > > > > > Hi all, I have 2 questions: > > > > > > Question1: > > > > > > In my JSP I have: > > > > > > .... > > > <td class="td-contenido" colspan="2"> > > > <h:selectOneMenu > > > value="#{DiaFeriadoBean.tipFeriado }" readonly="true"> > > > <f:selectItems > > > value="#{ DiaFeriadoBean.tiposFeriadosSelect}" /> > > > </h:selectOneMenu> > > > </td> > > > ..... > > > > > > And In the DiaFeriadoBean the value of tipFeriado property is 0, I > > tried > > > with disabled = true, but is the same, If I quit the reaonly="true" > > then I > > > can get the value, My question is how can I get the value of a > > property that > > > is read only? > > > > > > Question2: > > > > > > I use custom validators, and I need one to pass the value that the > > user > > > enter to UpperCase: > > > > > > public class TextValidator implements Validator { > > > ..... > > > > > > public void validate(FacesContext facesContext, UIComponent > > uIComponent, > > > Object value) throws ValidatorException{ > > > ... > > > > > > What I need is that in this validate method change the value of the > > > component to UpperCase, I have a javascript to do that, but I also > > want to > > > have it on a validator method, how can I set the value of the > > component to > > > the same value but toUpperCase something like uIComponent = > > > value.toUpperCase. > > > > > > Regards, > > > > > > Daniel > > > >