Can't you use prepareForRender() ?

Norbi

----- Original Message ----- From: "Tim Sawyer" <[EMAIL PROTECTED]> To: "Norbert Sándor" <[EMAIL PROTECTED]>; "Tapestry users" <[email protected]>; "Tim Sawyer" <[EMAIL PROTECTED]>
Cc: "Tim Sawyer" <[EMAIL PROTECTED]>
Sent: Wednesday, June 29, 2005 5:23 PM
Subject: Re: Component Parameters


I thought it should work too - I'm at a loss to work out why it doesn't!

It needs to work this way, rather than the way you suggest, as the parameter passed to encodedUrl is a specific format string. This string is used to set the value of between 3 and 30 other parameters on the class. The encodedUrl value is not stored, but the unpacked values are. This means it's hard to make it work with an abstract property.

Tim.

Norbert Sándor <[EMAIL PROTECTED]> wrote :

Why would you like to have it called? Maybe there is a better solution for
your problem.
(For example: create a public abstract String getEncodedUrl(); in Java

code and use it to access the value bound to the parameter. Or use lazy
initialization for data related to this parameter.)

Besides, for a long time I thought that Tapestry does not allow this kind of

parameter accessor definition, only abstract accessors. But some weeks ago I

saw that it is possible in Tapestry 3 as well, like in your example. The
developers can tell you why this is permitted...
As I know, the setEncodedUrl() in your example is not called by the
framework, instead you can call it to set the value of the parameter's
binding (in this case the method should be abstract).
Of course this is not what you want...

Br,
Norbi

----- Original Message ----- From: "Tim Sawyer" &amp;lang=en">[EMAIL PROTECTED]>
To: &amp;lang=en">[email protected]>
Cc: "Tim Sawyer" &amp;lang=en">[EMAIL PROTECTED]>
Sent: Wednesday, June 29, 2005 4:39 PM
Subject: Component Parameters


> I've just upgraded to Tapestry 4, and a problem I had a few days back > has
> reared it's head again.  I thought I'd understood this.
>
> I have a page, which contains the following:
>
>
> encodedUrl="ognl:visit.chartUrl"/>
>
> The UrlEncodedFlashGraphSmall component is defined as
>
>
>
class="com.company.misconsole.component.flashgraph.UrlEncodedFlashGraphSmall">
>
>
>
> The class for this component has a method, setEncodedUrl which does not
> seem to be being called.
>
> public void setEncodedUrl(String pEncodedUrl)
> {
>  if (AbstractFlashGraph.logger.isDebugEnabled())
>  {
>    AbstractFlashGraph.logger.debug("SetEncodedURL to " + pEncodedUrl);
>  }
>
> -snip-
>
> This debug is not being output, even though it is turned on.
>
> I'm assuming that Tapestry is using it's own internal attribute (like > it > would if I didn't have the set method defined myself). How can I make > it
> run my set method?  This worked in 3.0.2 before I upgraded.
>
> Any thoughts would be appreciated.
>
> Tim.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to