wood burning stoves 2.0*
The moose likes JSP and the fly likes Best way to design a dynamic jsp form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Best way to design a dynamic jsp form" Watch "Best way to design a dynamic jsp form" New topic
Author

Best way to design a dynamic jsp form

YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
Dear all,

I am current designing a jsp form that will allow user to view some business functions such as cash balance, stock balance, as so on. Each of them has a table to render them. I want to make things User-friendly, which means the table will display information only if the user click on the "expand" icon next to the table title. The expand icon will then "shift" to "collapse" icon and all the details will be shown from the table. The user can collapse the table by clicking on the collapse icon again. The icon will trigger the form action and request the server to return the status




However, I want to know if it's a good design or not ? Is it better if I use javascript instead of java ?

Morever, I want to learn more sophisticated Jsp Layout design so that the user will be very happy, any cooL links?

Thanks very much

Transistor

[ July 14, 2006: Message edited by: YuenLian Wu ]
[ July 14, 2006: Message edited by: YuenLian Wu ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60755
    
  65

I do this sort of thing a lot and I feel that it is much better and easier to do with Javascript on the client rather than relying upon a server round-trip just to expand or collapse a portion of the page.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
aman hindustani
Ranch Hand

Joined: Jun 15, 2006
Posts: 57
hi....

there one possible solution for this...as we can use the help of java script..

using java script ...try to open another window(pop up window.) using the command...winow.open()....write a fucntion to this...and the opening..window ...you try to display all the records what you want to display...and finally give a button...to close..window.close()...by doing so..you are able to give a option to user...if he want to see the data ..he has to just click ..or else he would't.. ok ..all the best...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60755
    
  65

I do not believe that the OP wanted to open new windows. It's very easy to expand and collapse DIVs within the current window using Javascript and CSS and is a lot simpler than spreading the logic over multiple pages.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Best way to design a dynamic jsp form
 
Similar Threads
java io program suggestion
Get cusor from SQLServer StoreProcedure to Java Program
generate dynamic log file in apache log4j
Best Way to Validate the JSP form by using Java
Get session time and warn the user