Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Please Help: Is struts javascript capable of doing conditional display?

Please Help: Is struts javascript capable of doing conditional display?

2007-02-01       - By Christopher Schultz

 Back
-- --BEGIN PGP SIGNED MESSAGE-- --
Hash: SHA1

Sriharsha,

sriharsha.chevuru@(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: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.