You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeevan Bihari <je...@yahoo.com> on 2003/05/19 21:38:19 UTC

RadioPropertySelectionRenderer error

Hi All,

  I'm trying to use the RadioPropertySelectionRenderer in a PropertySelection component. The page
has the following:

<select jwcid="inputData@PropertySelection" value="ognl:searchData" model="ognl:engine.dataModel"
renderer="org.apache.tapestry.form.RadioPropertySelectionRenderer"/>

When I run my web app containing the above page, I get the following error:

"Unable to set property renderer of component testPage/inputDate from
StaticBinding[org.apache.tapestry.form.RadioPropertySelectionRenderer].
Parameter renderer (org.apache.tapestry.form.RadioPropertySelectionRenderer) does not implement
interface org.apache.tapestry.form.IPropertySelectionRenderer."

But that's not the case as the Tapestry framework Source code shows that
RadioPropertySelectionRenderer DOES implement IPropertySelectionRenderer. Any idea what I might be
doing wrong to get this error message ?

Thanks,
Jeevan

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: Current URL

Posted by Mindbridge <mi...@yahoo.com>.
Hi,

    I think you are looking for in the case you describe is the name of the
page that is currently being rendered. You can get this in the following
way:
        getPage().getPageName()


    In case you still want the URL (be careful though -- many different URLs
may theoretically render the same page), you can do:
        IRequestCycle cycle = getPage().getRequestCycle(); // this is
usually unnecessary, since cycle is usually passed as an argument to the
method
        IRequestContext context = cycle.getRequestContext();
        String uri = context.getRequestURI();
        String url = context.getRequest().getRequestURL().toString();


    Finally, another approach you may also want to consider is passing the
location information to the component via a parameter/binding -- this is
useful when you have one page object render multiple visual "pages" from the
view point of the user. (In general I would stay away from the request
URL -- there are many other alternatives)


Best regards,
-mb

----- Original Message ----- 
From: "Jan Mikkelsen" <jm...@adslhome.dk>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, June 02, 2003 1:02 AM
Subject: Current URL


> Hi All,
>
> In a menu component I would like to get the url that is currently
> selected in order to be able to highlight the relevant menu item. How do
> I do that?
>
> Regards, Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Current URL

Posted by Jan Mikkelsen <jm...@adslhome.dk>.
Hi All,

In a menu component I would like to get the url that is currently
selected in order to be able to highlight the relevant menu item. How do
I do that?

Regards, Jan

UPDATE: RadioPropertySelectionRenderer error

Posted by Jeevan Bihari <je...@yahoo.com>.
Never mind. I figured out what my problem was. The HTML template should have said the following:

<select jwcid="inputData@PropertySelection" value="ognl:searchData" model="ognl:engine.dataModel"
renderer="ognl:dataRenderer"/>

The fully-qualified class name for the renderer was what was messing things up.

Jeevan

--- Jeevan Bihari <je...@yahoo.com> wrote:
> Hi All,
> 
>   I'm trying to use the RadioPropertySelectionRenderer in a PropertySelection component. The
> page
> has the following:
> 
> <select jwcid="inputData@PropertySelection" value="ognl:searchData"
> model="ognl:engine.dataModel"
> renderer="org.apache.tapestry.form.RadioPropertySelectionRenderer"/>
> 
> When I run my web app containing the above page, I get the following error:
> 
> "Unable to set property renderer of component testPage/inputDate from
> StaticBinding[org.apache.tapestry.form.RadioPropertySelectionRenderer].
> Parameter renderer (org.apache.tapestry.form.RadioPropertySelectionRenderer) does not implement
> interface org.apache.tapestry.form.IPropertySelectionRenderer."
> 
> But that's not the case as the Tapestry framework Source code shows that
> RadioPropertySelectionRenderer DOES implement IPropertySelectionRenderer. Any idea what I might
> be
> doing wrong to get this error message ?
> 
> Thanks,
> Jeevan
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com