Re: converting bean:write to c:out

2004-06-07 Thread Richard Raquepo
thanks.

i just modified my code to expose the Map, then viola...

i can now start converting some of my jsp's to JSTL.

thanks again guys...

-Richard

- Original Message -
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 08, 2004 1:42 AM
Subject: Re: converting bean:write to c:out


> Well, sort of. In the typical example of a mapped property (like the one
Richard
> provided), the map itself isn't exposed as a JavaBean property, so JSTL
can't
> get at the information it contains:
>
> private final Map values = new HashMap();
>
> public void setValue(String key, Object value) {
>   values.put(key, value);
> }
>
> public Object getValue(String key) {
>   return values.get(key);
> }
>
> So, in order for JSTL to get at that information, you have to expose the
map as
> a JavaBean property. For example, by adding a method like:
>
> public Map getValues() {
>   return values;
> }
>
> Then JSTL can be used like:
>
> 
>
> Quoting Bill Siggelkow <[EMAIL PROTECTED]>:
>
> > 
> >   -- or --
> > 
> >
> > Richard Raquepo wrote:
> > > hi,
> > >
> > > i am converting some of the jsp's to jstl.
> > >
> > > how do i convert this line to jstl:
> > >
> > > 
> > >
> > > where getValue is defined as
> > >
> > > HashMap values = new HashMap();
> > > .
> > > public String get(String name){
> > >  String value = (String) values.get(name);
> > >  return value;
> > > }
> > >
> > > hoping for your immediate response.
> > >
> > > thanks a lot.
> > >
> > >
> > > -richard
>
> --
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech   <http://www.dotech.com/>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: converting bean:write to c:out

2004-06-07 Thread Bill Siggelkow
Oops -- you're right Kris -- thanks for the clarification.
Kris Schneider wrote:
Well, sort of. In the typical example of a mapped property (like the one Richard
provided), the map itself isn't exposed as a JavaBean property, so JSTL can't
get at the information it contains:
private final Map values = new HashMap();
public void setValue(String key, Object value) {
  values.put(key, value);
}
public Object getValue(String key) {
  return values.get(key);
}
So, in order for JSTL to get at that information, you have to expose the map as
a JavaBean property. For example, by adding a method like:
public Map getValues() {
  return values;
}
Then JSTL can be used like:

Quoting Bill Siggelkow <[EMAIL PROTECTED]>:


 -- or --

Richard Raquepo wrote:
hi,
i am converting some of the jsp's to jstl.
how do i convert this line to jstl:
   
where getValue is defined as 

HashMap values = new HashMap();
.
public String get(String name){
String value = (String) values.get(name);
return value;
}
hoping for your immediate response.
thanks a lot.
-richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: converting bean:write to c:out

2004-06-07 Thread Kris Schneider
Well, sort of. In the typical example of a mapped property (like the one Richard
provided), the map itself isn't exposed as a JavaBean property, so JSTL can't
get at the information it contains:

private final Map values = new HashMap();

public void setValue(String key, Object value) {
  values.put(key, value);
}

public Object getValue(String key) {
  return values.get(key);
}

So, in order for JSTL to get at that information, you have to expose the map as
a JavaBean property. For example, by adding a method like:

public Map getValues() {
  return values;
}

Then JSTL can be used like:



Quoting Bill Siggelkow <[EMAIL PROTECTED]>:

> 
>   -- or --
> 
> 
> Richard Raquepo wrote:
> > hi,
> > 
> > i am converting some of the jsp's to jstl.
> > 
> > how do i convert this line to jstl:
> > 
> > 
> > 
> > where getValue is defined as 
> > 
> > HashMap values = new HashMap();
> > .
> > public String get(String name){
> >  String value = (String) values.get(name);
> >  return value;
> > }
> > 
> > hoping for your immediate response.
> > 
> > thanks a lot.
> > 
> > 
> > -richard

-- 
Kris Schneider 
D.O.Tech   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: converting bean:write to c:out

2004-06-07 Thread Bill Siggelkow

 -- or --

Richard Raquepo wrote:
hi,
i am converting some of the jsp's to jstl.
how do i convert this line to jstl:

where getValue is defined as 

HashMap values = new HashMap();
.
public String get(String name){
 String value = (String) values.get(name);
 return value;
}
hoping for your immediate response.
thanks a lot.
-richard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


converting bean:write to c:out

2004-06-07 Thread Richard Raquepo
hi,

i am converting some of the jsp's to jstl.

how do i convert this line to jstl:



where getValue is defined as 

HashMap values = new HashMap();
.
public String get(String name){
 String value = (String) values.get(name);
 return value;
}

hoping for your immediate response.

thanks a lot.


-richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



converting bean:write to c:out

2004-06-07 Thread Richard Raquepo
hi,

i am converting some of the jsp's to jstl.

how do i convert this line to jstl:



where getValue is defined as 

HashMap values = new HashMap();
.
public String get(String name){
 String value = (String) values.get(name);
 return value;
}

hoping for your immediate response.

thanks a lot.


-richard