Inconstency in declaring log instance

2003-10-11 Thread Indrajit Raychaudhuri
Hi, What is the 'best practice' followed in declaring the class-wide log instance in Struts? LookupDispatchAction for example, doesn't have it declared explicitly since DispatchAction has a protected instance which it can use (and subsequently a subclass of LookupDispatchAction can use it as

Re: OT - book on Java patterns

2003-10-11 Thread Ted Husted
As mentioned, Core J2EE Patterns 2d is quite good. The other key tests are Design Patterns and Patterns in Enterprise Architecture. We list such books here: http://jakarta.apache.org/struts/resources/related_books.html HTH, Ted. Sasha Borodin wrote: All this talk lately of various official

Re: Keeping Actions clean - separating actions from business model from persistence

2003-10-11 Thread Ted Husted
First, I'd suggest studying the JPetstore3 application. http://www.ibatis.com/jpetstore/jpetstore.html It demonstrates a clean separate of concerns between the logical layers of an application. It also uses a DAO framework and shows how you can you easily switch between data persistence

Re: Keeping Actions clean - separating actions from business mode l from persistence

2003-10-11 Thread Ted Husted
Mahesh Joshi wrote: I have always wondered where is the best place to do connection management with the dataStore. Should the business Logic do connectionManagement (e.g. opening a connection (via a connection pool or otherwise)) or should that be the responsibility of the persistence layer.

Re: Keeping Actions clean - separating actions from business mode l from persistence

2003-10-11 Thread MBrewer
Would it be possible or at least usefull if the SQL objects in that example be used for the Form Beans and for the forms (using XForms). That would really cut don't the amount of work to a minimum Mike |-+ | | Ted Husted | |

[FRIDAY] YA Stuts In Action Triva Quiz

2003-10-11 Thread Ted Husted
Last time, we asked the immortal question: Open source developers don't make backups, they ... and received several very good answers: ... make branches. [Heya Gosper] ... know that a re-write every now and again is good for the design. [Adam Hardy] ... either create nonbreakable

Re: Keeping Actions clean - separating actions from business mode l from persistence

2003-10-11 Thread MBrewer
Allow maybe have a couple of generic actions that can save/retrieve and list these objects instead of having to write a action for each form. ie : instead of have to write a form bean/jsp page/edit action/search action/delete action etc.. you just create the xml sql object with some extra

RE: JavaServer Faces

2003-10-11 Thread Edgar P Dollin
I have been triing to avoid this issue, but I can't help stick my foot in my mouth. Struts works but so do a lot of technologies. Struts is about the COMMUNITY. I have never been on a more supportive, active, relevant communitity of developers. As long as the community keeps producing stuff

Re: [ot] Time format and time picking?

2003-10-11 Thread Adam Hardy
I would definitely use a javascript utility if it's allowed in the spec. Adds to user friendliness and saves a bit of validation hassle with locales / 12 or 24 hour clock etc. On the server side you should be able to set up a parser with a standard date/time pattern string that fits the

Re: RES: Struts and Tomcat JDBC Realms

2003-10-11 Thread Adam Hardy
On 10/10/2003 07:45 PM Michel Bertrand wrote: Tks for your answer. Now I understood what's happing (I hope so) ... I have a multipart/form-data and it has in its action a forward to a common text form, like: forward name=List redirect=true path=/list.do/ I believe when it reaches the

Re: ugly ugly ugly

2003-10-11 Thread Adam Hardy
On 10/10/2003 11:09 PM Evan Schnell wrote: From my experience working with human translators this might be a better approach. Translators like to be able to manipulate word order and punctuation. It is a little more code but I'll argue that it is not any less readable. Most importantly it

communication between control layer factory/model

2003-10-11 Thread Adam Hardy
I've been happy until now passing objects backwards and forwards between my actions and my factories, and occasionally a int with the number of updates or deletes done, for example, to include in the status messages I show to the user, and throwing exceptions for anything else. However I've

pull-down menu item question

2003-10-11 Thread Mick Knutson
I have seen some pull-down menus in the past that have allowed there to be a prompt text displayed first when you look at the menu, but then a soon as you go to select an item, that prompt is no longer available. How does this work? Is this possible in struts? --- Thanks Mick Knutson The

Re: communication between control layer factory/model

2003-10-11 Thread Ted Husted
How about the Commons MessageResources? http://jakarta.apache.org/commons/sandbox/resources/index.html We ported the message collection over there for precisely this reason. :) HTH, Ted. Adam Hardy wrote: I've been happy until now passing objects backwards and forwards between my actions

Tiles help please...

2003-10-11 Thread Mick Knutson
I am getting a bean into a tile that has a checkbox in it. I get the NAME of the checkbox, but I need to see if the value is on or off, then set the disabled flay in an html:img. But, I always get null errors. Can someone help please? tiles:useAttribute id=beanName name=property

Re: communication between control layer factory/model

2003-10-11 Thread Adam Hardy
On 10/11/2003 04:31 PM Ted Husted wrote: How about the Commons MessageResources? http://jakarta.apache.org/commons/sandbox/resources/index.html We ported the message collection over there for precisely this reason. :) HTH, Ted. That seems to fit the spec perfectly! Thanks Adam -- struts 1.1 +

Re: How To Work Out This Action Mapping?

2003-10-11 Thread Craig R. McClanahan
Caroline Jen wrote: To answer your questions: 1. The LOGON button links to a forward: html:link forward=logonLOGON/html:link and in my struts-config.xml, I have forward name=logon path=/do/admin/Menu/ Well, that's the first problem ... security constraints are only

Re: Inconstency in declaring log instance

2003-10-11 Thread Craig R. McClanahan
Indrajit Raychaudhuri wrote: Hi, What is the 'best practice' followed in declaring the class-wide log instance in Struts? LookupDispatchAction for example, doesn't have it declared explicitly since DispatchAction has a protected instance which it can use (and subsequently a subclass of

Re: communication between control layer factory/model

2003-10-11 Thread Craig R. McClanahan
Adam Hardy wrote: On 10/11/2003 04:31 PM Ted Husted wrote: How about the Commons MessageResources? http://jakarta.apache.org/commons/sandbox/resources/index.html We ported the message collection over there for precisely this reason. :) HTH, Ted. That seems to fit the spec perfectly! One

How can I compute data for html:select choices?

2003-10-11 Thread Bob Langford
Hi, I can't seem to understand how to declare things correctly to do what I want to do. Can anyone tell me where I am going wrong? I'm trying to use a simple Java method as the source of the choices in a html:select box in a form. The method returns a java.util.List, where each item is a

Re: How can I compute data for html:select choices?

2003-10-11 Thread Daniel H. F. e Silva
Hi Bob, I think you could try bean:define/ or, better, JSTL tag c:set/. I'm not a JSTL expert but i know you can determine scope to be used by c:set/. And i'm not sure, but i think you can do that also with bean:define/. Hope it helped you. Regards, Daniel. --- Bob Langford [EMAIL PROTECTED]

Re: How can I compute data for html:select choices?

2003-10-11 Thread Vic Cekvenich
The point of MVC is to pre-populate the bean in Action. You should unit test the bean in the model layer, once it works, put it in Struts. (MVC layered aproach allows for unit testing of a layer) So if you say something like: MyBean b = new MyBean(); b.populate(); Collection c = b.getOptions();

META-INF vs WEB-INF

2003-10-11 Thread khote
I notice in the struts.jar that the tld's are kept in META-INF/tlds, rather than any WEB-INF I'm using an include file in my JSPs that contains the %@ taglib prefix=html uri=/WEB-INF/tld/struts-html.tld % Since I'm not using too many, I just include thist tagdecl.jspf in all my JSPs I'm using

Re: Anyone still use the layout component ?

2003-10-11 Thread Vernon Smith
I didn't see my reply shown up on this mail list. I post it again as the followings. Thanks Ted for your response. To my knowledge, the Tiles and the component serve the same functionality but doing thing differently. I am not sure what your compatible mean here. In regarding of i18n, the

Re: META-INF vs WEB-INF

2003-10-11 Thread Craig R. McClanahan
khote wrote: I notice in the struts.jar that the tld's are kept in META-INF/tlds, rather than any WEB-INF I'm using an include file in my JSPs that contains the %@ taglib prefix=html uri=/WEB-INF/tld/struts-html.tld % Since I'm not using too many, I just include thist tagdecl.jspf in all my

Re: Anyone still use the layout component ?

2003-10-11 Thread Craig R. McClanahan
Vernon Smith wrote: I didn't see my reply shown up on this mail list. I post it again as the followings. Thanks Ted for your response. To my knowledge, the Tiles and the component serve the same functionality but doing thing differently. I am not sure what your compatible mean here. In

HOW and WHERE do I call my EJB from

2003-10-11 Thread Kunal H. Parikh
Hi All ! I am trying to start out with struts. I have successfully deployed an EJB in JBOSS and want to call it from my Struts-based web app. My current setup: ActionForm: GetSearchCriteriaForm extends org.apache.struts.action.ActionForm Action:

Re: Anyone still use the layout component ?

2003-10-11 Thread Vernon Smith
Thanks very much Craig for you response. To my knowledge, the Tiles and the component serve the same functionality but doing thing differently. I am not sure what your compatible mean here. In regarding of i18n, the Tiles forces us to use the a set of JSP files per locale approach while the

Hi Ted, where is scaffold.ExistsAttributeAction??

2003-10-11 Thread ZYD
Hi Ted, I'm studying your artimus_1_1 codes. I'm confused by some scaffold classes, such as org.apache.struts.scaffold.ExistsAttributeAction. I cannot find it's source code, compiled class file and it's documentation anywhere. There are some other classes like this one. I noticed that

RE: How can I compute data for html:select choices?

2003-10-11 Thread Ramakrishna_Nk
i am not sure if you have tried this out: %@ page import=foo.bar.MyUtils % jsp:useBean id=months type=java.util.List / % months = MyUtils.getMonthsList(); % ... html:select ... html:options collection=%=months% property=value labelProperty=label / /html:select Cheers ! Ram

Re: How To Work Out This Action Mapping?

2003-10-11 Thread Caroline Jen
Craig, thank you for your very strong support in the past day or two to guide me through problems with the container-managed authentication. I looked at my web.xml file again and again. There is nothing wrong with the order of the elements in that file. And there is no stack trace in the log