RE: dynamic form

2004-01-16 Thread Trieu, Danny
Use indices properties... Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 The beginning of knowledge is the discovery of something we do not understand. - Frank Herbert (1920-1986) The essence of knowledge is, having it, to apply

Re: dynamic form

2004-01-16 Thread Otávio Augusto
I don't understand what you mean. I know how to index the properties inside the iterator tag.but how to declare those properties dynamically in the ActionForm class? Thanks Otávio Augusto On Fri, 16 Jan 2004 08:56:16 -0800 Trieu, Danny [EMAIL PROTECTED] wrote: Use indices properties...

Re: Dynamic form property names

2003-12-30 Thread Paul-J Woodward
Anyone got any ideas? Thanks, Paul Paul-J Woodward

Re: Dynamic form property names

2003-12-30 Thread Pedro Salgado
Sorry but I haven't quite catch what you looking for... Do you want to create a form in runtime? Is that it? If you're using a DynaForm it already has map. You can't set new properties to the form (it was built based on a DynaClass) but, if you extend DynaForm to a XDynaForm and make

Re: Dynamic form property names

2003-12-30 Thread Paul-J Woodward
: Subject: Re: Dynamic form property names 30/12/2003 16:39

Re: Dynamic form fields on ActionForm

2003-10-09 Thread Adam Hardy
I thought there was something slightly awry in your thinking. I guess that's where examples really do help. Good luck with it, Adam On 10/09/2003 03:15 AM Cornellious Mann wrote: Adam, I missed the point about adding the index to the input field name. I was simply naming the field the same

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Adam Hardy
Still it depends. How does the database handle the new products? Can you at least categorise them? On 10/08/2003 06:19 AM Cornellious Mann wrote: Unfortunately, products can be added at runtime and therefore I don't know what the full set is. From the research I have done it sounds like

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Cornellious Mann
All we have is a product ID. There is no category. How do you think category could help? Also, have you used an indexed property and DynaForm? --- Adam Hardy [EMAIL PROTECTED] wrote: Still it depends. How does the database handle the new products? Can you at least categorise them? On

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Adam Hardy
Yes you can have indexed properties dynaforms. I do not use them, I prefer nested properties. But I think the docs are quite good on this topic. Re: your problem, I was just asking about categories because I have no concept of how your database stores your products. Looking at your database

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Cornellious Mann
Currently, we are a stateless application. So on each request we will read the database and get a list of products. Then our JSP will generate a from a list of products. Each product will have an input that can accept the number of units per product. The problem I have is that each input field

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Adam Hardy
I think I see what you mean. If all you want is a list of product Id's and the number of units per id, then your priority is to use indexed properties, rather than DynaForm or normal Form. If you are using indexed properties, you just name the field one name, e.g. productId, and the indexing

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Cornellious Mann
I'm not sure about one thing though. If I name all of my inputs on the HTML page the same name, when I submit the form, won't only one of the inputs be passed along? --- Adam Hardy [EMAIL PROTECTED] wrote: I think I see what you mean. If all you want is a list of product Id's and the number

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Adam Hardy
Yes, but because they're indexed, you will see the result as an array. On 10/08/2003 07:45 PM Cornellious Mann wrote: I'm not sure about one thing though. If I name all of my inputs on the HTML page the same name, when I submit the form, won't only one of the inputs be passed along? --- Adam

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Cornellious Mann
This worked. :) Do you know if the order is guaranteed? From my testing it looks like the values appear in the array in the same order the parameters in the URL line. --- Adam Hardy [EMAIL PROTECTED] wrote: Yes, but because they're indexed, you will see the result as an array. On

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Adam Hardy
They're indexed! 0 becomes 0, 1 becomes 1 etc., i.e. the order they went out with remains the same when they come back in. I think you must be missing the point here somewhere On 10/08/2003 10:34 PM Cornellious Mann wrote: This worked. :) Do you know if the order is guaranteed? From my

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Lynn Guy
I just did this, maybe an example will help Read the database and stuff the data into an arraylist. Stuff the arraylist into the form. Call the page and get something like this tr td class=datainput type=checkbox name=feelistinfo[0].associated value=Y checked=checked

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Cornellious Mann
I guess my question about order was more of HTML/submit question than a question about arrays. I just want to guarantee that the order of the values being sumitted stay in the order they are on the page. I was simply giving every input field the same name such as product and catching the values

Re: Dynamic form fields on ActionForm

2003-10-08 Thread Cornellious Mann
Adam, I missed the point about adding the index to the input field name. I was simply naming the field the same thing. It actually worked, but it worried me. Thansk for all of the help! :) --- Adam Hardy [EMAIL PROTECTED] wrote: They're indexed! 0 becomes 0, 1 becomes 1 etc., i.e. the

Re: Dynamic form fields on ActionForm

2003-10-07 Thread Adam Hardy
Hi Cornellious, it depends whether you know beforehand what the full set of possible fields could be, or whether the fields themselves are not limited in name or type. If the former, then it would be easy to make a form that defined them all, and to use logic tags to display the needed fields

Re: Dynamic form fields on ActionForm

2003-10-07 Thread Mark Lowe
Indexed form property is what you want.. I'll avoid any clever explanations, grandiose meta language or to try and sell you a book.. And give you an example.. form-bean name=productForm form-property name=product type=java.util.ArrayList / .. action name=productForm path=/products

Re: Dynamic form fields on ActionForm

2003-10-07 Thread Cornellious Mann
Unfortunately, products can be added at runtime and therefore I don't know what the full set is. From the research I have done it sounds like ActionForms can not handle this situation and I will need to handle it myself in the Action. Do you agree? --- Adam Hardy [EMAIL PROTECTED] wrote: Hi

Re: Dynamic Form help

2003-08-14 Thread David Erickson
Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 12:54 PM Subject: Re: Dynamic Form help You use indexed property. html:text property=permission indexed=true / This stuff i quite well documented, what isn't well

Re: Dynamic Form help

2003-08-14 Thread Mark Lowe
You use indexed property. html:text property=permission indexed=true / This stuff i quite well documented, what isn't well documented is how to dynamically change the length of an indexed property. I've been using ArrayList for this.. form-property name=permission type=java.util.ArrayList /

RE: Dynamic Form Fields

2003-07-10 Thread Alex Shneyderman
Currently, I have a DynaValidatorForm defined in my web app. Some of the properties of this form will be completely dynamic. I will read a database and retrieve an ArrayList. This ArrayList will contain the If I understand you correctly for (Iterator iter = al.iterator (); iter.hasNext

Re: 'dynamic' form elements in a ActionForm

2003-03-18 Thread Ted Husted
Struts 1.1 supports map-backed forms, but that doesn't resolve the input form issue. I guess the key would be some type of tag that took a map and then generated a column of input fields. (Wouldn't work for everyone, since a lot of forms must be designed just so.) For extra credit, the entry

Re: Dynamic form actions

2003-03-14 Thread Jose Gonzalez Gomez
Mark, Please, correct me if I'm wrong, but I think the action attribute in the html:form tag is a run time expression, so there's no need to extend the FormTag class in order to use a dynamic form action. Regards Jose Mark wrote: I just wanted to pass on a tidbit that might help

Re: Dynamic form actions

2003-03-14 Thread Mark
No, its not a runtime expression. If you look at the code in FormTag you'll see that its not results.append(\ action=\); results.append(response.encodeURL(RequestUtils.getActionMappingURL(action, pageContext))); results.append(\); It simply pulls the action mapping

Re: Dynamic form actions

2003-03-14 Thread Kris Schneider
The code you've quoted has no impact on whether or not the html:form tag's action attribute is an rtexpr. Look at struts-html.tld: tag nameform/name tagclassorg.apache.struts.taglib.html.FormTag/tagclass bodycontentJSP/bodycontent attribute nameaction/name requiredtrue/required

Re: Dynamic form actions

2003-03-14 Thread Mark
All that means is you can have mysimpleTag value=%=scripletVariable%/ false means you cannot have a scriplet variable as a value That's not quite what i wanted to do, but in a way accomplishes a similar task without modifying struts. Its not sexy enough for me ;) The whole point of MVC is

Re: Dynamic form actions

2003-03-14 Thread Kris Schneider
Right, so you'd put the code to determine the appropriate value for the action attribute in your action, not in a JSP expression. That value could be stored in a request attribute and accessed simply as: html:form action='%= request.getAttribute(formaction) %' html-el:form might even let you do

Re: Dynamic form actions

2003-03-14 Thread Mark
thanks, good ideas *** REPLY SEPARATOR *** On 03/14/2003 at 10:24 AM Kris Schneider wrote: Right, so you'd put the code to determine the appropriate value for the action attribute in your action, not in a JSP expression. That value could be stored in a request attribute and

Re: Dynamic form actions

2003-03-13 Thread Richard Raquepo
We'll i kind of interested in trying your solution. Can you post some jsp codes in here. I think many people will appreciate it. Thanks. - Original Message - From: Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 14, 2003 11:52 AM Subject: Dynamic form actions I just

Re: Dynamic form value replacements???

2003-03-12 Thread Ian Hunter
Can you put them in an array? - Original Message - From: Jason Long [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 9:38 PM Subject: Dynamic form value replacements??? I have a form that is dynamically created as a jsp in xml syntax.

RE: Dynamic form value replacements???

2003-03-12 Thread Jason Long
:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:43 PM To: Struts Users Mailing List Subject: Re: Dynamic form value replacements??? Can you put them in an array? - Original Message - From: Jason Long [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March

Re: Dynamic form and Upload

2002-11-01 Thread Craig R. McClanahan
On Sat, 2 Nov 2002, Mr Alireza Fattahi wrote: Date: Sat, 2 Nov 2002 05:21:12 + (GMT) From: Mr Alireza Fattahi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Dynamic form and Upload Hi, I want to use struts dynamic form feature.

Re: Dynamic form and Upload

2002-11-01 Thread Mr Alireza Fattahi
Thanks for your reply, I have seen the example and an work with it, But my problem is I can not do that in an dynamic form. How should I do it in dynamic form, and what should I put in struts.config.xml? As I told I got the class cast expetion. Thanks

Re: dynamic form properties

2002-06-25 Thread Zhihua Xu
: Thursday, June 06, 2002 5:58 AM Subject: RE: dynamic form properties What do you want to know? I use maps and collections in form beans now to capture multi-select list key-value pairs and checkbox array booleans, respectively. I think it would be a simple extrapolation to map key-values

RE: dynamic form properties

2002-06-25 Thread Galbreath, Mark
1. Declare the bean's scope as session as an attribute of the form-bean declaration in struts-config.xml and provide an empty reset() method in the bean class; 2. Use java scriplets (though I do not recommend this) as in % List myBean = (List) session.getAttribute( myBean); Iterator i =

Re: dynamic form properties

2002-06-11 Thread Daka
, Daka - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 5:58 AM Subject: RE: dynamic form properties What do you want to know? I use maps and collections in form beans now to capture multi

RE: dynamic form properties

2002-06-06 Thread Galbreath, Mark
What do you want to know? I use maps and collections in form beans now to capture multi-select list key-value pairs and checkbox array booleans, respectively. I think it would be a simple extrapolation to map key-values for an entire HTML form, permitting a single action form to capture states

RE: dynamic form properties

2002-06-05 Thread James Mitchell
Are you talking about the DynaActionForm? James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org ICQ: 27651409 AOLIM: jmitchtx (and NO I don’t use AOL;) -Original Message- From: Zhihua Xu

RE: dynamic form using nested:file?

2002-04-15 Thread Alex Paransky
Your first statement, ...I have a form that can have N number of images... Does not warrant the use of nested tag library. Simply use the standard iterator, and indexed properties of the html:file tag, to properly output your file names as file[1], file[2], file[3]. -AP_

Re: dynamic form using nested:file?

2002-04-12 Thread Arron Bates
Elijah, Sorry about the lack of the tag. It's on its way. Pick it up in the next nightly build. Arron. Elijah Jacobs wrote: hi all, I have a form that can have N number of images. So in essence it's like the Monkey struts example by Arron Bates except where he has bananas, i have images.

Re: 'dynamic' form elements in a ActionForm

2002-03-22 Thread Ted Husted
It's difficult to do this in the 1.0.x release, but simple as pie in the 1.1 beta and nightly build. http://jguru.com/forums/view.jsp?EID=567079 -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web:

Re: dynamic form action flow

2002-02-01 Thread Ted Husted
SavePhoneNumberAction.java -- editPhoneNumbers.do It may be that this is looking up the original phone number again. If so, this is also where the recyling message could be coming into it. Do you want to go back through the edit action, or straight to the display page? -- Ted Husted,

RE: dynamic form action flow

2002-02-01 Thread Jeff Oberlander
[mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:05 AM To: 'Struts Users Mailing List' Subject: RE: dynamic form action flow Hi Jeff, The struts-example.war app does just this, except it uses subscriptions instead of phone numbers. It's part of the struts download, under webapps. Jon

RE: dynamic form action flow

2002-02-01 Thread Jeff Oberlander
: Re: dynamic form action flow SavePhoneNumberAction.java -- editPhoneNumbers.do It may be that this is looking up the original phone number again. If so, this is also where the recyling message could be coming into it. Do you want to go back through the edit action, or straight

RE: dynamic form action flow

2002-02-01 Thread Jeff Oberlander
to the editPhoneNumbers.do action, directly re-display the jsp. -Original Message- From: Jeff Oberlander Sent: Friday, February 01, 2002 7:39 AM To: 'Struts Users Mailing List' Subject: RE: dynamic form action flow I've tried going straight to the display page and then I get the new, blank element

RE: Dynamic Form Beans?

2001-09-06 Thread Tuscano, Stephen
Hi John, Are you able to slove this problem?if so, Can you help me out? Stephen. -Original Message- From: John Townsend [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 8:19 PM To: [EMAIL PROTECTED]; 'Luis Olivares' Subject: RE: Dynamic Form Beans? The one

RE: Dynamic Form Beans?

2001-08-30 Thread Rey Francois
One part of the solution is to use the MappedProperty feature recently added to the jakarta-commons bean-utils. The original submission is in this message: http://www.mail-archive.com/jakarta-commons@jakarta.apache.org/msg03005.html It has been integrated into the commons source, as indicated by

Re: Dynamic Form Beans?

2001-08-29 Thread Luis Olivares
I have the same 'problem'. I would like to be able to create a form dynamically depending on the structure of a table (I used to do this with 'plain' JSP). Any ideas? Regards. Luis Olivares. [EMAIL PROTECTED]

RE: Dynamic Form Beans?

2001-08-29 Thread Thinh Doan
I heard Struts 1.1 will address this issue. In the mean time, I too am interested to a working solution. Thanks, Thinh -Original Message- From: Luis Olivares [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 1:28 PM To: [EMAIL PROTECTED] Subject: Re: Dynamic Form Beans? I

RE: Dynamic Form Beans?

2001-08-29 Thread John Townsend
to go. -Original Message- From: Luis Olivares [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 11:28 AM To: [EMAIL PROTECTED] Subject: Re: Dynamic Form Beans? I have the same 'problem'. I would like to be able to create a form dynamically depending on the structure of a table

Re: Dynamic Form Beans?

2001-08-29 Thread Sastry Varanasi
I have the same problem too, and I'm sure there are many more like us. I believe this is a problem struts has not addressed yet. Fortunately, they are working on Dynamic form generation feature for struts1.1. I don't know when it is going to be ready!! Here is a work-around: Make your JSPs

Re: Dynamic Form Beans?

2001-08-29 Thread martin . cooper
]; 'Luis Olivares' [EMAIL PROTECTED] Sent: Wednesday, August 29, 2001 12:19 PM Subject: RE: Dynamic Form Beans? The one idea that I had was to create a new subclass of ActionForm called ActionDataForm. This form would have get and put methods that use keys instead of the usual pattern of numerous

Re: Dynamic form action?

2001-01-31 Thread Craig R. McClanahan
Peter Alfors wrote: Currently, we do not use the html:form tag. I haven't had a chance to look into them yet. I would think that the action attribute would not be required, but maybe there is a good reason for it to be? Someone with more experience with the html tags will have to help you

Re: Dynamic form action?

2001-01-29 Thread Peter Alfors
Currently, we do not use the html:form tag. I haven't had a chance to look into them yet. I would think that the action attribute would not be required, but maybe there is a good reason for it to be? Someone with more experience with the html tags will have to help you there. Anyone? Pete Tom

Re: Dynamic form action?

2001-01-29 Thread Peter Alfors
In order to use forwards (that depend on the user action), wouldn't you need some sort of router action class. Would all the pages then call this class and set some flag to notify it which action to take? Ted Husted wrote: On 1/29/2001 at 3:12 PM Tom Janofsky wrote: Or would a Struts guru

Re: Dynamic form

2000-12-14 Thread Craig R. McClanahan
Wong Kok Wai wrote: What's the recommended way to implement a dynamic form using Struts? Typical scenario: an address book for email where the number of contacts varies. No problem with renderering the form in the JSP but how do I associate the "input" with an attribute in an instance of