Pattern Matching?
Hi,
I have a query in rendering a dyanimc html object based on certain condition in a JSP page .I have follwing inputs
String myStr = " I am born in $$1$$ and my age is $$2$$";
In the above string , i have to replace the pattern $$<no>$$ with specific objects.
I have a sequence in which the objects should get displayed.
say for eg: an Hashmap holding the seq um and the object of the particular sequence...
HashMap myObjSequence.put( seqno,object_to_be_displayed)
ie. HashMap myObjSequence.put( 1,selectbox)
HashMap myObjSequence.put( 2,textbox)
i need to retrieve the sequence from the hashMap and find the sequence in the below string
ie for : $$1$$ - i need to replace this with a html droplist or selectbox object with the list of countries and $$2$$ should replace with a textbox.Is there any existing pattern for such an approach? if not, how it can be accomplished ?
Thanks,
kuil

