If I click submit without entering a username and password, both will be marked by two red asterisks. Any blank text filed is marked with two asterisks.
I noticed that that in your earlier post, the .html of the Login component does not have the form component defined in Login.jwc. So in my Login.html, I wrap your table by <span jwcid="form"> Shing --- Rui Pacheco <[EMAIL PROTECTED]> wrote: > So, when you DONT insert a username and password and > press submit, he gives > a warning about the missing values? > > On 7/24/06, Shing Hing Man <[EMAIL PROTECTED]> wrote: > > > > I have tested your Login component (in the case > > extending BaseComponent and then extending > > AbstractBaseComponent) and there is no problem > with > > the validator. > > > > Shing > > > > > > > > --- Rui Pacheco <[EMAIL PROTECTED]> wrote: > > > > > I just tried to make my class extend > BaseComponent > > > and nothing happened. > > > > > > This is the source for the base class I use for > all > > > my components. Its > > > pretty straightforward and since all components > are > > > DB aware, I handle all > > > the db logistics in here. But still, I cannot > see > > > how this could fail to > > > affect my validators. > > > > > > public abstract class AbstractBaseComponent > extends > > > BaseComponent implements > > > Serializable { > > > > > > protected DataSource ds; > > > protected Connection conn; > > > protected PreparedStatement stmt; > > > protected ResultSet rs; > > > > > > > > > > > > > > > @InjectObject("service:Configuration.ConnectionPool") > > > public abstract DataSource getDataSource(); > > > > > > > > > public ResultSet executeQuery(String query){ > > > > > > try{ > > > ds = getDataSource(); > > > conn = ds.getConnection(); > > > > > > stmt = conn.prepareStatement(query); > > > > > > rs = stmt.executeQuery(); > > > > > > }catch(Exception e){ > > > println(e.getMessage()); > > > } > > > return rs; > > > } > > > > > > protected void print(Object msg){ > > > System.err.print(msg.toString()); > > > } > > > > > > protected void println(Object msg){ > > > System.err.println(msg.toString()); > > > } > > > } > > > > > > On 7/24/06, Shing Hing Man <[EMAIL PROTECTED]> > wrote: > > > > > > > > To narrow down your problem, you could make > the > > > java > > > > class of your component extends BaseComponent > > > directly > > > > (if possible) and > > > > see whether the validator works. > > > > Also, it might be a good idea to post the code > of > > > your > > > > > > > > AbstractBaseComponent (if it is reasonably > short). > > > > > > > > Shing > > > > > > > > --- Rui Pacheco <[EMAIL PROTECTED]> wrote: > > > > > > > > > I didn't override any methods, although > calling > > > > > super could be usefull. > > > > > > > > > > On 7/24/06, Shing Hing Man > <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > I do not know whether the following helps. > > > > > > In your custom class > AbstractBaseComponent, > > > if > > > > > you > > > > > > have over ridden any methods of its parent > > > > > > BaseComponent, please check if you need to > do > > > a > > > > > > super().(overRidden method). > > > > > > > > > > > > Shing > > > > > > > > > > > > --- Rui Pacheco <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > My component extends > AbstractBaseComponent. > > > Its > > > > > a > > > > > > > class I created to work as > > > > > > > a parent for all my components. That way > I > > > can > > > > > use > > > > > > > inheritance to customize > > > > > > > my components at will. > > > > > > > > > > > > > > AbstractBaseComponent itself extends > > > > > BaseComponent. > > > > > > > > > > > > > > On 7/24/06, Shing Hing Man > > > <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > > > > > > > > > > Oops ! What I said about the missing > > > delegate > > > > > is > > > > > > > > rubbish. The validator should work > without > > > it. > > > > > (I > > > > > > > have > > > > > > > > tested it.) > > > > > > > > > > > > > > > > There should not be any difference > > > whether a > > > > > > > > component > > > > > > > > is defined explicitly (in jwc or > .page) > > > or > > > > > > > implicitly > > > > > > > > (in .html). > > > > > > > > > > > > > > > > The java class of your component > extends > > > > > > > > AbstractComponent. > > > > > > > > I thought if your component has a html > > > > > tmeplate, > > > > > > > you > > > > > > > > need to extend from BaseComponent. > > > > > > > > (But then James has said it works for > > > him.) > > > > > > > > > > > > > > > > Shing > > > > > > > > --- Rui Pacheco > <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > > > > > > I am looking at another project > where I > > > > > defined > > > > > > > the > > > > > > > > > form inline in the HTML > > > > > > > > > and it worked without it. I just > defined > > > a > > > > > form > > > > > > > as > > > > > > > > > <form jwcid="[EMAIL PROTECTED]"> > > > > > > > > > and had no problems. > > > > > > > > > > > > > > > > > > Whats the difference between > declaring > > > the > > > > > form > > > > > > > > > properties inline and in the > > > > > > > > > component specification, why does it > > > work in > > > > > one > > > > > > > > > instance and not on the > > > > > > > > > other? > > > > > > > > > > > > > > > > > > I know I could put the form > > > specification in > > > > > the > === message truncated === Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]