Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Nuwan Chandrasoma
s is probably not the ideal way to do this, but it works great for me. jk On Tue, Jul 1, 2008 at 12:33 PM, David Ogasawara <[EMAIL PROTECTED]> wrote: This is exactly what I needed. I was avoiding checkboxlist because I wanted the options to be displayed vertically, but it looks to be

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread Dave Newton
--- On Tue, 7/1/08, David Ogasawara <[EMAIL PROTECTED]> wrote: > I was avoiding checkboxlist because I wanted the options to be > displayed vertically, but it looks to be the only option unless > I add more code to determine if a checkbox was selected. Or use the "css_xhtml" theme, which IIRC ju

Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Jim Kiley
PROTECTED]> wrote: > This is exactly what I needed. I was avoiding checkboxlist because I > wanted the options to be displayed vertically, but it looks to be the > only option unless I add more code to determine if a checkbox was > selected. > > Thank you, everyone, for your he

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread David Ogasawara
Chandrasoma [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 9:16 AM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes Hi, I have done it like this. // code in my action private String[] skill; public String[] getSkill() { return skill

Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Nuwan Chandrasoma
uwan Chandrasoma [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:57 PM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread David Ogasawara
:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 9:04 AM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes >>So if there are five check boxes and the user selects three of >>them and submits the form, how do I automatically check the three boxes >>when th

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread Dave Newton
Message- > From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2008 9:57 PM > To: Struts Users Mailing List > Subject: Re: [S2] Pre-populating Checkboxes > > Hi, > > This is how i do it, i have implemented the prepreable > interface in m

Re: [S2] Pre-populating Checkboxes

2008-07-01 Thread Struts Two
>>So if there are five check boxes and the user selects three of >>them and submits the form, how do I automatically check the three boxes >>when the user returns the next day? If I have understood your question right, you need to persist user selection (say in a database). What you are asking e

RE: [S2] Pre-populating Checkboxes

2008-07-01 Thread David Ogasawara
ne 30, 2008 9:57 PM To: Struts Users Mailing List Subject: Re: [S2] Pre-populating Checkboxes Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to display in as check box values. eg:- private List s

Re: [S2] Pre-populating Checkboxes

2008-06-30 Thread Nuwan Chandrasoma
Hi, This is how i do it, i have implemented the prepreable interface in my action and in prepare method, i populate the list i wanted to display in as check box values. eg:- private List skills; public List getSkills() { return skills; } public void prepare() throws E

[S2] Pre-populating Checkboxes

2008-06-30 Thread David Ogasawara
Hello, I'm new to Struts 2 and I was wondering how to pre-populate checkboxes with values from a database (or even hard-coded values). I am iterating through an arraylist of hashmaps (description, type_cd) to create the checkboxes in the form. I then create a string array with the values from a

Having trouble pre-populating a checkboxlist

2008-04-15 Thread tristan_colson
-- View this message in context: http://www.nabble.com/Having-trouble-pre-populating-a-checkboxlist-tp16703411p16703411.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROT

Re: pre-populating form fields when called in edit mode.

2005-12-27 Thread Vikrama Sanjeeva
Hi, Well, i said "better" due to sake of simplicity. Keeping all the logic in Dispactch action seems complex to me. And right now I've implemented more or less same technique (not exactly Dispatch action) and the code is bit complex to me. Again for JSP's, I don't want to make code complex by pu

Re: pre-populating form fields when called in edit mode.

2005-12-27 Thread Rick R
Vikrama Sanjeeva wrote: Having separate Actions for insert, update and delete is better. Why? Do you make separate DAO objects? ie UpdateDao, InsertDao, RetrieveDao? I'm guessing you don't. So, it would help if you backed up your claim that separate Actions are better than a Dispatch a

Re: pre-populating form fields when called in edit mode.

2005-12-27 Thread Frank W. Zammetti
Paul Benedict wrote: But that of course doesn't make the list persist. Most frameworks heavily rely on the user session and I am now a strong believer that's the better way of doing things. Just as a relevant side-note... I suggest working in a distributed environment for a while and see if

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Vikrama Sanjeeva
Hi, Having separate Actions for insert, update and delete is better. Your approch for making SetUpAction is right, but it's better to make separate JSP's instead of writing if-else logic for headers and other related messages. Bye, Viki. Note: When u'r done with lesson, please sent in this g

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Rick Reumann
On 12/26/05, Paul Benedict <[EMAIL PROTECTED]> wrote: > > >>I would use the Request for such a List and wouldn't even bother putting > it in the ActionForm > > But that of course doesn't make the list persist. Most frameworks heavily > rely on the user session > and I am now a strong believer that'

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Paul Benedict
>>ActionForm should be removed from session manually, this is the price to pay. >>I thought about automating this, but Hubert pointed out that a user can open several browser windows for one app, so I gave up on this. One of the biggest concerns I had too was that using the session means only on

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Michael Jouravlev
I guess it is not surprising that I would do a completely orthogonal thing ;-) ActionForm is an I/O buffer, it aggregates BO/DTO + lists/options for selectboxes + error messages for the aggregated BO. BO exposes properties that are editable and "persistable". BO does not care about option lists be

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Paul Benedict
>>I would use the Request for such a List and wouldn't even bother putting it >>in the ActionForm But that of course doesn't make the list persist. Most frameworks heavily rely on the user session and I am now a strong believer that's the better way of doing things. I wonder if allowing the de

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Rick Reumann
I would use the Request for such a List and wouldn't even bother putting it in the ActionForm (unless of course the list is something the user is actually editing, then yes, you'd add that List as an ActionForm property). I try to keep my ActionForm with 'only' properties that the user can edit - n

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Paul Benedict
I am going to ask a related question... so take your best shot :-) I have an edit form in which I have to load a list from the database. The list is actually based on locale. What's the best solution here? I am using real action forms - not that dynafluff stuff ;) Is it to simply make my form s

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Michael Jouravlev
If you treat inserts like updates, things get much easier. When you show employee in edit mode, just pull his data from database into BO/DTO and show it. When you add new employee, create a new empty BO/DTO first. Then show it just like you would do it in edit mode. If user clicks "Save", insert da

Re: pre-populating form fields when called in edit mode.

2005-12-26 Thread Rick Reumann
I'm going to have a good lesson that will show exactly what you want, but until then, if you want a quick preview of the Action class, put it here: http://www.reumann.net/misc/EmployeeAction.txt You are following an example where I showed using a separate Action for each behaviour whereas the lin

pre-populating form fields when called in edit mode.

2005-12-25 Thread Vikrama Sanjeeva
Hi, Here is the sequence: 1: User fill up's "employeeForm.jsp" which have multiple text fields, radio buttons, text area's and dropdowns. 2: On pressing "Submit" button in "employeeForm.jsp", "InsertEmployeeAction" is called which do the following: 2.1) BeanUtils.copyProperties( employeeDT

Re: pre populating

2005-07-17 Thread dumbQuestionsAsker _
browsers don't. I hope this will be helpfull. Dumbo. From: "Martin Gainty" <[EMAIL PROTECTED]> Reply-To: "Martin Gainty" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: Re: pre populating Date: Sun, 17 Jul 2005 14:47:26 -0400 Wasnt

Re: pre populating

2005-07-17 Thread Martin Gainty
t; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; Sent: Sunday, July 17, 2005 12:13 PM Subject: Re: pre populating After some more advanced googleling, I learnt this problem is due to browser's security. THE ONLY BROWSER SUPPORTING FILE INPUT IS OPERA, NO ONE ELSE :(. To co

Re: pre populating

2005-07-17 Thread dumbQuestionsAsker _
Gainty" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: Re: pre populating Date: Sun, 17 Jul 2005 11:46:39 -0400 the property you are instanting must of type org.apache.struts.upload.FormFile I guess I cant provide any specific help you unless the I see

Re: pre populating

2005-07-17 Thread Martin Gainty
nday, July 17, 2005 11:14 AM Subject: Re: pre populating >YourActionForm yourActionForm=(YourActionForm)form; yourActionForm.setSpecificField(thevaluefromtheFile); Yes I did but that only returns the file name, not the whole path, and im not able to populate the input with this only file

Re: pre populating

2005-07-17 Thread dumbQuestionsAsker _
orm=(YourActionForm)form; yourActionForm.setSpecificField(thevaluefromtheFile); ??? Martin- - Original Message - From: "dumbQuestionsAsker _" <[EMAIL PROTECTED]> To: Sent: Sunday, July 17, 2005 6:14 AM Subject: pre populating Hi everybody, Is there any mechanisme provided by struts to

Re: pre populating

2005-07-17 Thread Martin Gainty
- From: "dumbQuestionsAsker _" <[EMAIL PROTECTED]> To: Sent: Sunday, July 17, 2005 6:14 AM Subject: pre populating Hi everybody, Is there any mechanisme provided by struts to allow prepopulating inputs in the case of iterating Form which retrives beans values ?(It s

pre populating

2005-07-17 Thread dumbQuestionsAsker _
Hi everybody, Is there any mechanisme provided by struts to allow prepopulating inputs in the case of iterating Form which retrives beans values ?(It seems that in the best case FormFile only return the file name not the whole path) Thanks in advance. best regards, Dumbo :) ___

Re: further clarification on pre-populating form

2005-07-06 Thread Frank W. Zammetti
There's any number of ways you could accomplish this, but I like to think in terms of the simplest. Here's my suggestion... Instead of using a ForwardAction, use a real Action. In it, get the reference to the form (which is of course passed in to execute() automaticly), populate it, and your

further clarification on pre-populating form

2005-07-06 Thread Tony Dahbura
There is no way I could find to populate the editUserForm bean prior to it being called from the forwardAction. Note below in my struts config have a url to viewedituser.do which invokes the action below. This action needs to setup to display the form for the user to edit values. How do I ge

RE: Pre-populating a form from a database

2004-12-03 Thread Donie Kelly
Thanks, that worked. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: 02 December 2004 17:12 To: Struts Users Mailing List Subject: RE: Pre-populating a form from a database > -Original Message- > From: Donie Kelly [mailto:[EMAIL PROTECTED] > Sent:

RE: Pre-populating a form from a database

2004-12-03 Thread Simon Matic Langford
have you got any documentation anywhere on your site? I couldn't see any... > -Original Message- > From: Tak Yoshida [mailto:[EMAIL PROTECTED] > Sent: 03 December 2004 03:01 > To: Struts Users Mailing List > Subject: Re: Pre-populating a form from a database > &

Re: Pre-populating a form from a database

2004-12-02 Thread Tak Yoshida
Carlos Cajina wrote in <[EMAIL PROTECTED]> >One of the solutions I've implemented is to create an intermediate action >that loads data from a database, populates de ActionForm, and directs the >user to the apropiate JSP. This could be a better option, which has the consistent prepare method invo

Re: Pre-populating a form from a database

2004-12-02 Thread Carlos Cajina
However, I can't get the action to trigger when I go to the form initially. I am a bit lost on this one even though I'm trying to understand these tutorials. One of the solutions I've implemented is to create an intermediate action that loads data from a database, populates de ActionForm, and dir

RE: Pre-populating a form from a database

2004-12-02 Thread Jim Barrows
> -Original Message- > From: Donie Kelly [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 02, 2004 9:57 AM > To: Struts Users Mailing List > Subject: RE: Pre-populating a form from a database > > > Hi (and sorry for the noob question) It's what we'

RE: Pre-populating a form from a database

2004-12-02 Thread Donie Kelly
igger when I go to the form initially. I am a bit lost on this one even though I'm trying to understand these tutorials. Thanks Donie -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: 02 December 2004 16:59 To: Struts Users Mailing List Subject: RE: Pre-populat

RE: Pre-populating a form from a database

2004-12-02 Thread Jim Barrows
Struts Users Mailing List > Subject: Pre-populating a form from a database > > > Hi all > > > > I've been going through the tutorials at > http://www.coreservlets.com/Apache-Struts-Tutorial/index.html > <http://www.coreservlets.com/Apache-Struts-Tutorial/index

Pre-populating a form from a database

2004-12-02 Thread Donie Kelly
Hi all I've been going through the tutorials at http://www.coreservlets.com/Apache-Struts-Tutorial/index.html which shows how to pre-populate forms. However, as I'm new to this, is there a "proper" way to access the database t

Re: : pre-populating fields from the Action java code

2004-10-25 Thread Bill Keese
When you click only one form submit is sent Luis Gervaso On Fri, 22 Oct 2004 15:28:16 +0900, Bill Keese <[EMAIL PROTECTED]> wrote: I have a question about pre-populating the fields of a form you display in the browser. To pre-populate fields, the Action saves a Form bean in the conte

Re: : pre-populating fields from the Action java code

2004-10-22 Thread Luis Gervaso
You can use 3 differents FlightBean and then populate the *value attribute* in each When you click only one form submit is sent Luis Gervaso On Fri, 22 Oct 2004 15:28:16 +0900, Bill Keese <[EMAIL PROTECTED]> wrote: > I have a question about pre-populating the fields of a form you dis

: pre-populating fields from the Action java code

2004-10-21 Thread Bill Keese
I have a question about pre-populating the fields of a form you display in the browser. To pre-populate fields, the Action saves a Form bean in the context via request.setAttribute("inputForm", inputForm), and tag looks up the form bean. determines the form b