approach?
Thanks
Oliver Thiel
-Ursprüngliche Nachricht-
Von: Sharad Acharya [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. Dezember 2003 05:47
An: [EMAIL PROTECTED]
Betreff: Handle dynamic contents using map backed form
Hi all;
From Ted and others comments, it looks like some
Hi all;
From Ted and others comments, it looks like some of you are trying to
implement forms that should handle 'real' dynamic contents. In my recent
project, I had pleasure to work handling dynamic contents in which the
contents to render were not available until the time to render.
LinkedHashMap, which
allows the elements to be retrieved in the order they were added. If you are
using Struts under Java version 1.4 and later, you can simply replace
LinkedHashMap for HashMap in map-backed form and make the ordering work
without adding the additional List for ordering.
/snip
For those
Ray Madigan wrote:
I have narrowed the problem down to:
html-el:text property='elementMap(${element.element})'
value='${element.value}'/
being in a tile. If the tag is in the main body of the JSP
everything works as it should.
- Guess I better look harder at the tiles I use.
!
-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 4:20 PM
To: Struts Users Mailing List
Subject: Re: Map Backed Form/Tiles
Ray Madigan wrote:
I have narrowed the problem down to:
html-el:text property='elementMap(${element.element
I am having some difficulty with my Map Backed Form implementation.
I have in my Form:
private Properties elementMap = null;
public String getElementMap ( String key ) {
return ( String ) elementMap.getProperty ( key );
}
public void setElementMap ( String key, String value
with my Map Backed Form implementation.
I have in my Form:
private Properties elementMap = null;
public String getElementMap ( String key ) {
return ( String ) elementMap.getProperty ( key );
}
public void setElementMap ( String key, String value ) {
elementMap.put ( key, value );
}
public void
I tried this - same result? h
-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 2:18 PM
To: Struts Users Mailing List
Subject: Re: Map Backed Form
I read this somewhere (perhaps Struts in Action) and I use map-backed
properties
Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 2:18 PM
To: Struts Users Mailing List
Subject: Re: Map Backed Form
I read this somewhere (perhaps Struts in Action) and I use map-backed
properties... the methods should have String keys, but Object values eg
public
PM
To: Struts Users Mailing List
Subject: Re: Map Backed Form
Perhaps you need to step through the struts-config to make sure you are
referencing the correct form bean.
Do you access the .jsp page directly or go through an action first?
I would also look at your initialisation of the elementMap
lives in a tile. The tile declares itself a form and uses the
correct form.
I'll have to dig in the source I guess.
-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:29 PM
To: Struts Users Mailing List
Subject: Re: Map Backed Form
Perhaps you
difficulty with my Map Backed Form implementation.
I have in my Form:
private Properties elementMap = null;
public String getElementMap ( String key ) {
return ( String ) elementMap.getProperty ( key );
}
public void setElementMap ( String key, String value ) {
elementMap.put ( key, value
Does it work to combine map-backed form property and multiselect.
My code :
public void setValue( String key, String[] val )
public String[] getValue(String key)
does not work.
Is there any other way to do it ?
Thanks for your help.
Jacek
13 matches
Mail list logo