>From: Mark Shifman <[EMAIL PROTECTED]> > Hi: > When I use the commonsValidator for required on the client side, the name of > the > component > is not being picked up and the alert says "null is required". This happens > with > both h:inputText > and h:selectOneListbox, the only two I have tried. > ><h:inputText id="s_id" size="16" value="#{su_menu.s_id}"> > <s:commonsValidator type="required" server="true" client="true" /> ></h:inputText> >... >function required() { >this[0] = new Array("su_menu:pi", "null is required.", new Function("x", >"return >{}[x];")); >}
You are missing the "arg" attribute containing the description of the field. <h:inputText id="s_id" size="16" value="#{su_menu.s_id}"> <s:commonsValidator type="required" server="true" client="true" arg="My Field Name" /> </h:inputText> Gary > > The server side validation works fine. > I have added the onsubmit and validatorScript as suggested in the web page. > > Am I missing something obvious, like some library? > Thanks in advance. > > mas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >