You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Programozás <pr...@hotmail.com> on 2004/01/21 11:25:25 UTC

component binding

Hello,

I have a component with a parameter "param".
I have defined an accessor method for this parameter: "public abstract Object getParam();".

My accessor method always returns null, but getBinding("param") returns the correct value.
Why is it so?

Thanks,
Norbi

Re: component binding

Posted by Programozás <pr...@hotmail.com>.
Thanks for your help in anticipation!

Part of the .jwc file defining the parameter:
<parameter name="rink" type="package.Rink" direction="in" required="yes" />

Part of the .java file defining the getter method:
public abstract package.Rink getRink();

I think these two lines correspond to my question. No other code is involved
in handling the parameter, in other methods I only try to call getRink().
But getRink() always returns null, getBinding("rink").getObject() returns
the right value. This means that the getter method exisits, I get no
exceptions when I call it.

Although it seems to be not too important, but my code would be much cleaner
and shorter if I could use the getter method. I use Tapestry 3.0b3.

Br,
Norbi

----- Original Message ----- 
From: "Harish Krishnaswamy" <hk...@comcast.net>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, January 21, 2004 10:05 PM
Subject: Re: component binding


> Is it possible to post some code?
>
> -Harish
>
> Programozás wrote:
>
> >The direction is defined as "in", but the getter returns null.
> >
> >N.
> >
> >----- Original Message ----- 
> >From: "Harish Krishnaswamy" <hk...@comcast.net>
> >To: "Tapestry users" <ta...@jakarta.apache.org>
> >Sent: Wednesday, January 21, 2004 1:10 PM
> >Subject: Re: component binding
> >
> >
> >
> >
> >>Tapestry will not automatically define the accessors for "custom"
> >>parameters. You have to specify a direction for your parameter that is
> >>other than "custom" if you want Tapestry to implement the accessors. If
> >>you don't specify a direction, the default is "custom".
> >>
> >>-Harish
> >>
> >>Programozás wrote:
> >>
> >>
> >>
> >>>Hello,
> >>>
> >>>I have a component with a parameter "param".
> >>>I have defined an accessor method for this parameter: "public abstract
> >>>
> >>>
> >Object getParam();".
> >
> >
> >>>My accessor method always returns null, but getBinding("param") returns
> >>>
> >>>
> >the correct value.
> >
> >
> >>>Why is it so?
> >>>
> >>>Thanks,
> >>>Norbi
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: component binding

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Is it possible to post some code?

-Harish

Programozás wrote:

>The direction is defined as "in", but the getter returns null.
>
>N.
>
>----- Original Message ----- 
>From: "Harish Krishnaswamy" <hk...@comcast.net>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Wednesday, January 21, 2004 1:10 PM
>Subject: Re: component binding
>
>
>  
>
>>Tapestry will not automatically define the accessors for "custom"
>>parameters. You have to specify a direction for your parameter that is
>>other than "custom" if you want Tapestry to implement the accessors. If
>>you don't specify a direction, the default is "custom".
>>
>>-Harish
>>
>>Programozás wrote:
>>
>>    
>>
>>>Hello,
>>>
>>>I have a component with a parameter "param".
>>>I have defined an accessor method for this parameter: "public abstract
>>>      
>>>
>Object getParam();".
>  
>
>>>My accessor method always returns null, but getBinding("param") returns
>>>      
>>>
>the correct value.
>  
>
>>>Why is it so?
>>>
>>>Thanks,
>>>Norbi
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: component binding

Posted by Programozás <pr...@hotmail.com>.
That's it! Thanks!
And sorry for not reading the docs properly :)

Norbi

----- Original Message ----- 
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, January 21, 2004 10:41 PM
Subject: Re: component binding


> You are probably using it in a listener.
>
> Please define it as 'auto', rather than 'in' and see if it works.
>
> Best regards,
> -mb
>
> ----- Original Message ----- 
> From: "Programozás" <pr...@hotmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Wednesday, January 21, 2004 10:53 PM
> Subject: Re: component binding
>
>
> > The direction is defined as "in", but the getter returns null.
> >
> > N.
> >
> > ----- Original Message ----- 
> > From: "Harish Krishnaswamy" <hk...@comcast.net>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Wednesday, January 21, 2004 1:10 PM
> > Subject: Re: component binding
> >
> >
> > > Tapestry will not automatically define the accessors for "custom"
> > > parameters. You have to specify a direction for your parameter that is
> > > other than "custom" if you want Tapestry to implement the accessors.
If
> > > you don't specify a direction, the default is "custom".
> > >
> > > -Harish
> > >
> > > Programozás wrote:
> > >
> > > >Hello,
> > > >
> > > >I have a component with a parameter "param".
> > > >I have defined an accessor method for this parameter: "public
abstract
> > Object getParam();".
> > > >
> > > >My accessor method always returns null, but getBinding("param")
returns
> > the correct value.
> > > >Why is it so?
> > > >
> > > >Thanks,
> > > >Norbi
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: component binding

Posted by Mindbridge <mi...@yahoo.com>.
You are probably using it in a listener.

Please define it as 'auto', rather than 'in' and see if it works.

Best regards,
-mb

----- Original Message ----- 
From: "Programozás" <pr...@hotmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, January 21, 2004 10:53 PM
Subject: Re: component binding


> The direction is defined as "in", but the getter returns null.
>
> N.
>
> ----- Original Message ----- 
> From: "Harish Krishnaswamy" <hk...@comcast.net>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Wednesday, January 21, 2004 1:10 PM
> Subject: Re: component binding
>
>
> > Tapestry will not automatically define the accessors for "custom"
> > parameters. You have to specify a direction for your parameter that is
> > other than "custom" if you want Tapestry to implement the accessors. If
> > you don't specify a direction, the default is "custom".
> >
> > -Harish
> >
> > Programozás wrote:
> >
> > >Hello,
> > >
> > >I have a component with a parameter "param".
> > >I have defined an accessor method for this parameter: "public abstract
> Object getParam();".
> > >
> > >My accessor method always returns null, but getBinding("param") returns
> the correct value.
> > >Why is it so?
> > >
> > >Thanks,
> > >Norbi
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: component binding

Posted by Programozás <pr...@hotmail.com>.
The direction is defined as "in", but the getter returns null.

N.

----- Original Message ----- 
From: "Harish Krishnaswamy" <hk...@comcast.net>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, January 21, 2004 1:10 PM
Subject: Re: component binding


> Tapestry will not automatically define the accessors for "custom"
> parameters. You have to specify a direction for your parameter that is
> other than "custom" if you want Tapestry to implement the accessors. If
> you don't specify a direction, the default is "custom".
>
> -Harish
>
> Programozás wrote:
>
> >Hello,
> >
> >I have a component with a parameter "param".
> >I have defined an accessor method for this parameter: "public abstract
Object getParam();".
> >
> >My accessor method always returns null, but getBinding("param") returns
the correct value.
> >Why is it so?
> >
> >Thanks,
> >Norbi
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: component binding

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Tapestry will not automatically define the accessors for "custom" 
parameters. You have to specify a direction for your parameter that is 
other than "custom" if you want Tapestry to implement the accessors. If 
you don't specify a direction, the default is "custom".

-Harish

Programozás wrote:

>Hello,
>
>I have a component with a parameter "param".
>I have defined an accessor method for this parameter: "public abstract Object getParam();".
>
>My accessor method always returns null, but getBinding("param") returns the correct value.
>Why is it so?
>
>Thanks,
>Norbi
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org