You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Aparna Sundari <ap...@cmcltd.com> on 2003/12/10 08:43:12 UTC
How to set a screen in Action class
hello all,
i am currently using turbine with velocity in my project.
First page will be displayed in which the use will have the following
options
<link>English
<link>Hindi
<link>Telugu
On Clicking one of these pages..an action class called login.java is
invoked.
Actual code is:
<a
href="$link.setAction("mainframes").addQueryData("lang","eng")")">English</a
><br><br>
in the actionclass , i should set another page..
i tried it out by calling data.setPage("some.vm")
where data is a Rundata object here..but i could not set it.
can anybody help me out in this??
thanks in advance,
regards,
aparna.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to set a screen in Action class
Posted by Johnny Quazar <qu...@bitblaster.com>.
Some of my actions end with code like this:
// Return to the appropriate place... either the default
// or maybe to a specified screen
String returnScreen = data.getParameters().getString("returnScreen");
if (returnScreen != null) {
if (returnScreen.length() != 0) {
//System.out.println("Returning to " + returnScreen);
TemplateScreen.setTemplate(data, returnScreen);
}
}
HTH... I would think you'd want to put the language choice in a cookie.
>At 1:13 PM +0530 12/10/03, Aparna Sundari wrote:
[snip]
>
>On Clicking one of these pages..an action class called login.java is
>invoked.
>
>Actual code is:
>
><a
>href="$link.setAction("mainframes").addQueryData("lang","eng")")">English</a
>><br><br>
>
>in the actionclass , i should set another page..
>
>i tried it out by calling data.setPage("some.vm")
>where data is a Rundata object here..but i could not set it.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
one-to-many Joins
Posted by Eigen Technology Pty Ltd <mi...@eigentechnology.com>.
There could have an answer to this question in the archive, I may not have
put in the right search string to find it. Would appreciate if anyone
could point me to one if he/she knows its existence.
My simple question on Join Table:
How do I join two or more tables with Foreign Key(s) pointing to a common
Table?
Criteria criteria = new Criteria();
criteria.addJoin(TABLE_B.Ref_A_ID, TABLE_A.ID);
criteria.addJoin(TABLE_A.ID, TABLE_C.Ref_A_ID);
return (TABLE_C.doSelect(criteria));
did not work.
e.g. Table_B and Table_C have foreign-keys (Ref_A_ID) referencing to ID
in Table_A.
Table A
ID
Col_A1
Col_A2
Table B
ID
Ref_A_ID
Col_B1
Table C
ID
Ref_A_ID
Col_C1
Thanks
michael
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to set a screen in Action class
Posted by "m. lin" <mi...@eigentechnology.com>.
> Actual code is:
>
> <a
> href="$link.setAction("mainframes").addQueryData("lang","eng")")">English</a
>><br><br>
>
> in the actionclass , i should set another page..
>
> i tried it out by calling data.setPage("some.vm")
> where data is a Rundata object here..but i could not set it.
>
Not sure I understand your question, but:
<a href ... is supposed to be used in your .vm file.
data.setPage("some.vm") is used in a class file, I hope you have not got
them mixed up.
cheers
michael
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>