Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Help with session in monorail
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Cesar Lopez  
View profile  
 More options Apr 12 2012, 12:59 am
From: Cesar Lopez <nicap...@gmail.com>
Date: Wed, 11 Apr 2012 22:59:49 -0600
Local: Thurs, Apr 12 2012 12:59 am
Subject: Help with session in monorail

Hello,

I have this conde inside an action in a controller.

e.g

Controller {

public void Index() {

Context.Session["sessionuser"] = user;

}
}

Now, I want to read the value of Context.Session["sessionuser"]  from my
.vm file (velocity file)
But I do not know how to do that..

I do

$sessionuser.name but no value is returned..

Please help!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ricardo Borges  
View profile  
 More options Apr 12 2012, 8:21 am
From: Ricardo Borges <ricardobor...@gmail.com>
Date: Thu, 12 Apr 2012 09:21:06 -0300
Local: Thurs, Apr 12 2012 8:21 am
Subject: Re: Help with session in monorail

Luckly, you can't do that. You must pass the value to the view using
PropertyBag:

This reference will help you:
http://www.castleproject.org/monorail/documentation/trunk/usersguide/...

2012/4/12 Cesar Lopez <nicap...@gmail.com>

--
Ricardo

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Apatira Lookman  
View profile  
 More options Apr 12 2012, 8:39 am
From: Apatira Lookman <apat...@gmail.com>
Date: Thu, 12 Apr 2012 13:39:27 +0100
Local: Thurs, Apr 12 2012 8:39 am
Subject: Re: Help with session in monorail
Use a propertybag to pass value to view

On 4/12/12, Cesar Lopez <nicap...@gmail.com> wrote:

--
Sent from my mobile device

Apatira Lookman
Chief Technology Officer
VERTIGO-SOFT SOLUTIONS
+2348028400104


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cesar Sanz  
View profile  
 More options Apr 12 2012, 10:29 pm
From: Cesar Sanz <nicap...@gmail.com>
Date: Thu, 12 Apr 2012 19:29:19 -0700 (PDT)
Local: Thurs, Apr 12 2012 10:29 pm
Subject: Re: Help with session in monorail
Hi.. thanks for the answer.. I already know that I can put the value
into de PorpertyBag,..
but the problem is that I need to be able to show that value in
multiple views.. (multiple vm files)
and that value, the one I put into the session, is only avaible when
the user logs in...

Any Idea?

On 12 abr, 06:39, Apatira Lookman <apat...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Apatira Lookman  
View profile  
 More options Apr 13 2012, 5:47 am
From: Apatira Lookman <apat...@gmail.com>
Date: Fri, 13 Apr 2012 10:47:19 +0100
Local: Fri, Apr 13 2012 5:47 am
Subject: Re: Help with session in monorail
Use a basecontroller

On 4/13/12, Cesar Sanz <nicap...@gmail.com> wrote:

--
Sent from my mobile device

Apatira Lookman
Chief Technology Officer
VERTIGO-SOFT SOLUTIONS
+2348028400104


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
torobravo  
View profile  
 More options Apr 17 2012, 10:05 pm
From: torobravo <jiro...@gmail.com>
Date: Tue, 17 Apr 2012 19:05:56 -0700 (PDT)
Local: Tues, Apr 17 2012 10:05 pm
Subject: Re: Help with session in monorail
You can use the '$session' variable of the context added automatically
by the NVelocityViewEngine.

So for your particular example you could use the following sentence in
your .VM file:

 $session.sessionUser.userName

Regads,

On Apr 11, 10:59 pm, Cesar Lopez <nicap...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
torobravo  
View profile  
 More options Apr 17 2012, 10:13 pm
From: torobravo <jiro...@gmail.com>
Date: Tue, 17 Apr 2012 19:13:07 -0700 (PDT)
Local: Tues, Apr 17 2012 10:13 pm
Subject: Re: Help with session in monorail
You can use the '$session' variable of the context added automatically
by the NVelocityViewEngine.

So for your particular example you could use the following sentence in
your .VM file:

 $session.sessionUser.userName

Regads,

On Apr 12, 8:29 pm, Cesar Sanz <nicap...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cesar Lopez  
View profile  
 More options Apr 19 2012, 12:32 pm
From: Cesar Lopez <nicap...@gmail.com>
Date: Thu, 19 Apr 2012 10:32:17 -0600
Local: Thurs, Apr 19 2012 12:32 pm
Subject: Re: Help with session in monorail

Thanks torobravo.. I was trying $session['"sessionuser'].username and did
not work..
will try  $session.sessionUser.userName
nos vemos en bancamovil :-P


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »