> 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 received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to castle-project-users@googlegroups.com > . > To unsubscribe from this group, send email to > castle-project-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en.
> 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 received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to castle-project-users@googlegroups.com. > To unsubscribe from this group, send email to > castle-project-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en.
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:
> On 4/12/12, Cesar Lopez <nicap...@gmail.com> wrote:
> > 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 received this message because you are subscribed to the Google Groups
> > "Castle Project Users" group.
> > To post to this group, send email to castle-project-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > castle-project-users+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/castle-project-users?hl=en.
> 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: >> Use a propertybag to pass value to view
>> On 4/12/12, Cesar Lopez <nicap...@gmail.com> wrote:
>> > 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 received this message because you are subscribed to the Google >> > Groups >> > "Castle Project Users" group. >> > To post to this group, send email to >> > castle-project-users@googlegroups.com. >> > To unsubscribe from this group, send email to >> > castle-project-users+unsubscribe@googlegroups.com. >> > For more options, visit this group at >> >http://groups.google.com/group/castle-project-users?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to castle-project-users@googlegroups.com. > To unsubscribe from this group, send email to > castle-project-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en.
> 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:
> > Use a propertybag to pass value to view
> > On 4/12/12, Cesar Lopez <nicap...@gmail.com> wrote:
> > > 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 received this message because you are subscribed to the Google Groups
> > > "Castle Project Users" group.
> > > To post to this group, send email to castle-project-users@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > castle-project-users+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/castle-project-users?hl=en.
Thanks torobravo.. I was trying $session['"sessionuser'].username and did not work.. will try $session.sessionUser.userName nos vemos en bancamovil :-P
On Tue, Apr 17, 2012 at 8:13 PM, torobravo <jiro...@gmail.com> wrote: > 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: > > 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:
> > > Use a propertybag to pass value to view
> > > On 4/12/12, Cesar Lopez <nicap...@gmail.com> wrote:
> > > > 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 received this message because you are subscribed to the Google > Groups > > > > "Castle Project Users" group. > > > > To post to this group, send email to > castle-project-users@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > castle-project-users+unsubscribe@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/castle-project-users?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to castle-project-users@googlegroups.com > . > To unsubscribe from this group, send email to > castle-project-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en.