You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Gerry Duprey <gd...@Schools-OPEN.com> on 2004/02/13 23:22:49 UTC
Using $link multiple times in a page
Howdy,
This may seem silly, but I didn't see anything about it on the page where
$link is discussed.
If I have a page with actions, URL links, etc, and the $link variable seems to
accumulate all the various setTemplate/setAction/etc before it. So by the
third or fourth time I use it, I have a pile of extra "debris" around it.
For example, if I have a form and set the action with a $link.setAction(...)
and later have a URL link (not related to the form) where I use
$link.setTemplate(...), the resulting URL has the template and an action
encoded into it (which causes execution to go through the action when it
shouldn't.
Is there some way to reset the $link back to it's original state? Or, lacking
that, is there a way to "clone" it multiple times so each "instance" can have
it's own context?
Thanks!
Gerry
--
Gerry Duprey
________________________________________
SchoolsOPEN, LLC
123 North Ashley, Suite 120
Ann Arbor, MI 48104
Phone (877) 483-1944 Ext. 401
Fax (734) 661-0819
Visit us Online at www.Schools-OPEN.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: MerlinComponentService with turbin2.4
Posted by Eric Pugh <ep...@upstate.com>.
Dieter,
The MerlinComponentService is a work in progress.. I updated T2.4 to use it
a bit prematurely, and have now backed out the changes, however, I think I
missed a couple changes...
Please rebuild from CVS. And let me know any challenges you run into..
Eric
> -----Original Message-----
> From: Dieter Engelhardt [mailto:Dieter.Engelhardt@Iris-Solutions.de]
> Sent: Sunday, February 15, 2004 10:30 PM
> To: Turbine Users List
> Subject: MerlinComponentService with turbin2.4
>
>
> Hi all,
> I'm updating my app from turbin 2.2 to 2.4 buid from CVS.
> I have done every adaptions which were recommended.
>
> But now my UserLogin doesn't work anymore.
>
> I get an Exception in org.apache.turbine.modules.actions.LoginUser:
>
> ServiceBroker: unknown service MerlinComponentService requested
>
> I guess it is a configuration issue in TR.properties.
>
> Can anybody point me on what i have to do?
>
> Regards
> Dieter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
MerlinComponentService with turbin2.4
Posted by Dieter Engelhardt <Di...@Iris-Solutions.de>.
Hi all,
I'm updating my app from turbin 2.2 to 2.4 buid from CVS.
I have done every adaptions which were recommended.
But now my UserLogin doesn't work anymore.
I get an Exception in org.apache.turbine.modules.actions.LoginUser:
ServiceBroker: unknown service MerlinComponentService requested
I guess it is a configuration issue in TR.properties.
Can anybody point me on what i have to do?
Regards
Dieter
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Using $link multiple times in a page
Posted by David Demner <tu...@demner.com>.
Gerry-
Very true; you have to be careful when you use $link with #set.
However, if you just print it out without setting it to a variable, it
implicitly calls the toString() method:
$link.setPage("Foo.vm")
Also,
#set($url = $link.setPage("Foo.vm"))
$url
#set($url2 = $link.setPage("Foo2.vm"))
$url2
will print them correctly, but
#set($url = $link.setPage("Foo.vm"))
#set($url2 = $link.setPage("Foo2.vm"))
$url
$url2
won't!
David
-----Original Message-----
From: Brian Lawler [mailto:brian@tribenetwork.com]
Sent: Friday, February 13, 2004 4:57 PM
To: Turbine Users List
Subject: Re: Using $link multiple times in a page
Gerry-
The toString() method on $link is supposed to clear out the state of
the object, refreshing back to empty for subsequent usage. If you are
doing something like
#set($url = $link.setPage("Foo.vm"))
This will NOT refresh the link back because toString() is not being
called. Change a line like this to the following:
#set($url = $link.setPage("Foo.vm").toString())
-Brian
On Friday, February 13, 2004, at 02:22 PM, Gerry Duprey wrote:
> Howdy,
>
> This may seem silly, but I didn't see anything about it on the page
> where $link is discussed.
>
> If I have a page with actions, URL links, etc, and the $link variable
> seems to accumulate all the various setTemplate/setAction/etc before
> it. So by the third or fourth time I use it, I have a pile of extra
> "debris" around it.
>
> For example, if I have a form and set the action with a
> $link.setAction(...) and later have a URL link (not related to the
> form) where I use $link.setTemplate(...), the resulting URL has the
> template and an action encoded into it (which causes execution to go
> through the action when it shouldn't.
>
> Is there some way to reset the $link back to it's original state? Or,
> lacking that, is there a way to "clone" it multiple times so each
> "instance" can have it's own context?
>
> Thanks!
>
> Gerry
> --
> Gerry Duprey
> ________________________________________
> SchoolsOPEN, LLC
> 123 North Ashley, Suite 120
> Ann Arbor, MI 48104
> Phone (877) 483-1944 Ext. 401
> Fax (734) 661-0819
>
> Visit us Online at www.Schools-OPEN.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Using $link multiple times in a page
Posted by Brian Lawler <br...@tribenetwork.com>.
Gerry-
The toString() method on $link is supposed to clear out the state of
the object, refreshing back to empty for subsequent usage. If you are
doing something like
#set($url = $link.setPage("Foo.vm"))
This will NOT refresh the link back because toString() is not being
called. Change a line like this to the following:
#set($url = $link.setPage("Foo.vm").toString())
-Brian
On Friday, February 13, 2004, at 02:22 PM, Gerry Duprey wrote:
> Howdy,
>
> This may seem silly, but I didn't see anything about it on the page
> where $link is discussed.
>
> If I have a page with actions, URL links, etc, and the $link variable
> seems to accumulate all the various setTemplate/setAction/etc before
> it. So by the third or fourth time I use it, I have a pile of extra
> "debris" around it.
>
> For example, if I have a form and set the action with a
> $link.setAction(...) and later have a URL link (not related to the
> form) where I use $link.setTemplate(...), the resulting URL has the
> template and an action encoded into it (which causes execution to go
> through the action when it shouldn't.
>
> Is there some way to reset the $link back to it's original state? Or,
> lacking that, is there a way to "clone" it multiple times so each
> "instance" can have it's own context?
>
> Thanks!
>
> Gerry
> --
> Gerry Duprey
> ________________________________________
> SchoolsOPEN, LLC
> 123 North Ashley, Suite 120
> Ann Arbor, MI 48104
> Phone (877) 483-1944 Ext. 401
> Fax (734) 661-0819
>
> Visit us Online at www.Schools-OPEN.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org