RE: Validator and DispatchAction

2004-02-18 Thread Nicholas L Mohler
Renato, There is another solution that is clean. We use one action class with multiple (3) mappings to support our validation needs. With our editor scheme, the user proceeds to a Top page where they decide to Edit an existing or Add a new item. They then proceed to a Detail page where

Re: Add/Modify functionality in same jsp

2004-01-20 Thread Nicholas L Mohler
Hi Sudhakar, Your JSP should populate the form fields in the same way for both add and modify actions. Specifically, your action class should initialize the form for the jsp. When the page is rendered, it will be populated the way that you want. Nick

Re: dynamically sized form (mostly solved)

2003-12-11 Thread Nicholas L Mohler
Ted, The origin of this thread had to do with using Indexed Properties and a Dyna* form. As when using the ActionForm, getting the values to the browser is not an issue. The area where the difficulty arises is when the values are returned from the browser. When using the ActionForm (or

RE: dynamically sized form (mostly solved)

2003-12-11 Thread Nicholas L Mohler
into your form (formName.selectedItems[0].fieldName) then Struts should handle the rest. Does that help at all? robert -Original Message- From: Nicholas L Mohler [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 7:46 AM To: Struts Users Mailing List Subject: Re: dynamically

RE: dynamically sized form (mostly solved)

2003-12-10 Thread Nicholas L Mohler
The reason you get the null pointer exception is that the inventoryList property in your DynaActionForm is created empty. The exception occurs when Struts tries to populate inventoryList[0].startNumber or inventoryList[0].endNumber. Even though I haven't used the DynaActionForm, I know that

Re: dynamically sized form

2003-11-20 Thread Nicholas L Mohler
Matt, Find the thread titled Using a collection of Beans within an ActionForm from yesterday. It has the answer that you need. Nick

Re: dynamically sized form

2003-11-20 Thread Nicholas L Mohler
an answer to. Is there a way to do a dynamically sized form using a DynaForm, instead of a custom form bean class for each one. Thanks again for any insights, Matt - Original Message - From: Nicholas L Mohler [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday

Re: Using a collection of Beans within an ActionForm

2003-11-19 Thread Nicholas L Mohler
Ed, You can find examples of this by searching the archive for indexed properties. You are getting this exception because the Form collection does not have enough entries to support the property that you are trying to populate. You need to insure that the getter that returns a single bean

Re: Complex Form Validation

2003-11-18 Thread Nicholas L Mohler
George, I have done something similar to this. I haven't looked at browser compatability yet(we're currently using this with ie6), but the concept that I use is that I look at the parents of the form field, trying to find out if the element is hidden. If I find that a parent that is

Re: a problem with the logic:iterate.. help needed

2003-10-29 Thread Nicholas L Mohler
Is the name of your form correct? Your iterate tag had empForm, but you state that your form is called EmpForm. Other thought: Have you declared the logic taglib in your jsp? Nick

RE: Index properties (once again)

2003-10-28 Thread Nicholas L Mohler
Hi Rajat, You could use an Array. If your form is in the session, as opposed to the request, the array will never go away, so the array will retain its size. I can't do that in our app as our UI presents a spreadsheet and allows the user to add and remove rows. For that reason, I use an

Re: Indexed Properties + Validator + JavaScript

2003-10-28 Thread Nicholas L Mohler
Hi Vara, I have implemented client-side validations for indexed properties, but I have done it through custom validators. Look through the archive for a thread titled Validation of Indexed properties. I describe how I implemented the client side validations for indexed properties. Nick

RE: Indexed Properties + Validator + JavaScript

2003-10-28 Thread Nicholas L Mohler
Nick http://www.mail-archive.com/[EMAIL PROTECTED]/msg19122.html is this the message you are talking about or something else ? Vara Prasad -Original Message- From: Nicholas L Mohler

Re: Index properties (once again)

2003-10-27 Thread Nicholas L Mohler
Hi Ranjat, Take a look at the mail archive. There are at least two threads that I have posted to that discuss indexed properties. I think that you'll find just about everything you need in those threads. There is info about (1) building your page with indexed properties and (2) getting

RE: html:hidden, disabled attribute

2003-10-16 Thread Nicholas L Mohler
Haiwei, Would the bean:define tag meet your needs? The value is available for use when building the page, but I don't believe that it is in the form dataset. Alternatively, you might consider extending the hidden tag for your needs. Once it works, you could submit the code as a candidate

RE: Question about minimizing javascript loaded into web page

2003-10-02 Thread Nicholas L Mohler
Saul, Thanks for the responses to the question. So you are suggesting that I have a jsp that really has the sole purpose of acting as a javascript container that will be usable on the client side, but not rendered to the page. This may be a dumb question: is that possible? The jsp would

Question about minimizing javascript loaded into web page

2003-10-01 Thread Nicholas L Mohler
I apologize if this is a question that has already been addressed, but I've not been able to find an answer... We have implemented the validation framework into our webapp and it works well. We have noticed that all of the validation javascript is loaded into the web page, even if the

Re: logic:iterate understanding

2003-09-26 Thread Nicholas L Mohler
If you do not specify a name attribute, then an assumption is made that the specified property is an attribute in the form that is associated with the mapping. If you have a mapping (SampleAction) that uses a form (SampleForm), then the example you gave below assumes that the SampleForm

Re: Validator with property String array problem

2003-08-27 Thread Nicholas L Mohler
I have done some work with client-side indexed field validation...mostly, I have written a couple custom validations that can validate indexed or non-indexed fields based on a few attributes that I set in validation.xml. My validators are somewhat pointed towards my particular needs and the

RE : RE : Validator and Dispatch Actions

2003-08-26 Thread Nicholas L Mohler
We have a similar situation using action classes based on the LookupDispatchAction. We have not implemented this yet, but our approach will be to have two action mappings. We'll do the following: In the form class, we'll override validate() to do three things: 1) call super.validate(). 2)

Re: writing an actionform for nested indexed properties

2003-08-21 Thread Nicholas L Mohler
Cameron, Are you sure that your request attributes are named that way? I read that as a 3 dimensional table...do you really have that in your page? If you are getting those request attributes, then I'm stumped, but I'd love to know the answer :-) Otherwise...you need a getter/setter for

RE: Dumbo Question

2003-08-15 Thread Nicholas L Mohler
Chirag, I looked at your code, and it looks right. It makes me think that something must be wrong with the data. Your data should look like this: - You have an object called Results in scope that has a collection property called tabledata (tbdata). - Each object in the tbdata collection

RE: Dumbo Question

2003-08-15 Thread Nicholas L Mohler
config.xml or my ActionClass. The weird thing is that the first iterate works fine - for the column headings. And the outer loop in the second iterate works too. It will print out the collection in cell one of the tabledata for example. -Original Message- From: Nicholas L Mohler [mailto

RE: Dumbo Question

2003-08-14 Thread Nicholas L Mohler
Look at the way that you have named your ColumnNames property in the jsp and your form. Try it with property=columnNames with form methods getColumnNames and setColumnNames. We've had seen that problem a couple times on our team and lining the names up properly does the trick. Nick

Re: Dynamically generating Action Forms

2003-08-14 Thread Nicholas L Mohler
I have a similar function where I allow the user to view the contents of various DB tables in my system. My process works like this: 1) I build a collection of the column names that will be shown. 2) I then extract the values for each row from the ResultSet using the collection of column

Re: Form Populating Error, help!!

2003-08-14 Thread Nicholas L Mohler
Not sure why this works when the form is in the session, but I think I see why it doesn't work in the request... I am pretty sure this is a naming issue. I would suggest changing the name of the singular indexedBeans to indexedBean in two places: 1) In your JSP, the id attribute in the

RE: Help please - indexed field in ActionForm

2003-08-14 Thread Nicholas L Mohler
Hi Dave, There was a good thread about using indexed properties a little over a week ago (7/28-7/30). Find that thread and you should find all of the answers that you need in order to use and process indexed properties on your form. Even though the thread wanders a little, everything that

RE: [FRIDAY] Impossible requirements customer expectation management [WAS: methodto get new Id to next action when old Id is in request?]

2003-08-10 Thread Nicholas L Mohler
My experience...you have to explain the consequences in layman's terms (no geek talk, and yes, I am a computer geek). If you can, instead of explaining why the software won't work given the requirement, and a real-life example that the customer can relate to and understand...for example,

Re: struts problem(Unable to populate the form in the jsp to ActionFormbean)

2003-08-09 Thread Nicholas L Mohler
Sridhar, See the thread from 7/28-7/30 titled inxeded properties. Everything you need is in that thread. The basic problem here is that your Form class properties and your jsp names need to line up properly. The thread I mentioned should help you out. Nick

Re: Indexed Properties

2003-07-29 Thread Nicholas L Mohler
. Hope this gives you the background and thanks once more for taking some out to hlep me. ATTA - Original Message - From: Nicholas L Mohler [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, July 28, 2003 1:09 PM Subject: Re: Indexed Properties

Re: Indexed Properties

2003-07-29 Thread Nicholas L Mohler
getter/setters for id, name and category. In ActionForm I also included setCategory(int) and getCategory(int, string) which doesn't seem to be called at all! something obvious that i'm missing? Thanks. ATTA - Original Message - From: Nicholas L Mohler [EMAIL PROTECTED] To: Struts Users

Validation of Indexed Properties

2003-07-28 Thread Nicholas L Mohler
Hi, I am currently imple,enting the Struts validator into our web app. All is going pretty well with the exception of client-side indexed property validation. I have looked at the Validator documentation, and gone through this list looking for some idea that will give me a clue as to what I

Re: Indexed Properties

2003-07-28 Thread Nicholas L Mohler
Atta, You can use indexed properties in your ActionForm class. The key is having all of the correct methods in your form class. 1) Getter and setter: You need a get/Set method for the collection that you refer to in your jsp. for example: public Collection getLocations() public void

Re: Indexed Properties

2003-07-28 Thread Nicholas L Mohler
with the fact that my individual fruit is a string object rather than being a bean in itself if some getter method(s)? can you see what's going wrong! Thanks again. ATTA - Original Message - From: Nicholas L Mohler [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent