osdir.com
mailing list archive

Subject: Re: How to display indexed or mapped properties - msg#00081

List: java.stripes.user

Date: Prev Next Index Thread: Prev Next Index
Hmm. Nice it works. Thanks

Now for a real challenge. I would like to return some alternatives if
there's nothing in the map from the given key. To implement that in
jsp I have to be able to call a method with a parameter. Can this be
done.

Alternatively I have to implement a "MagicMap", that does this for me in Java.

Morten

2007/3/8, Aaron Porter <aaron-g4rHc9G+4WLQT0dZR+AlfA@xxxxxxxxxxxxxxxx>:
> JSP uses associative array syntax to access values from a Map. If your
> Map is in the current ActionBean you just do this:
>
> ${actionBean.nameOfMap['theKey']}
>
> Aaron
>
> Morten Andersen wrote:
> > Using Stripes indexed properties option to edit properties saved in a
> > Map is nice and cool, but how can I display these on a page.
> >
> > I want to display just one mapped property at a time. So I can't do it
> > using forEach or anything like that.
> >
> > What I want to do is to display a property from a Map using the key as
> > an attribute.
> >
> > What I'm looking for is a trick like:
> >
> > <stripes:out map="nameOfMap" key="theKey"/>
> >
> > Does it exists?
> >
> > How can I output something using an attribute in JSP?
> > Can it even be done?
> >
> > Morten Andersen
> >
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Stripes-users mailing list
> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>


--
Morten Andersen
Direktør
Blob Communication ApS
Svendsagervej 42
5240 Odense NØ

T: 76 654321
W: www.blobcom.com
E: morten-PCIdraLgBExBDgjK7y7TUQ@xxxxxxxxxxxxxxxx

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: How to display indexed or mapped properties

JSP uses associative array syntax to access values from a Map. If your Map is in the current ActionBean you just do this: ${actionBean.nameOfMap['theKey']} Aaron Morten Andersen wrote: > Using Stripes indexed properties option to edit properties saved in a > Map is nice and cool, but how can I display these on a page. > > I want to display just one mapped property at a time. So I can't do it > using forEach or anything like that. > > What I want to do is to display a property from a Map using the key as > an attribute. > > What I'm looking for is a trick like: > > <stripes:out map="nameOfMap" key="theKey"/> > > Does it exists? > > How can I output something using an attribute in JSP? > Can it even be done? > > Morten Andersen > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Next Message by Date: click to view message preview

Re: How to display indexed or mapped properties

What I do in that case is extend AbstractMap and do whatever I want in the get method. It works really well and makes life a whole lot easier. :) It sounds like thats what you're doing with a "MagicMap". I don't know of any easier way to do that type of thing. Aaron Morten Andersen wrote: > Hmm. Nice it works. Thanks > > Now for a real challenge. I would like to return some alternatives if > there's nothing in the map from the given key. To implement that in > jsp I have to be able to call a method with a parameter. Can this be > done. > > Alternatively I have to implement a "MagicMap", that does this for me in Java. > > Morten > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Previous Message by Thread: click to view message preview

Re: How to display indexed or mapped properties

JSP uses associative array syntax to access values from a Map. If your Map is in the current ActionBean you just do this: ${actionBean.nameOfMap['theKey']} Aaron Morten Andersen wrote: > Using Stripes indexed properties option to edit properties saved in a > Map is nice and cool, but how can I display these on a page. > > I want to display just one mapped property at a time. So I can't do it > using forEach or anything like that. > > What I want to do is to display a property from a Map using the key as > an attribute. > > What I'm looking for is a trick like: > > <stripes:out map="nameOfMap" key="theKey"/> > > Does it exists? > > How can I output something using an attribute in JSP? > Can it even be done? > > Morten Andersen > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Next Message by Thread: click to view message preview

Re: How to display indexed or mapped properties

What I do in that case is extend AbstractMap and do whatever I want in the get method. It works really well and makes life a whole lot easier. :) It sounds like thats what you're doing with a "MagicMap". I don't know of any easier way to do that type of thing. Aaron Morten Andersen wrote: > Hmm. Nice it works. Thanks > > Now for a real challenge. I would like to return some alternatives if > there's nothing in the map from the given key. To implement that in > jsp I have to be able to call a method with a parameter. Can this be > done. > > Alternatively I have to implement a "MagicMap", that does this for me in Java. > > Morten > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by