You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by tu...@arcor.de on 2004/07/22 14:02:24 UTC
Change Layout in action
Hi!
I'm quite a newbie to turbine and im trying to chage the layout template in an action.
My approach doesn't work:
...
public void doChangeLayout(RunData data, Context context) {
data.setLayoutTemplate("NewLayout.vm");
}
...
Does someone have an idea?
Regards
Oliver
Arcor-DSL: jetzt ohne Einrichtungspreis einsteigen oder wechseln
Sie sparen 99,95 Euro. Arcor-DSL ist in vielen Anschlussgebieten
verfügbar. http://www.arcor.de/home/redir.php/emf-dsl-1
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Change Layout in action
Posted by Daniel <da...@yorku.ca>.
Doh! But I believe that rule came into effect in 2.3.
Regards,
Daniel
On Fri, 23 Jul 2004, Scott Eade wrote:
> Daniel wrote:
>
> >That should work... Try using: "/NewLayout.vm" ?
> >
> Henning is going to flip out when he sees this - you are breaking one of
> the two golden rules for using templates with Turbine - see:
> http://jakarta.apache.org/turbine/turbine-2.3/services/template-service.html
> (under the Usage heading).
>
> I personally don't set any layouts from actions, but looking at the
> JavaDoc I would say that in an action you should probably use:
>
> data.setLayout("NewLayout.vm");
>
> The setLayoutTemplate() method is for changing the layout from within
> the template itself (i.e. within the vm file for the template whose
> layout you are changing).
>
> Scott
>
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
>
>
> ---------------------------------------------------------------------
> 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: Change Layout in action
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Scott Eade <se...@backstagetech.com.au> writes:
>Daniel wrote:
>>That should work... Try using: "/NewLayout.vm" ?
>>
>Henning is going to flip out when he sees this - you are breaking one of
>the two golden rules for using templates with Turbine - see:
>http://jakarta.apache.org/turbine/turbine-2.3/services/template-service.html
>(under the Usage heading).
Yep. Had the editor already loaded. ;-)
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
"Fighting for one's political stand is an honorable action, but re-
fusing to acknowledge that there might be weaknesses in one's
position - in order to identify them so that they can be remedied -
is a large enough problem with the Open Source movement that it
deserves to be on this list of the top five problems."
-- Michelle Levesque, "Fundamental Issues with
Open Source Software Development"
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Change Layout in action
Posted by Scott Eade <se...@backstagetech.com.au>.
Daniel wrote:
>That should work... Try using: "/NewLayout.vm" ?
>
Henning is going to flip out when he sees this - you are breaking one of
the two golden rules for using templates with Turbine - see:
http://jakarta.apache.org/turbine/turbine-2.3/services/template-service.html
(under the Usage heading).
I personally don't set any layouts from actions, but looking at the
JavaDoc I would say that in an action you should probably use:
data.setLayout("NewLayout.vm");
The setLayoutTemplate() method is for changing the layout from within
the template itself (i.e. within the vm file for the template whose
layout you are changing).
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Change Layout in action
Posted by Daniel <da...@yorku.ca>.
That should work... Try using: "/NewLayout.vm" ?
Regards,
Daniel
On Thu, 22 Jul 2004 turbine_user@arcor.de wrote:
> Hi!
>
> I'm quite a newbie to turbine and im trying to chage the layout template in an action.
> My approach doesn't work:
> ...
> public void doChangeLayout(RunData data, Context context) {
> data.setLayoutTemplate("NewLayout.vm");
> }
> ...
> Does someone have an idea?
>
> Regards
> Oliver
>
>
> Arcor-DSL: jetzt ohne Einrichtungspreis einsteigen oder wechseln
> Sie sparen 99,95 Euro. Arcor-DSL ist in vielen Anschlussgebieten
> verfügbar. http://www.arcor.de/home/redir.php/emf-dsl-1
>
>
> ---------------------------------------------------------------------
> 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: Change Layout in action
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Olli <tu...@arcor.de> writes:
>What do you want to say to me?
The question was: Are you sure that your action event is actually called?
You can't do
$link.setActionEvent("MyAction", "ChangeLayout")
it must be
$link.setActionEvent("MyAction", "Changelayout")
Notice the lower case "l". This is one of the restrictions that
Turbine places on the event names. You must not user a camel-case word
here. Your action event name can have only one capital letter.
And your method must be called doChangelayout
Regards
Henning
>Henning P. Schmiedehausen writes:
>> turbine_user@arcor.de writes:
>>
>>
>>>Hi!
>>
>>
>>>I'm quite a newbie to turbine and im trying to chage the layout template in an action.
>>>My approach doesn't work:
>>>...
>>>public void doChangeLayout(RunData data, Context context) {
>>> data.setLayoutTemplate("NewLayout.vm");
>>> }
>>
>>
>> Trivial? doChangelayout ?
>>
>> The Action must have exactly one capital letter.
>>
>> Regards
>> Henning
>>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
"Fighting for one's political stand is an honorable action, but re-
fusing to acknowledge that there might be weaknesses in one's
position - in order to identify them so that they can be remedied -
is a large enough problem with the Open Source movement that it
deserves to be on this list of the top five problems."
-- Michelle Levesque, "Fundamental Issues with
Open Source Software Development"
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Change Layout in action
Posted by Olli <tu...@arcor.de>.
What do you want to say to me?
Henning P. Schmiedehausen writes:
> turbine_user@arcor.de writes:
>
>
>>Hi!
>
>
>>I'm quite a newbie to turbine and im trying to chage the layout template in an action.
>>My approach doesn't work:
>>...
>>public void doChangeLayout(RunData data, Context context) {
>> data.setLayoutTemplate("NewLayout.vm");
>> }
>
>
> Trivial? doChangelayout ?
>
> The Action must have exactly one capital letter.
>
> Regards
> Henning
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Change Layout in action
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
turbine_user@arcor.de writes:
>Hi!
>I'm quite a newbie to turbine and im trying to chage the layout template in an action.
>My approach doesn't work:
>...
>public void doChangeLayout(RunData data, Context context) {
> data.setLayoutTemplate("NewLayout.vm");
> }
Trivial? doChangelayout ?
The Action must have exactly one capital letter.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
"Fighting for one's political stand is an honorable action, but re-
fusing to acknowledge that there might be weaknesses in one's
position - in order to identify them so that they can be remedied -
is a large enough problem with the Open Source movement that it
deserves to be on this list of the top five problems."
-- Michelle Levesque, "Fundamental Issues with
Open Source Software Development"
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org