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"
> "
> > > > >
> > > >
> > >
> >
>
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
> > > > > <component-specification
> > > > >
> class="pt.te.universal.components.login.Login"
> > > > > allow-body="no"
> allow-informal-parameters="no">
> > > > >
> > > > >     <component id="form" type="Form">
> > > > >         <binding name="listener"
> > > > > value="listeners.doLogin"/>
> > > > >     </component>
> > > > >
> > > > >     <component id="uname" type="TextField">
> > > > >          <binding name="value"
> > > value="ognl:uname"/>
> > > > >          <binding name="validators"
> > > > > value="validators:required"/>
> > > > >     </component>
> > > > >
> > > > >     <component id="password"
> type="TextField">
> > > > >         <binding name="value"
> > > > > value="ognl:password"/>
> > > > >          <binding name="hidden"
> > > value="ognl:true"/>
> > > > >          <binding name="validators"
> > > > > value="validators:required"/>
> > > > >     </component>
> > > > >
> > > > >     <asset name="submit"
> > > > > path="imagens/botao_ok_up.gif"/>
> > > > > </component-specification>
> > > > >
> > > > > This is my .java:
> > > > > public abstract class Login extends
> > > > > AbstractBaseComponent {
> > > > >
> > > > >     public abstract String getUname();
> > > > >     public abstract String getPassword();
> > > > >
> > > > >
> > > > >     public void doLogin(IRequestCycle
> cycle){
> > > > >
> > > > >         System.err.println(getUname());
> > > > >     }
> > > > > }
> > > > >
> > > > > This is my .html:
> > > > > <table width="100%" border="0"
> cellspacing="0"
> > > > > cellpadding="2">
> > > > >     <tr><td class="titulo">Login</td></tr>
> > > > >     <tr><td><input type="text"
> style="FONT-SIZE:
> > > > > 9px; WIDTH: 100px; HEIGHT:
> > > > > 19px" jwcid="uname"/></td></tr>
> > > > >     <tr><td
> class="titulo">Password</td></tr>
> > > > >     <tr><td width="81%"><input
> jwcid="password"
> > > > > type="password"
> > > > > style="FONT-SIZE: 9px; WIDTH: 100px; HEIGHT:
> > > > > 19px"/></td></tr>
> > > > >     <tr><td width="81%"><input type="image"
> > > jwcid="
> > > > > [EMAIL PROTECTED]"
> > > > > width="23" height="17"
> > > > > image="asset:submit"/></td></tr>
> > > > > </table>
> > > > >
> > > > > On 7/24/06, Shing Hing Man
> <[EMAIL PROTECTED]>
> > > wrote:
> > > > > >
> > > > > > I have no problem with validators for a
> > > TextField
> > > > > > within a custom component.
> > > > > >
> > > > > > You might like  to post your component's
> > > .java,
> > > > > .jwc.
> > > > > > and .html  and see if anyone in the list
> can
> > > help.
> > > > > >
> > > > > > Shing
> > > > > >
> > > > > >
> > > > > > --- Rui Pacheco <[EMAIL PROTECTED]>
> wrote:
> > > > > >
> > > > > > > Hi all
> > > > > > >
> > > > > > > I've been knocking my head on the wall
> > > trying to
> > > > > > > find whats wrong here, and
> > > > > > > I can't see anything.
> > > > > > >
> > > > > > > I have a set of fields, inside a form,
> in an
> > > > > html
> > > > > > > snippet I defined as a
> > > > > > > component. I created a html file that
> > > contains
> > > > > just
> > > > > > > a snippet of that file,
> > > > > > > a .jwc file that contains the definition
> for
> > > the
> > > > > > > elements inside the
> > > > > > > template and a corresponding class.
> > > > > > >
> > > > > > > Everything works fine, except for
> > > Validators.
> > > > > > >
> > > > > > > I the .jwc file I defined my fields as
> being
> > > > > > > required, but there is no
>
=== 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]




--
Cumprimentos,
Rui Pacheco

Reply via email to