Hello, two comments/questions: - in my opinion, sorting data is somehow business processing. Suppose that you have a long list of results that is paged (ie. retrieved in chunks from the data store). Sorting the data using a different criteria may involve re-accessing the data store to retrieve a different page of data.. and this should not be handled by a JSP. All this to say that I personally see the sorting/resorting in the Action/Model layers.
- I've seen a few messages related to using a business delegate to call an EJB. Isn't an EJB a Business Delegate itself? In my case, the EJBs are relatively simple for now, only things like UserEJB.create(UserValueObject) and similar. And I'm calling them directly from my Actions (using a ServiceLocator). I'm not sure I see the advantage of using both a Business Delegate and an EJB... aren't EJBs "better" in the sense that the app server supports/provides many more services (transactions, object pooling, security, ...)? Thanks. Andrej -----Original Message----- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 10:14 AM To: 'Struts Users Mailing List' Subject: RE: Action an overkill ?? Hi Abhishek, My previous answer was a bit vague as it depends on the specific context. If for example you whished to check that the users details had been fetched before accessing a page then a taglib that uses a business delegate to access an ejb would be a good choice. If however you wanted to process the user's details, an action would be a better choice (indeed form submits should clearly be handled by an action). Some choices are not so clear cut. Sorting a table for instance could be handled by a taglib or a repost to an action that sorts and forwards back to the jsp. I guess I would favor the taglib option here, as I might (heaven forbid) use a framework other than struts in the future. Jon Ridgway -----Original Message----- From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]] Sent: 05 December 2001 10:53 To: 'Struts Users Mailing List' Subject: RE: Action an overkill ?? Thanks for your reply, There is a debate in my team these days on the use of Jsp Tags versus Actions. Some jsp developers feel that ejbs should be accessed via tag libraries, databases should be accessed via tag libraries and for simple rendering things like sorting a table jsp tag libraries should be used. While others like to use Actions for all the things mentioned above. Is there a document somewhere which describes what tasks are better suited for actions and what tasks are better suited for tag libraries. Technically, things mentioned above can be done easily by either as action or as jsp tags.But I want to make a consistent decision through out the application. regards, Abhishek. A ship in harbor is safe, but that is not what ships are built for. John A. Shedd ***** ***** Abhishek Srivastava *** /_ __ *** Hewlett-Packard - Solutions Organization ** / / /_/ ** 19 Cunningham Road. Bangalore -560052. *** / *** phone +91 80 2251554 Extn:1532 ***** ***** mailto:[EMAIL PROTECTED] >> -----Original Message----- >> From: Alexander Jesse [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, December 05, 2001 4:05 PM >> To: struts-user >> Subject: RE: Action an overkill ?? >> >> >> Hi, >> >> going through the action hides the >> presentation-implementation from the user's eyes. >> >> For example, the user will only see ".../do/showTable" (or >> ".../showTable.do") in >> the browser's address line and therefor not be able to >> bookmark the jsp-file, when >> you use an action. >> >> The action also allows you to change more implementation >> details without having >> to change the presentation (JSP-file)... >> >> I advocate strict use of actions in every case... >> => NEVER use a jsp-link, ALWAYS use an action >> >> just my two cents... >> Alexander Jesse >> >> -----Original Message----- >> From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, December 05, 2001 10:54 AM >> To: Struts-User (E-mail) >> Subject: Action an overkill ?? >> >> >> Hello All, >> >> I render a table through my jsp page. The user can sort the table by >> clicking on each of the column headers. When the user clicks >> on the column >> header, an Action is invoked and the data that is used to >> render the table >> is sorted accordingly and placed back into the session. Now >> the control is >> forwarded to the jsp that renders the table with sorted data/ >> >> I have got some feedback that using Action for things like >> sorting a table >> is an overkill. what is suggested that each table column >> should point to a >> jsp which should use a custom tag library to sort the table. >> >> I am unable to decide which approach to take and why. >> >> Can someone help me on this. >> >> regards, >> Abhishek. >> >> >> A ship in harbor is safe, but that is not what ships are built for. >> John A. Shedd >> >> ***** ***** Abhishek Srivastava >> *** /_ __ *** Hewlett-Packard - Solutions Organization >> ** / / /_/ ** 19 Cunningham Road. Bangalore -560052. >> *** / *** phone +91 80 2251554 Extn:1532 >> ***** ***** mailto:[EMAIL PROTECTED] >> >> >> -- >> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>