Thank you for submitting your request to Quest Software Technical Support. We are unable to process your request because our records indicate that you are not registered for Technical Support.
To register, logon to our Supportlink web site http://www.quest.com/support , and self-register from the web. Or, you can phone Quest at one of the numbers below to register. Once you have registered, you can submit your request within Supportlink, by email at [EMAIL PROTECTED], by phone at one of the numbers below. Please do not reply to this email. If this is an URGENT matter please contact Quest Technical Support via telephone at one of the numbers listed below. Thank you, Quest Software Technical Support www.quest.com/support Quest Software Technical Support - Canada 902.442.5700 Quest Software Technical Support - United Kingdom 44.1628.601007 Quest Software Technical Support - United States 949.754.8000 > --------------------Original Message-------------------- > From: "Pedro Emanuel de Castro Faria Salgado" [mailto:[EMAIL PROTECTED] > Sent: Fri, 22 Aug 2003 11:14:49 +0100 (WEST) > To: [EMAIL PROTECTED] > Subject: RE: Horizon: a view management plugin > > Hi Hue, > > > I must confess to being a bit confused! What is the difference between > > your approach and getting an instance of a Dyna, viz: > > > > DynaActionFormClass dafc = > > DynaActionFormClass.getDynaActionFormClass("Dyna-Definition-Name-In-Struts-C > > onfig"); > > With a form bean your goal is to get/pass the data from/to the user, > validate and have an object to pass to somekind of usecase implementation > method. > > You can also use the framework to define simple DTOs to keep the > presentation layer decoupled from the business layer (pg.57 Chuck > Cavaness's book - it even says dont use the action form to > pass data to the business layer :) - you could use > more arguments on the business layer method signature and make it > decoupled...). > > I know that on the same page of the book it says that action forms > are used to transfer data back and forth to user... but for > me a think form beans are just to get user input... in other words, > to use them with a <html:form>. > I tryed what you wrote above and started mixing up definitions > (and i am somewhat organized and set standards on defining labels... > but i am a human). > > If i make a new bean definition just to present data to the user > on a form bean i think all gets rather confusing... more > if you see the example on page 56, he defines the views in a > somewhat different way... one form bean, with one property that is > Java class that will hold all the information...!!! -> +1 Java class > +several getter/setters +severall/2 attributes... > he doesnt use form properties at all... > The data process is something like: > > user -> form-bean -> action -> populate dto (or not) > -> business layer -> dto -> action -> form-bean -> user > > The place where he uses the java class ItemDetailView(pg. 161, > hope you hve the book) could be replaced by > a dyna-bean (never defined on a form-bean) and some > BeanUtils methods would do the rest. > > If you want you can still define a form-bean on struts-config file > to present data to the user. Something like: > <form-bean name="form2View" type="..."> > <form-property name="view" > property="org.apache.commons.beanutils.DynaBean"/> > </form-bean> > I usually have a superclass action method that registers a > dynabean on a request with a predefined application key attribute > for views. > > This way i save a new Java class definition and a form-bean declaration > on struts.(dont see no point in adding a lot of duplicate > definitions with the same properties just to have different names...though. > on my documentation i just point to the xml definition name and > that's it). > > > DynaActionForm myBean = (DynaActionForm) dafc.newInstance(); > > > > At least with the above approach the beans are stored in struts-config > > in the usual struts syntax - it's just they're not used in the action > > "name" parameter - but are created on-the-fly in an action (or wherever) > > with the above code. > > > > I'm concerned I may be missing some obvious advantage to your approach - > > hence the reason for the question! > > You're right, but... > > The framework doesnt bring nothing new (the "powder" > has already been discovered :), sorry ), it can help separate > the use of dyna beans: some are to retrieve data (form beans), > others are to present data (form-beans that i dont use)... > and others are to decouple the presentation layer from the business layer > (dto). > > I am not trying to convince anyone about anything... > i just found the framework convenient and very useful for me... > > Thank you for the comments... send more like those > it is always a pleasure to discuss ideas :) > > Pedro Salgado > > > > > > Hue. > > > >> -----Original Message----- > >> From: Pedro Emanuel de Castro Faria Salgado > >> [mailto:[EMAIL PROTECTED] > >> Sent: 21 August 2003 16:15 > >> To: [EMAIL PROTECTED] > >> Subject: Re: Horizon: a view management plugin > >> > >> > >> > >> > Pedro Emanuel de Castro Faria Salgado wrote: > >> > > >> >>Hi, > >> >> > >> >> I have built a plugin for Struts that creates view beans using > >> >>dynabeans that are defined on a xml file and i was wondering if > >> anyone > >> >> in the Struts project/mailing list was interested on checking the > >> use of it? > >> >> > >> > When I see dynabean are you saying BeanUtils.DynaBean and what is a > >> 'view bean', > >> > do you mean a Action Form ? > >> > >> yes > >> > >> > If so what is the difference between your > >> > plugin and a DynaActionForm ? > >> > >> i think, actually, there is none... the difference is for what i use > >> the view beans for: transfering data from actions to > >> build combobox on form and present data that isn't on a form. > >> > >> i know i can use the form itself to put a collection to > >> build a combobox and use another form bean property > >> to store the user input but it is less > >> confusing if i define forms with only the properties the > >> user can enter data and > >> another bean for transmitting data (dto... in my case i call it > >> view bean). > >> > >> before the plugin i had to define a new java class > >> (attributes + getters/setters) for each > >> new dto i wanted, now, i only need to add some lines > >> to a xml file... > >> > >> > > >> > Given that your plugin is generally useful then there are several > >> options : > >> > > >> > 1) Since web space can gotten for free now days you could always > >> post it > >> > on a site with > >> > some documentation on how to use it. > >> > >> i will see what i can do... > >> > >> > 2) We are using the http://www.sf.net/projects/struts site as an > >> incubator for projects you can post there > >> > to see if there is interest. > >> > >> thank you for the tip... > >> > >> > 3) Find someone else with a struts web site, that would host it. > >> > > >> > Most importantly having an example, that is documented is key. > >> > > >> > >> I have already sent the source on another email so > >> you can take a look (src + javadoc + ant file) > >> and i am finishing a small web app. > >> > >> > >> thanks for the tips... > >> > >> Pedro Salgado > >> > > >> > > >> > > >> > --------------------------------------------------------------------- > >> 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] > >> > >> > >> --- > >> Incoming mail is certified Virus Free. > >> Checked by AVG anti-virus system (http://www.grisoft.com). > >> Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 > >> > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 > > > > > > --------------------------------------------------------------------- To > > unsubscribe, e-mail: [EMAIL PROTECTED] For > > additional commands, e-mail: [EMAIL PROTECTED] > > > > Pedro Salgado > (JuniFEUP) > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >

