How do you prepopulate your forms?

2005-11-29 Thread Koen Jans
Suppose for instance you want to prepopulate a form where users can edit their profile; the way i do it is: I have an action PrepareEditProfileAction that a) gets the data from storage b) creates a editProfileFormBean and puts the data in it c) saves this editProfileFormBean in request-scope d) fo

nested tags problem

2005-10-26 Thread Koen Jans
Hi, i am trying to access nested properties on a jsp page like this: On my ActionFormY associated with this jsp, of course i have an instance Foo foo (which can be set and gotten by getFoo(), setFoo(..) ) and which has correct Foo.getBar() and Foo.setBar(..) methods. I prepopu

Where to put logstatements?

2005-10-22 Thread Koen Jans
I'm using log4j, but i cannot decide where to place the log-statements.. For instance when a user adds an account. My options are: - in the ActionClasses. (This seems to be the common approach, but then there's logstatements in the "Controller" part, which seems not that logic to me). So here th

re: Question

2005-10-20 Thread Koen Jans
Daniel Łaś wrote: > Hi >I want to use inside to mark some records and perform group delete of selected records. Is there any standard way to do this with Struts? doesn't seem to bee helpfull wth this task. Please point me to some tutorial if available. > > Regards Hi daniel, you can do th

Where to go after unsuccesfull ActionForm validation?

2005-10-13 Thread Koen Jans
Here is the problem; (sorry for long text) Normally, when you validate an actionform and there is a validation error, the "input" argument in struts-config.xml points you back to the inputform, so you can place an error message on the form where the incorrect input is.. First problem: ---

Re: Base action class

2005-10-06 Thread Koen Jans
baseaction (or the call to >the helper in the base action). It is also good to have an application >wide base action, and a base action hierarchy for modules (if you have >more than one). BaseAction -> BaseMessagingAction -> >SendMessageAction. > >Btw, I think it's a ser

Base action class

2005-10-06 Thread Koen Jans
Hello, I am trying to use a BaseAction class for my action, and i have been wondering what to put in there; As for now, i have put the basic stuff there like finding a forward for a database faillure and so on.. (like in the mailreader example by the way). Also, i have put a method that retrieves

What to store in servlet context?

2005-09-23 Thread Koen Jans
This is probably a newbie question.. >From the examples i studied, it looks like most applications store a reference to a database in servlet context.. If i figured it out the right way, this means all clients using the webapplication, share this same reference? Would it be a good idea to store o

What to store in servlet context?

2005-09-23 Thread Koen Jans
This is probably a newbie question.. >From the examples i studied, it looks like most applications store a reference to a database in servlet context.. If i figured it out the right way, this means all clients using the webapplication, share this same reference? Would it be a good idea to store o

The mailreader example, database access

2005-09-22 Thread Koen Jans
The struts design guidelines states that Actions perform the processing required to deal with a request (such as saving a row into a database); this can be done by logic code embedded within the Action class itself, BUT should generally be performed by calling an appropriate method of a business lo

passing JavaBeans through an ActionForm?

2005-09-21 Thread Koen Jans
Here's my problem; A user has several accounts, represented by AccountBean objects, all having a unique accountId. Now, i have a form where the user can select one of his accounts to edit through a radio button selection. For the associated ActionForm, i see two options to represent the selected