<core:out value="a"/><c:out value="${prop.a}"/>
<core:out value="b"/><c:out value="${prop.b}"/>
After printing the known keys, want to print the remaing pairs. For that what i have did is using <core:forEach> loop printed everything. Whats the issue in this is, the already printed values also printing once again.
For example,
a : A
b : B
e : E
d : D
c : C
b : B
a : A
So i want to remove the 'a' and 'b' after printing it and before passing it to the loop.
In Simple word, properties.remove("a") in Java.
Is it achieved via any JSTL tags.
Rgds, Prabhu
Erez Efrati wrote:
I don't really have the entire picture here but I would suggest:
In you PropertiesBean split between the known, and dynamic containers of properties and then in the page pull them using different property on the PropertiesBean. This way it would be much more clear which is expected and which is dynamically added. Simply put to HashMaps on the PropBean and two sets of set/get to get and set those properties.
This is only one solution I guess there are more. :)
Hope this helps, Erez
-----Original Message-----
From: K.M.Prabhu [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 3:26 PM
To: [EMAIL PROTECTED]
Subject: Remove a key from collection.
Hi All,
I am having a collection of properties with keys of the form, say 1,2,3,4,..... Of these, a few keys are well known (say 1,2,3) and the others will be
added to the properties object at run time. I want to display them in an
order in my UI, say 1,2,3,4...... To do this, first I get the values for the
known keys (1,2,3). For the remaining things, I put them in a loop and print it. But, the problem I face is , the already printed value will also print
once again (since I will not know if the key is present in my known list
or not). My question is how can i remove the key values once i print it.
Can anyone help me?
Thanks, Prabhu
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]