Re: HashMap with String as key

2019-03-18 Thread Lukasz Lenart
czw., 14 mar 2019 o 21:38 Prasanth napisał(a): > > Sorry if I caused any confusion. This thread was meant to discuss String > keys. I do have forms where I am using numeric keys and they work fine. > > I think I found a solution to my problem. Struts seems to expect single > quotes for the keys

Re: HashMap with String as key

2019-03-14 Thread Prasanth
Sorry if I caused any confusion. This thread was meant to discuss String keys.  I do have forms where I am using numeric keys and they work fine. I think I found a solution to my problem. Struts seems to expect single quotes for the keys when the key is string. Updated code is shown below. Also

Re: HashMap with String as key

2019-03-14 Thread Lukasz Lenart
czw., 14 mar 2019 o 20:11 Prasanth napisał(a): > If there a setting for struts that need to be changed to allow non numeric > keys? Nothing like that, but I suggest to start over because you first reported that you want to have a numeric key and now you say you don't. So maybe start a new topic

Re: HashMap with String as key

2019-03-14 Thread Prasanth
The text field is also correctly populated based on the values in the hashmap (populated from database before showing the form). So the filed is correctly linked to the hashmap. I have even tried using an alphabet as a separator but that doesn't work either. But if I remove the h

Re: HashMap with String as key

2019-03-13 Thread Prasanth
The html form generated is correctly showing the key but the hashmap doesn't have a value for 22419-23545 when the form is submitted. Thanks, Prasanth On 3/12/19 9:26 AM, Prasanth Pasala wrote: > Lukasz, > > There is no new keys in the hash map. The hash map is not updated at

Re: HashMap with String as key

2019-03-12 Thread Prasanth Pasala
Message- >> From: Lukasz Lenart >> Sent: Tuesday, March 12, 2019 10:52 AM >> To: Struts Users Mailing List >> Subject: Re: HashMap with String as key >> >> pon., 11 mar 2019 o 18:41 Prasanth napisał(a): >>> When you have a HashMap backed form and String

RE: HashMap with String as key

2019-03-12 Thread Yasser Zamani
(regarding your previous emails background) Please also consider that the key 2432-123 is not further Long. It's String. Regards. >-Original Message- >From: Lukasz Lenart >Sent: Tuesday, March 12, 2019 10:52 AM >To: Struts Users Mailing List >Subject: Re: HashMa

Re: HashMap with String as key

2019-03-12 Thread Lukasz Lenart
pon., 11 mar 2019 o 18:41 Prasanth napisał(a): > When you have a HashMap backed form and String as key, are there any > restrictions on the characters allowed? > > I have keys like "2432-123" as I have to incorporate two ids in the key. When > I have these keys t

HashMap with String as key

2019-03-11 Thread Prasanth
Hi, When you have a HashMap backed form and String as key, are there any restrictions on the characters allowed? I have keys like "2432-123" as I have to incorporate two ids in the key. When I have these keys the HashMap is not getting populated. If I change it, so that there is o

Re: Using HashMap in selectbox

2012-03-28 Thread Steven Yang
i think you can turn the map to a Set> then use it as listKey as "getKey()" or "key" and listValue as "getValue()" or "value" On Wed, Mar 28, 2012 at 6:16 PM, Rakeshkumar Parmar < rakeshkumar_par...@persistent.co.in> wrote: > I think it req

RE: Using HashMap in selectbox

2012-03-28 Thread Rakeshkumar Parmar
I think it requires list. So you can get values from hashmap using values() method.then apply person.name. Regards, Rakesh -Original Message- From: Shrinivas Parashar [mailto:shrinivas_paras...@symantec.com] Sent: Wednesday, March 28, 2012 3:44 PM To: Struts Users Mailing List Subject

Using HashMap in selectbox

2012-03-28 Thread Shrinivas Parashar
Hi, How can use a hashMap in select box with Map key as listkey and Map values one of the property as listValue. For example I have a Map of type . In the listValue I want to provide person.name. Is this possible? Regards, Shrinivas

Element_xxx in action-convertion-properties for HashMap>

2011-05-17 Thread Hitendra Banyal
I have a HasMap> postCodeMap property in the action class, How can I write Element_xxx in action-convertion-properties? I tried Element_postCodeMap = java.util.List and Element_postCodeMap = java.util.Map.Entry and Element_postCodeMap = java.util.List But it didn't work. Sincerely, Hitendra ban

Re: [OT] Return Hashmap java object from servlet

2009-07-07 Thread Nils-Helge Garli Hegvik
What exactly are you trying to do? Do you want to serialize the hashmap to the client as a Java object, or do you want it converted to xml? What does the consuming end expect? If you really want to produce xml, take a look at one of the many java <-> xml libraries that exists (although, som

Re: [OT] Return Hashmap java object from servlet

2009-07-07 Thread Musachy Barroso
was this a question? musachy On Tue, Jul 7, 2009 at 9:06 AM, Ashish Kulkarni wrote: > HiIs it possible to return Hashmap object from java Servlet,  What kind of > ContentType can i set to the response? > > The other option is to set data from HashMap into XML and return it as XML >

[OT] Return Hashmap java object from servlet

2009-07-07 Thread Ashish Kulkarni
HiIs it possible to return Hashmap object from java Servlet, What kind of ContentType can i set to the response? The other option is to set data from HashMap into XML and return it as XML file. for example. I have servlet like below public class ReturnObjectServlet extends HttpServlet

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-20 Thread Ylva Degerfeldt
>> I still wonder how Struts can possibly know that the >> objects I've put in my HashMap are of my InfoObject type. > > Why would it need to? To be able to execute the getState method that belongs to the InfoObjects. But maybe Struts 2 is that "smart" so it can

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-20 Thread Dave Newton
--- On Wed, 8/20/08, Ylva Degerfeldt wrote: > I still wonder how Struts can possibly know that the > objects I've put in my HashMap are of my InfoObject type. Why would it need to? Dave - To unsubscribe, e-m

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-20 Thread Ylva Degerfeldt
Yes, I tried: but it doesn't write anything at all. I still wonder how Struts can possibly know that the objects I've put in my HashMap are of my InfoObject type. (I'm not so good at reflection) When I created that HashMap, first I just did "HashMap myMap = new HashMap()&qu

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-19 Thread Dustin Pearce
'm wondering if it's a matter of type conversion. The get method of HashMap returns an Object and I have not told Struts in any way that this value should be converted to my InfoObject. Perhaps I should do that, in an xml file or something? (I'm a real newbie at Struts 2 as you can

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-19 Thread Ylva Degerfeldt
ed: but that still returns false though I know it should return true. I'm wondering if it's a matter of type conversion. The get method of HashMap returns an Object and I have not told Struts in any way that this value should be converted to my InfoObject. Perhaps I should do that, in

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-19 Thread Dustin Pearce
want to use "thisValue" as a key to the HashMap "myMap" for finding an object of my "InfoObject" class. The "InfoObject" class has a property called "state". I want to check for the received "InfoObject" if the "state" property =

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-19 Thread Ylva Degerfeldt
I tried to show the value of "information" using s:property but it didn't show anything. So there must be something wrong with my code. What's the right way to get an object instance from a Map (like this) and use one of its properties in S2? Please help! /Ylva On Tue, Aug 19, 2008 at 2:53 PM, D

Re: [S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-19 Thread Dave Newton
--- On Tue, 8/19/08, Ylva Degerfeldt wrote: > > [...] > About the s:set tag, I'm not sure if that's the way to do it > but I don't know how to check if it's correct when debugging. Why not just display the contents of the variable you think you're setting? Dave

[S2]Problems using property of POJO stored in a HashMap stored in the session

2008-08-19 Thread Ylva Degerfeldt
trings and call each value "thisValue". Then I want to use "thisValue" as a key to the HashMap "myMap" for finding an object of my "InfoObject" class. The "InfoObject" class has a property called "state". I want to check for the received

HashMap< String, ArrayList >: Unable to populate the Array List from JSP

2008-05-12 Thread ravi_eze
verter Element_mapOfList=java.util.ArrayList Key_mapOfList=java.lang.string I see a weird behavior: only the convertToString() function being called... had any body fixed such issues??? please help cheers, ravi -- View this message in context: http://www.nabble.com/HashMap%3C-String%2C-ArrayList%3CStr

Re: HashMap< String, ArrayList >: Unable to populate the Array List from JSP

2008-05-08 Thread ravi_eze
eas as how to go with this issue??? sorry for the wrong example prev. regards, ravi -- View this message in context: http://www.nabble.com/HashMap%3C-String%2C-ArrayList%3CString%3E-%3E%3A-Unable-to-populate-the-Array-List-from-JSP-tp16975469p17129314.html Sent from the Struts - User mailing

Re: HashMap< String, ArrayList >: Unable to populate the Array List from JSP

2008-04-29 Thread Wes Wannemacher
Assuming you have appropriate getters and setters on your action for the HashMap of ArrayLists, you should be able to set them using indexing like this - or (where "i" is an integer representing the index where you want the String set) http://www.ognl.org/2.6.9/Document

HashMap< String, ArrayList >: Unable to populate the Array List from JSP

2008-04-29 Thread ravi_eze
hi, When we had the data structure as: HashMap the following jsp fragment was able to populate it: but the same thing is not working with HashMap > when we tried: (); mapOfList.put("key", new ArrayList()); still no luck Using POJOs instead of hashmap would not fit to my requi

Re: HashMap and updates

2008-03-25 Thread Laurie Harper
put these lists in a HashMap with different keys. Map employeeMap = new HashMap(); employeeMap.put ("HE", hourlyEmployeeList); employeeMap.put ("CE", contractEmployeeList); employeeMap.put ("FE", fullTimeEmployeeList); I am able to display the list of employees p

HashMap and updates

2008-03-25 Thread Kalpesh Modi
HashMap with different keys. Map employeeMap = new HashMap(); employeeMap.put ("HE", hourlyEmployeeList); employeeMap.put ("CE", contractEmployeeList); employeeMap.put ("FE", fullTimeEmployeeList); I am able to display the list of employees properly. But when I change t

Re: How to write JSP to populate back a hashmap of custom objects

2008-01-08 Thread Rubbinio
ttp://www.vitarara.org/cms/struts_2_cookbook/updating_a_list_of_domain_entities > > I followed that example exactly and was able to get a form submit using > maps working. > > -- View this message in context: http://www.nabble.com/How-to-write-JSP-to-populate-back-a-hashmap-of-custom-o

Re: How to write JSP to populate back a hashmap of custom objects

2008-01-07 Thread jimkski
. -- View this message in context: http://www.nabble.com/How-to-write-JSP-to-populate-back-a-hashmap-of-custom-objects-tp14665986p14666537.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail

How to write JSP to populate back a hashmap of custom objects

2008-01-07 Thread Rubbinio
) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } } And the following action class that uses a HashMap of such objects: public class

Re: S2: HashMap - from jsp to action

2007-12-05 Thread Wes Wannemacher
Sure Martin, this link provides a good starting point - http://java.sun.com/products/jsp/reference/techart/unifiedEL.html -Wes On 12/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Wes > > Is there a link which describes UEL for our own edification? > > Thanks/ > M- > -- Wesley Wannem

Re: S2: HashMap - from jsp to action

2007-12-05 Thread Wes Wannemacher
gt;> 'Decaf'}}" - does work ): > >> > >> > >> > >> > >> > >> > >> cilquirm wrote: > >> > > >> > the way to construct a map in ognl is > >> > > >> > %{ key : value , key

Re: S2: HashMap - from jsp to action

2007-12-05 Thread Dave Newton
http://www.google.com/search?q=unified+expression+language --- J&M <[EMAIL PROTECTED]> wrote: > > Thanks for the reply. Very informative. I have not heard of UEL yet, can > you > send me some references. I know about about EL. I tried the escape as you > suggested. But this fails with no errors

Re: S2: HashMap - from jsp to action

2007-12-05 Thread
oProfiling(DefaultActionInvocation.java:224) >> at >> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) >> at >> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) >>

Re: S2: HashMap - from jsp to action

2007-12-05 Thread mgainty
Hi Wes Is there a link which describes UEL for our own edification? Thanks/ M- - Original Message - Wrom: FGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWW To: "Struts Users Mailing List" Sent: Wednesday, December 05, 2007 9:55 AM Subject: Re: S2: HashMap - from jsp to action > My

Re: S2: HashMap - from jsp to action

2007-12-05 Thread Wes Wannemacher
gt; org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834) > at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482) > at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257) > at org.apache.jasper.compiler.Node$Visitor.v

Re: S2: HashMap - from jsp to action

2007-12-05 Thread
m/ognl/html/LanguageGuide/collectionConstruction.html#mapConstruction > > hth, > -a > > > > Hartrich, James CTR USTRANSCOM J6 wrote: >> >> I'm iterating a collection (keys) from s:action to get corresponding >> hashmap (values) from aforementioned s

Re: Iterate Hashmap with s:iterate

2007-09-21 Thread Cory D. Wiles
Example code: On 9/21/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- j alex <[EMAIL PROTECTE

Re: Iterate Hashmap with s:iterate

2007-09-21 Thread Dave Newton
--- j alex <[EMAIL PROTECTED]> wrote: > The entire expresion is OGNL, not just the "key" value from the stack. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Iterate Hashmap with s:iterate

2007-09-20 Thread j alex
gt; > > > > > Dave, > > > > > Where did you find the documentation on the > > > > > "pseudo-property"? > > > > > > > > > > On 9/12/07, Dave Newton <[EMAIL PROTECTED]> > > > > > wrote: > > > > &

Re: Iterate Hashmap with s:iterate

2007-09-12 Thread Cory D. Wiles
gt; > > > > > > > On 9/12/07, Dave Newton <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > > IIRC OGNL supplies a pseudo-property "keys" that > > > > will > > > > > r

Re: Iterate Hashmap with s:iterate

2007-09-12 Thread Dave Newton
--- Josh Vickery <[EMAIL PROTECTED]> wrote: > I'm a little curious about the inclusion of the > double parentheses at the end of "entrySet" -- OGNL, > as far as I am concerned, is a bit of strange beast. It's a method call -- not property access. d.

Re: Iterate Hashmap with s:iterate

2007-09-12 Thread Josh Vickery
roperty"? > > > > > > On 9/12/07, Dave Newton <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > IIRC OGNL supplies a pseudo-property "keys" that > > > will > > > > return a list of keys present in the map.

Re: Iterate Hashmap with s:iterate

2007-09-12 Thread Cory D. Wiles
t; > > > IIRC OGNL supplies a pseudo-property "keys" that > > will > > > return a list of keys present in the map. > > > > > > --- Wesley Wannemacher <[EMAIL PROTECTED]> > > > wrote: > > > > > > > If I remember cor

Re: Iterate Hashmap with s:iterate

2007-09-12 Thread Dave Newton
TECTED]> > wrote: > > > > IIRC OGNL supplies a pseudo-property "keys" that > will > > return a list of keys present in the map. > > > > --- Wesley Wannemacher <[EMAIL PROTECTED]> > > wrote: > > > > > If I remember corre

Re: Iterate Hashmap with s:iterate

2007-09-12 Thread Cory D. Wiles
r <[EMAIL PROTECTED]> > wrote: > > > If I remember correctly, to use the s:iterator tag, > > you have to use an > > object that has an 'iterator()' method. HashMap does > > not implement > > java.util.List... > > > > To iterate over a Has

RE: Iterate Hashmap with s:iterate

2007-09-12 Thread Dave Newton
IIRC OGNL supplies a pseudo-property "keys" that will return a list of keys present in the map. --- Wesley Wannemacher <[EMAIL PROTECTED]> wrote: > If I remember correctly, to use the s:iterator tag, > you have to use an > object that has an 'iterator()' m

RE: Iterate Hashmap with s:iterate

2007-09-12 Thread Wesley Wannemacher
If I remember correctly, to use the s:iterator tag, you have to use an object that has an 'iterator()' method. HashMap does not implement java.util.List... To iterate over a Hashmap, get the keyset [tempMap.ketSet()] from it. The keyset is a List and you can get an iterator from the

Iterate Hashmap with s:iterate

2007-09-12 Thread Cory D. Wiles
I have an action that returns a hash map that I need to output both the key and value, but I can't figure out how to access each property with s:iterate. Any suggestions would help. The HashMap is being set in my action and returned populated (verified with ). // Action snippet Ite

displaying a linked hashMap

2007-08-28 Thread sdeepak
I have a problem in displaying the Linked HashMap my linked haskmap looks like this LinkedHashMap<,>> i am trying to display attributes of slotvVO in the jsp but cannot see the results help me in achieving this -- View this message in context: http://www.nabble.com/displaying-a-linke

Re: S2: HashMap - from jsp to action

2007-08-09 Thread cilquirm
rresponding > hashmap (values) from aforementioned s:action then creating multiple > s:select. > > > > Does anyone know how to construct a hashmap with ognl on a jsp? What > type is then needed on the action to populate the hashmap? > > > > > > James

S2: HashMap - from jsp to action

2007-08-08 Thread Hartrich, James CTR USTRANSCOM J6
I'm iterating a collection (keys) from s:action to get corresponding hashmap (values) from aforementioned s:action then creating multiple s:select. Does anyone know how to construct a hashmap with ognl on a jsp? What type is then needed on the action to populate the hashmap? James

Re: hashmap

2007-05-09 Thread Lance
id, typeid, patternid))); In your jsp you can get it by @see http://struts.apache.org/1.x/struts-taglib/indexedprops.html Cheers, Lance. jalal udeen wrote: hi all how to retrieve values from the HashMap i have set it as * hashMap*.put(*new* Integer(questionId),*n

hashmap

2007-05-09 Thread jalal udeen
hi all how to retrieve values from the HashMap i have set it as *hashMap*.put(*new* Integer(questionId),*new*Integer( testDAO.getMarks(catid, typeid, patternid))); how to getthese values again thanks jalaludeen

Re: iterating Vector of HashMap using Logic:iterate

2006-09-21 Thread Chris Pratt
I haven't actually tried this, but would something like this work? ${map['field2']} You might need some 's in there depending on your JSP version, but it's probably a start. (*Chris*) On 9/21/06, Venkata Phani Kumar <[EMAIL PROTECTED]> wrote: Hi, I have a

R: iterating Vector of HashMap using Logic:iterate

2006-09-21 Thread Marcello Savino
Hih, Marcello -Messaggio originale- Da: Venkata Phani Kumar [mailto:[EMAIL PROTECTED] Inviato: giovedì 21 settembre 2006 9.18 A: Struts Users Mailing List Oggetto: iterating Vector of HashMap using Logic:iterate Hi, I have a Vector. Each HashMap holds two elements as key 'f

iterating Vector of HashMap using Logic:iterate

2006-09-21 Thread Venkata Phani Kumar
Hi, I have a Vector. Each HashMap holds two elements as key 'field1' and 'filed2'. Now in jsp page i have to iterate over above vector and have to construt one combo box as below field2 could any body help how to display as above using Regards Venkata Phanikumar. G

Re: How to set a form bean property of type HashMap in jsp

2006-09-07 Thread Puneet Lakhina
tht if there is some validation error then this HashMap is not lost. So tht is why i want to set this property of type HashMap in jsp page . If all you need to do is to copy the property you can use If your hashmap is being set as a request attribute If its a property of the form bea

How to set a form bean property of type HashMap in jsp

2006-09-07 Thread Vaneet Sharma
Can anybody tell me how to set a form bean property of type java.util.HashMap in a jsp page. Actually i am prepolulating this property in action and then forwarding to a jsp page. In this jsp page i need to again set this property ,so tht if there is some validation error then this HashMap is

Re: How to retrieve value of hashmap parameter in action class

2006-06-12 Thread Richard Yee
e: Hi, I have one problem regarding how to retrieve value of hashmap parameter action action of struts. In jsp page I have code like this <% java.util.HashMap params = new java.util.HashMap(); params.put("var1","1"); params.put("var2","10");

Re: How to retrieve value of hashmap parameter in action class

2006-06-12 Thread Sony Thomas
nId",locationId); pageContext.setAttribute("paramMap",paramMap); key="common.label.view"/> Inside Action String sopId = request.getParameter("id"); Sony Nikita Desai wrote: Hi, I have one problem regarding how to retrieve value of hashmap paramete

How to retrieve value of hashmap parameter in action class

2006-06-12 Thread Nikita Desai
Hi, I have one problem regarding how to retrieve value of hashmap parameter action action of struts. In jsp page I have code like this <% java.util.HashMap params = new java.util.HashMap(); params.put("var1","1"); params.put("var2"

Re: Logic:Iterate & HashMap

2006-06-02 Thread Monkeyden
Use the name and property attributes in your iterate tag, where "name" is the name of your DTO and "property" is the name of the Map within the DTO. You can have a look at the docs here: http://struts.apache.org/struts-doc-1.2.7/userGuide/struts-logic.html On 6/2/06, Marco Mistroni <[EMAIL PROT

Logic:Iterate & HashMap

2006-06-02 Thread Marco Mistroni
Hi all, I m having a problem with logic:iterate I have a Map that contains{String, MyDTO} In my jsp I m writing following code; 0

Re: HashMap with

2006-03-27 Thread Ahmed Hashim
Sure, I prefer to use JSTL rather than Struts taglib, but should be replaced too by JSTL or Struts tags. using this way is best case for me, I have added a Map to the action form to get it works. Thanks Mark for your help. On 3/26/06, Mark Lowe <[EMAIL PROTECTED]> wrote: > > On 3/26/06, Ah

Re: HashMap with

2006-03-26 Thread Mark Lowe
On 3/26/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote: > Thanks Mark, > I tried it and it is working fine with Valid XHTML output, It is the best > solution I have till now. > But I hope that I can make it using Struts Tags if anyone know. I dont think there is, the handy thing with jstl is the way t

Re: HashMap with

2006-03-26 Thread Ahmed Hashim
Thanks Mark, I tried it and it is working fine with Valid XHTML output, It is the best solution I have till now. But I hope that I can make it using Struts Tags if anyone know. Thanks. On 3/26/06, Mark Lowe <[EMAIL PROTECTED]> wrote: > > On 3/26/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote: > > De

Re: HashMap with

2006-03-26 Thread Mark Lowe
On 3/26/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote: > Dear All, > > <% > java.util.HashMap rawSourceMap=new java.util.HashMap(); > rawSourceMap.put("id", "123"); > rawSourceMap.put("name", "ahmed"); > pageContext.setAttribute("ourrefLink",rawSourceMap); > %> > > > > > > I want to

HashMap with

2006-03-26 Thread Ahmed Hashim
Dear All, <% java.util.HashMap rawSourceMap=new java.util.HashMap(); rawSourceMap.put("id", "123"); rawSourceMap.put("name", "ahmed"); pageContext.setAttribute("ourrefLink",rawSourceMap); %> I want to replace the scriptlet with a tag but I don't know how will i add the values

Fast&Easy Populating of the HashMap attribute

2006-03-01 Thread Danny Lee
Hi guys! I have a very general question, about populating HashMaps (and other stuff, but we just take HashMaps this time). Let say, I have a Product Bean, with some simple attributes (Name, ID), and some HashMap attributes (infos, pictures, details). It's quite easy to generate a HTML

Re: html:options whith a HashMap

2006-02-12 Thread Laurie Harper
José María Tristán wrote: I create a bean: public class BeanDatos { private Map codigoM = new HashMap(); public Map getCodigoM(){ return this.codigoM; } public void setCodigoM(Map codigoM){ this.codigoM = codigoM

RE: html:options whith a HashMap

2006-02-09 Thread José María Tristán
I create a bean: public class BeanDatos { private Map codigoM = new HashMap(); public Map getCodigoM(){ return this.codigoM; } public void setCodigoM(Map codigoM){ this.codigoM = codigoM; } } And in my jsp

Re: html:options whith a HashMap

2006-02-09 Thread Aidas Semezys
whith two ArrayList to > see the > "name"(arrayCodigo) and the "label" (arrayDescripcion) > > labelName="arrayDescripcion" /> > > > Is possible do the same whith a HashMap (key

html:options whith a HashMap

2006-02-08 Thread José María Tristán
Hi, I have an application whith a html:options whith two ArrayList to see the "name"(arrayCodigo) and the "label" (arrayDescripcion) Is possible do the same whith a HashMap (key-value)?. How i say

Re: Regarding using HashMap in jsp

2006-02-01 Thread Laurie Harper
Laurie Harper wrote: This sort of question is best asked on the users list; the dev list is intended for discussion of the development of the Struts projects rather than on how to use them. Oops, sorry about that bit... :-/

Re: Regarding using HashMap in jsp

2006-02-01 Thread Vasumathi
Hi Thanks for your help. Regards vasu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regarding using HashMap in jsp

2006-01-31 Thread Laurie Harper
Vasumathi wrote: HI Anyone can tell how to write the properties value of HashMap in using This sort of question is best asked on the users list; the dev list is intended for discussion of the development of the Struts projects rather than on how to use them. To answer your question

Regarding using HashMap in jsp

2006-01-30 Thread Vasumathi
HI Anyone can tell how to write the properties value of HashMap in using Regards vasu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to write logic:iterate for the Collection of HashMap.

2005-08-19 Thread Jurn Ho
Hi Amol, please see http://struts.apache.org/userGuide/struts-logic.html especially the section on maps. Next element is with key Jurn At 10:06 PM 18/08/2005, Amol Yadwadkar wrote: Hello List, I need to display the results stored in the Hashmap. How can I achieve it by using

How to write logic:iterate for the Collection of HashMap.

2005-08-18 Thread Amol Yadwadkar
Hello List, I need to display the results stored in the Hashmap. How can I achieve it by using logic:iterate I know the way to do it for List type data. Can anyone help me in this ? Thankx n regds, Amol

Re: Reading value from HashMap via JSTL

2005-06-07 Thread Jim Kennedy
Here's how I do it: This example has the 50 US states stored in a map. state is a variable store in some scope. -Original Message- From: Grzegorz Stasica <[EMAIL PROTECTED]> Sent: Jun 7, 2005 2:46 PM To: user@struts.apache.org Subject: Reading value from HashMap via JSTL

RE: Reading value from HashMap via JSTL

2005-06-07 Thread Durham David R Jr Ctr 805 CSPTS/SCE
> How can I access value for specific key from JSTL > > > > Or is it better way to store these values. I rule out having each > value as a different variable since I'll have 52*3 different > variables You can just do: ${myhashmap.mykey} - Dave ---

Reading value from HashMap via JSTL

2005-06-07 Thread Grzegorz Stasica
hi, I've a page on which there are a lot of similar data. For every week in a year (52 total) I have 3 different values for instance: week 1 efficiency=98 complaints=45 other=3 I've decided that HashMap will be the best to store all of the values and access each value base on k

Re: Displaying a HashMap as a

2005-03-08 Thread Jeff Beal
Good point. I had forgotten about that class (added in JDK 1.4). On Tue, 08 Mar 2005 11:18:50 -0500, Nidel, Mike <[EMAIL PROTECTED]> wrote: > Note that there's also the java.util.LinkedHashMap which will > maintain whichever order you insert the values in. This gives -- Jeff Beal Webmedx, Inc.

RE: Displaying a HashMap as a

2005-03-08 Thread Nidel, Mike
PROTECTED] > Sent: Tuesday, March 08, 2005 9:34 AM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: Re: Displaying a HashMap as a > > > Even if the results coming out of the database are sorted, throwing > them into a non-sorted Collection, like a basic HashMap, wi

Re: Displaying a HashMap as a

2005-03-08 Thread Jeff Beal
Even if the results coming out of the database are sorted, throwing them into a non-sorted Collection, like a basic HashMap, will un-sort them. If you use a List, you just preserve the database sort order. If you use a TreeMap, you can get the same sort order, but the TreeMap object will go

Re: Displaying a HashMap as a

2005-03-08 Thread David Johnson
my thought was just to let the DB do the work on the sorting. Is that bad? On Mon, 7 Mar 2005 21:29:08 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote: > From: "James Mitchell" <[EMAIL PROTECTED]> > > I wouldn't use a Map, I would go with a List. Primarily for ordering. > > I use java.util.TreeMap

Re: Displaying a HashMap as a

2005-03-07 Thread Wendy Smoak
From: "James Mitchell" <[EMAIL PROTECTED]> I wouldn't use a Map, I would go with a List. Primarily for ordering. I use java.util.TreeMap-- automatic alphabetical order for my lists of (String) codes and descriptions. -- Wendy Smoak -

Re: Displaying a HashMap as a

2005-03-07 Thread James Mitchell
ot; Sent: Monday, March 07, 2005 11:33 AM Subject: Displaying a HashMap as a Hi all I have a HashMap in my application context called "codes" that contains a bunch of key,value pairs where the key is an Integer representing the codeID and the value is a string representing the

Re: Displaying a HashMap as a

2005-03-07 Thread David Johnson
CodeBean objects onto the application context at application startup (inder the name "codes". (a CodeBean has a codeID and codeName attribure with getters and setters) I actualyl rethought the way I was saving data in the application context, and an ArrayList of code beans seemed nicer than a ha

Re: Displaying a HashMap as a

2005-03-07 Thread Wendy Smoak
From: "David Johnson" <[EMAIL PROTECTED]> > I simply want to create a select box containing all the items in my > HashMap (displaying the codeName but passing the codeID) > What's the easiest way to do this? Can I do this wil just a vanilla > HashMap? The examples

Displaying a HashMap as a

2005-03-07 Thread David Johnson
Hi all I have a HashMap in my application context called "codes" that contains a bunch of key,value pairs where the key is an Integer representing the codeID and the value is a string representing the codeName I simply want to create a select box containing all the items in

HashMap backed FormBean and validation

2005-02-11 Thread Tom Ziemer
turn is supposed to iterate over the attributes and display their values in form fields, so they can be edited. As I mentioned, I do not know in advance which attributes the object contains, so I have to use a hashmap backed formBean to store the information. But how can I validate the user input

Re: [OT]Hashtable Vs Hashmap, Vector Vs ArrayList

2005-01-12 Thread DGraham
Choosing the right Collection. http://www.javapractices.com/Topic65.cjp Ashish Kulkarni <[EMAIL PROTECTED]> 01/11/2005 10:33 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject [OT]Hashtable Vs Hashmap, Vector Vs ArrayList Hi wh

Re: [OT]Hashtable Vs Hashmap, Vector Vs ArrayList

2005-01-11 Thread Caroline Jen
A Map is a class that stores key-value pairs and provides a way to locate a value based on the key. The Hashtable class is a synchronized implementation of the Map interface. The HashMap is better in terms performance because the hashing algorithm it uses. The Hashtable is synchronized so

Re: [OT]Hashtable Vs Hashmap, Vector Vs ArrayList

2005-01-11 Thread kjc
Ashish Kulkarni wrote: Hi what is difference between Hashtable and Hashmap , also Vector and ArrayList. What are key points to consider when selecting one over the other Ashish __ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http

  1   2   >