-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sriharsha,
[EMAIL PROTECTED] wrote: > I am new to struts and these are kind of first footprints towards it. Your questions does not seem to be directly Struts-related, which is why I have marked it as "off topic". I do have some notes, though, below. > Suppose my present application which is using extensive javascript and has > some functionality like this: If a text box value is something then > display and populate a select box besides it. > > How do we achieve this kind of functionality in Struts which speaks about > separating business logic with view part? Struts separates business logic from the view by encouraging you to put all of your logic in Action classes, or even in classes /used/ by your actions (with the actions just for shuttling data back and forth between the display logic and the business logic). Your javascript is entirely view-related and is best kept in your JSPs or other templates that you use to generate web content. Your javascript does not need to change in order for you to adopt Struts. > I know there is validation framework available and it does some > validation but how about business oriented flow of view. The validation framework is only for "input validation": things such as making sure that form submissions contain expected data (like "name" field cannot exceed 100 characters or that the "age" must be between 0 and 100, for example). The validation framework is not intended to solve any business-oriented problem (except that input validation must be done at some point!). Struts will not help you design your business flows or anything like that. Rather, it will help you implement your web application in a way that encourages separation between layers that you already will need. When I first started using Struts, I though "this is nothing special... I could build all of this myself and use it, instead". I was absolutely right: I could have built it all myself. But, Struts already exists and so you /don't have to/ build it all yourself. It's a web application framework. It contains all the stuff that you'd have to do yourself to build a web application, but that has nothing to do with business logic. This project provides all of the tools necessary to build a web application /except/ for the views (pages) and business logic. The rest is up to you. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFwl699CaO5/Lv0PARAhk2AKCmq5/lLy64ReocT7ZaFb1OUzRDXwCePqej z8Qp1tfSCNePjZmT+W9CUqc= =unym -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]