You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Elijah Jacobs <el...@hotmail.com> on 2002/03/04 23:07:30 UTC

creating a variable set to return value of a method - using struts

Hi All, 

I am trying to achieved the following code below using only tags: 

<%
HashMap myMap = someClass.getMyMap();
myMap.put("1", "one");
%>

someClass would return a HashMap.

I can't seem to find an example of how this can be done.

can someone point me to an example (or show me a example)? 

- ej




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: creating a variable set to return value of a method - using struts

Posted by Elijah Jacobs <el...@hotmail.com>.
Thanks for the response,

I could not find an example on how to turn

<% HashMap myMap = someClass.getMyMap(); %> to a bean:define

I'm having trouble getting the syntax down... can someone show me an example
of how this is done?

thanks in advanced,

- ej

----- Original Message -----
From: "keithBacon" <ke...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, March 05, 2002 4:10 AM
Subject: Re: creating a variable set to return value of a method - using
struts


> Hi,
> > HashMap myMap = someClass.getMyMap();
> <bean:define can do this.
>
> > myMap.put("1", "one");
> struts is designed for presentation logic, so this isn't in it's scope.
>
> Have you seen Larry's struts white paper at:-
> http://stealthis.athensgroup.com/presentations/
>
> hope this helps = Keith.
>
>
> --- Elijah Jacobs <el...@hotmail.com> wrote:
> > Hi All,
> >
> > I am trying to achieved the following code below using only tags:
> >
> > <%
> > HashMap myMap = someClass.getMyMap();
> > myMap.put("1", "one");
> > %>
> >
> > someClass would return a HashMap.
> >
> > I can't seem to find an example of how this can be done.
> >
> > can someone point me to an example (or show me a example)?
> >
> > - ej
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
>
> =====
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Search the archive:-
> http://www.mail-archive.com/struts-user%40jakarta.apache.org/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Keith Bacon - Looking for struts work - South-East UK.
> phone UK 07960 011275
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: creating a variable set to return value of a method - using struts

Posted by keithBacon <ke...@yahoo.com>.
Hi,
> HashMap myMap = someClass.getMyMap();
<bean:define can do this.

> myMap.put("1", "one");
struts is designed for presentation logic, so this isn't in it's scope.

Have you seen Larry's struts white paper at:-
http://stealthis.athensgroup.com/presentations/

hope this helps = Keith.


--- Elijah Jacobs <el...@hotmail.com> wrote:
> Hi All, 
> 
> I am trying to achieved the following code below using only tags: 
> 
> <%
> HashMap myMap = someClass.getMyMap();
> myMap.put("1", "one");
> %>
> 
> someClass would return a HashMap.
> 
> I can't seem to find an example of how this can be done.
> 
> can someone point me to an example (or show me a example)? 
> 
> - ej
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>