Re: [Webwork-user] Web components?
Brought to you by:
baldree,
rickardoberg
From: Rickard <ri...@jb...> - 2000-12-15 11:58:31
|
Hi! Hristo Stoyanov wrote: > Remeber we talked about this some while ago. > Basically, we talked about using Swing components > directly, because they are JavaBeans anyways. > However, since they are missing the webwork Action > interface, we might want to use the JDK 1.3 proxy > classes to "adapt" the existing Swing components to > the > webwork interfaces. A good place to do that is the > dispatcher servlet. When an action is instantiated, > (the getAction() method) we check if it implements > the Action interface. If not, create a proxy class. > Most of the "execute()" logic should come from > view.properties. > If we manage to do that, the swing components can be > reused in a GUI J2EE applications later. <snip> Well, there are other ways. Let's say we have a bean foo.Menu that has getMenu(). So, now we want a generic control "menu.jsp" and we want to feed in the Menu bean as source, but without making foo.Menu an action. How to do this? Answer: use the "bean" tag and $ names! Like this. In menu.jsp: <webwork:bean name="$class"> Menu: <UL> <webwork:iterator name="menu"> <LI><webwork:property/></LI> </webwork:iterator> </UL> </webwork:bean> and invoke menu.jsp like this: <webwork:include page="menu.jsp"> <webwork:param name="class" value="foo.Menu"/> </webwork:include> Done! The bean will be instantiated, and we can extract data from it, but it does not have to be an Action! Is this ok? > 2)Design an comprehensive EJB backend. What happened > to EBS? It's coming... soooo much to do these days that's all *sigh*... /Rickard -- Rickard Öberg Email: ri...@jb... |