How to extend struts tags?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Patrick_Heusser
Posted On:   Friday, March 8, 2002 02:01 PM

Hi I want to enhance the struts framework. My intention: I need extra functions, like a radiobutton with a attribute that speciefies a standard picture in front of the radio. Finally I would like have to something like <%=bean.imgpath%>" value="v" property="p" /> The new tag would just render an image and then add the normal struts radio button... I can not see a solution for my problem, because - the struts classes are final (so no inheritance possible) - an own tag, that encapulates the struts tag is not possible too, because jsp does not allow recursive parsing. any ideas? please   More>>

Hi



I want to enhance the struts framework. My intention: I need extra functions, like a radiobutton with a attribute that speciefies a standard picture in front of the radio.



Finally I would like have to something like

<%=bean.imgpath%>" value="v" property="p" />



The new tag would just render an image and then add the normal struts radio button...


I can not see a solution for my problem, because

- the struts classes are final (so no inheritance possible)

- an own tag, that encapulates the struts tag is not possible too, because jsp does not allow recursive parsing.

any ideas? please, point me into the right direction. also links to papers are very welcome. i just want to solve this problem.



greetings, patrick

   <<Less

Re: How to extend struts tags?

Posted By:   Markus_Neifer  
Posted On:   Tuesday, March 12, 2002 03:38 AM

Patrick, inheritance is not the only way to reuse code. If you look into the source code for html:radio (or even better bean:write), you will see that there's not that much code because several utility classes are used (BeanUtils, ResponseUtils, PropertyUtils, ...). This utility classes should make implementing your tag easier.


HTH, Markus


PS: you might want to use the Jakarta Commons Beanutils package since the Struts classes are marked as deprecated.


PPS: org.apache.struts.taglib.html.RadioTag is not final in revision: 1.3.2.2. What revision are you refering to?

About | Sitemap | Contact