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 > > > > > > > html template, but I want > > > > > > > to keep all my specifications in the > > > component > > > > > > > specification. Its just the > > > > > > > philosophy we chose for our project. > > > > > > > > > > > > > > On 7/24/06, Shing Hing Man > > > <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > > > > > > > > > > I think you have left out the delegate > > > > > attribute > > > > > > > in > > > > > > > > the Form component. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Form.html > > > > > > > > > > > > > > > > Shing > > > > > > > > > > > > > > > > > > > > > > > > --- Rui Pacheco > <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > > > > > > Here they go: > > > > > > > > > > > > > > > > > > This is my .jwc: > > > > > > > > > <?xml version="1.0" > encoding="UTF-8"?> > > > > > > > > > <!DOCTYPE component-specification > PUBLIC > > > > > > > "-//Apache > > > > > > > > > Software > > > > > > > > > Foundation//Tapestry Specification > > > 4.0//EN" > > > > > " > === message truncated === Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Cumprimentos, Rui Pacheco