struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul McCulloch <paul.mccull...@axiossystems.com>
Subject RE: Struts Design Issue - Search Functionality - Best Practices
Date Fri, 26 Sep 2003 10:00:27 GMT
My aproach is as follows:

Each form bean property which can be searched is a descendant of
SearchableProperty. A SearchableProperty consists of:

*A String value representing the user's input
*The selected business entity (if the user has selected one)
*An object descended from Lookup, which implements the associated search
functionality

I have a base form & dispatch action. 

The base action contains methods which are called to show the search screen;
do a search ;use a searched value etc.

The base form contains hidden fields, populated via javascript, which tell
the dispatch action which property the search function is being invoked for,
and other 'paramaters' such as the id of a selected record.

The view of my application uses the struts nested tags, and JSP includes to
provide reuseable components to render a SearchableProperty and it's
associated search view. The search view is part of the same page - the app
only ever uses one browser window, with no frames.

The upside of this approach is that I can place, with little effort,
sophisticated searching functions anywhere is the app. Due to the inclusion
of the user selected business entity behind the scenes, my view can display
any properties of the selected entity, without a change to the form bean.

The downside of this is that the form bean must be stored in session scope.
I have done a bit of load testing and it didn't seem to be a problem, but I
didn't have much to compare with - this is my first Struts app.

So, that's the approach I use. I've no idea how that compares to the best
practices out there, nut I'm eager to find out!

Paul

-----Original Message-----
From: Chawla, Yogesh [mailto:yogesh.chawla@hpsglobal.com]
Sent: 26 September 2003 08:19
To: 'Struts Users Mailing List'
Subject: Struts Design Issue - Search Functionality - Best Practices
Importance: High


Hi,

Design Requirement - Show a list of Search records. The screen will have
buttons for Previous/Next Month. On clicking these records would be shown.

Issues - 

a) How to store data and best practices to be followed in Struts. Return
back a Collection of Form Beans and iterate over these. However certain
other fields are required to be stored also which are not displayable. i.e.
Current Date which is a hidden parameter. Any comments ?

b) Use a single Form Bean which has variables like String[] to store the
array of Displayable Fields. However, this seems to be a less than perfect
solution. Any comments ???

c) Use Generic Search - Search on different modules, with different fields ?
Any Brilliant Guru contributions for this one..Sure need some wizard out
here...

Pls. advise on the best approach for the Search functionality. We need to
design an application which has Search on each and every page.

Thanks for your time ,

Regards,

Yogesh
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


**************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee
indicated in this message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to Internet email messages
of this kind, please advise us immediately. Opinions, conclusions and other information expressed
in this message are not given or endorsed by my Company or employer unless otherwise indicated
by an authorised representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via
electronic mail attachments we cannot guarantee that attachments do not contain computer virus
code.  You are therefore strongly advised to undertake anti virus checks prior to accessing
the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for loss or damage
howsoever caused.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message