| Author |
Calling Custom tag Dynamically
|
Shashi Prakash
Ranch Hand
Joined: Mar 28, 2007
Posts: 40
|
|
Hi, I have many Custom tags in my application.. I wanted to use diffent tags based on some condition.. e.g.. Suppose I have myRadio and mySelect custom tag.. and I want to call these based on some condition.. <myTag some variable) /> Here (Some variable) should be replaced by myRadio or mySelect based on given condition.. How can I implement this.. Please help me with this..
|
Thanks,<br />Target Scwcd<br />SCJP 1.4
|
 |
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
|
posted

0
|
|
you cannot do it the way you ask, but you can surround your tag with a <c:if> tag from JSTL
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56192
|
|
|
Or define the tags in the first place to be able to detect when they should manifest themselves in different ways.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Shashi Prakash
Ranch Hand
Joined: Mar 28, 2007
Posts: 40
|
|
you cannot do it the way you ask, but you can surround your tag with a <c:if> tag from JSTL ---------------------------- Yes I can do this but the problem is that I have so many dynamic attributes .. and I don't want to have repetitive code ...
|
 |
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
|
posted

0
|
|
then Bear has the workable solution
|
 |
 |
|
|
subject: Calling Custom tag Dynamically
|
|
|