You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Keith Seim <ke...@kjsdesigns.com> on 2003/06/25 19:52:51 UTC
talking about how-tos; $link.setPage(className)..
Ok, this might be impossible, but I want to make use of the
$link.setPage feature:
$link.setPage("index.wm")
... except I'd like to be able to put the Screen classname in there...
for instance:
$link.setPage("APP-NAME.modules.screens.Default") (where Default.class
is the screen class I'm referring to).
Is that possible? I can't find this feature in the
org.apache.turbine.*.*Link docs.
Thanks
Keith
___________________________________
Keith Seim • http://kjsdesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: talking about how-tos; $link.setPage(className)..
Posted by Bill <bh...@collaborativefusion.com>.
Keith
Did you look at the methods inherited from DynamicURI?
setScreen
public DynamicURI setScreen(java.lang.String screen)
Sets the screen= value for this URL.
By default it adds the information to the path_info instead of
the query data.
Returns:
A DynamicURI (self).
I think thats what you want, though I dont think you pass the classname
but rather the relative path. For the example you give, I think you just
pass "Default". If it were appname.modules.screens.login.Foo, then
you'd pass something like "login.Foo".
I'm not positive on this, most of my work has been on the backend of
things, not so much in the presentation layer.
HTH
-b
On Wed, 2003-06-25 at 13:52, Keith Seim wrote:
> Ok, this might be impossible, but I want to make use of the
> $link.setPage feature:
>
> $link.setPage("index.wm")
>
> ... except I'd like to be able to put the Screen classname in there...
> for instance:
>
> $link.setPage("APP-NAME.modules.screens.Default") (where Default.class
> is the screen class I'm referring to).
>
> Is that possible? I can't find this feature in the
> org.apache.turbine.*.*Link docs.
>
> Thanks
> Keith
>
>
>
>
> ___________________________________
> Keith Seim • http://kjsdesigns.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
--
Bill <bh...@collaborativefusion.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: talking about how-tos; $link.setPage(className)..
Posted by Keith Seim <ke...@kjsdesigns.com>.
On Thursday, June 26, 2003, at 10:00 AM, Henning P. Schmiedehausen
wrote:
>
> Yes,
>
> the fact that the original author of the "ß!(="( TemplateLink class
> decided to change the _template_ with setPage still bites
> me. (Basically it shows a fundamental lack of understanding by the
> original Author who wasn't able to distinguish between a Page, a
> Screen and a Template. ;-) Ah, well, 2.2 is pretty much screwed in
> this regard).
>
> Regards
> Henning
~> My apologies for bringing up such a sensitive issue ;). As for me,
I'm glad that ANYTHING works, and if 2.3 is as good as you imply it will
be, I look forward to be amazed if and when a new project deems it
necessary to use.
Always grateful for your feedback Henning.
Keith
>
>> --Apple-Mail-1-1018621629
>> Content-Transfer-Encoding: 7bit
>> Content-Type: text/plain;
>> charset=US-ASCII;
>> format=flowed
>
>
>> On Thursday, June 26, 2003, at 04:05 AM, Henning P. Schmiedehausen
>> wrote:
>
>>> Keith Seim <ke...@kjsdesigns.com> writes:
>>>
>>> $link.setPage -> sets the name of the Template to display
>>> $link.setAction -> sets the Action parameter of a link
>>> $link.setScreen -> sets the Screen parameter
>>>
>>> So you should be able to do
>>>
>>> <a href="$link.setScreen("Default").setTemplate("xxx.vm")">Next
>>> Screen</a>
>
>> ~> Just wondering if you meant:
>> <a href="$link.setScreen("Default").setPage("xxx.vm")">Next Screen</a>
>> ?
>
>> This seems to work better for me, and it looks congruent with your list
>> of methods above.
>
>> --Apple-Mail-1-1018621629--
>
> --
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
> hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
>
> Java, perl, Solaris, Linux, xSP Consulting, Web Services
> freelance consultant -- Jakarta Turbine Development -- hero for hire
>
> --- Quote of the week: "It is pointless to tell people anything when
> you know that they won't process the message." --- Jonathan Revusky
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
___________________________________
Keith Seim • http://kjsdesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: talking about how-tos; $link.setPage(className)..
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Keith Seim <ke...@kjsdesigns.com> writes:
Yes,
the fact that the original author of the "�!(="( TemplateLink class
decided to change the _template_ with setPage still bites
me. (Basically it shows a fundamental lack of understanding by the
original Author who wasn't able to distinguish between a Page, a
Screen and a Template. ;-) Ah, well, 2.2 is pretty much screwed in
this regard).
Regards
Henning
>--Apple-Mail-1-1018621629
>Content-Transfer-Encoding: 7bit
>Content-Type: text/plain;
> charset=US-ASCII;
> format=flowed
>On Thursday, June 26, 2003, at 04:05 AM, Henning P. Schmiedehausen
>wrote:
>> Keith Seim <ke...@kjsdesigns.com> writes:
>>
>> $link.setPage -> sets the name of the Template to display
>> $link.setAction -> sets the Action parameter of a link
>> $link.setScreen -> sets the Screen parameter
>>
>> So you should be able to do
>>
>> <a href="$link.setScreen("Default").setTemplate("xxx.vm")">Next
>> Screen</a>
>~> Just wondering if you meant:
><a href="$link.setScreen("Default").setPage("xxx.vm")">Next Screen</a>
>?
>This seems to work better for me, and it looks congruent with your list
>of methods above.
>--Apple-Mail-1-1018621629--
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development -- hero for hire
--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: talking about how-tos; $link.setPage(className)..
Posted by Keith Seim <ke...@kjsdesigns.com>.
On Thursday, June 26, 2003, at 04:05 AM, Henning P. Schmiedehausen
wrote:
> Keith Seim <ke...@kjsdesigns.com> writes:
>
> $link.setPage -> sets the name of the Template to display
> $link.setAction -> sets the Action parameter of a link
> $link.setScreen -> sets the Screen parameter
>
> So you should be able to do
>
> <a href="$link.setScreen("Default").setTemplate("xxx.vm")">Next
> Screen</a>
~> Just wondering if you meant:
<a href="$link.setScreen("Default").setPage("xxx.vm")">Next Screen</a>
?
This seems to work better for me, and it looks congruent with your list
of methods above.
Re: talking about how-tos; $link.setPage(className)..
Posted by Keith Seim <ke...@kjsdesigns.com>.
Hi Henning
On Thursday, June 26, 2003, at 04:05 AM, Henning P. Schmiedehausen
wrote:
>
>> Is that possible? I can't find this feature in the
>> org.apache.turbine.*.*Link docs.
>
> setScreen should've been always there. It definitely is in the 2.3-dev
> code base in o.a.t.services.pull.tools.TemplateLink
>
~> Yep, you're right. Finally found it. setScreen is in
org.apache.turbine.util.template.TemplateLink and is inherited from
DynamicURI. Thanks for pointing me in the right direction.
Cheers
Keith Seim
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: talking about how-tos; $link.setPage(className)..
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Keith Seim <ke...@kjsdesigns.com> writes:
>Ok, this might be impossible, but I want to make use of the
>$link.setPage feature:
> $link.setPage("index.wm")
>... except I'd like to be able to put the Screen classname in there...
>for instance:
>$link.setPage("APP-NAME.modules.screens.Default") (where Default.class
>is the screen class I'm referring to).
$link.setPage -> sets the name of the Template to display
$link.setAction -> sets the Action parameter of a link
$link.setScreen -> sets the Screen parameter
So you should be able to do
<a href="$link.setScreen("Default").setTemplate("xxx.vm")">Next Screen</a>
to render the "Next Screen" with the xxx.vm Template and the Default Screen
class.
You don't have to give the fully qualified name, the Template Service
will look for it if you need this.
However, you can't change the screen class for the _current_
screen. Once the template gets prepared, you're already running the
java class for the current screen.
>Is that possible? I can't find this feature in the
>org.apache.turbine.*.*Link docs.
setScreen should've been always there. It definitely is in the 2.3-dev
code base in o.a.t.services.pull.tools.TemplateLink
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development -- hero for hire
--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org