Re: Implementation of new row functionality of HTML table in Struts

2005-12-20 Thread Irfan Shaikh
Hi guyz, Here is the solution for the issue we had public class ListTextActionForm extends ActionForm { public List customer; public void setCustomer(List customer){ this.customer = customer; } public List getCustomer() { return this.customer; } pub

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread atta-ur rehman
Irfan, You might want to conclude this thread for future readers with similar issues. Scope, problem and solutions that didn't work and the one that finally worked might be helpful. Just my 2 paisas! ATTA On 12/19/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote: > > Thanks guyz, done with adding ne

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread Irfan Shaikh
Thanks guyz, done with adding new row functionality. :) On 12/19/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote: > > I am getting same error when i submit the form having newly added row. > Error is : > > javax.servlet.ServletException: BeanUtils.populate > org.apache.struts.util.RequestUtils.p

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread Irfan Shaikh
I am getting same error when i submit the form having newly added row. Error is : javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread Irfan Shaikh
t; > > Irfan can you tell me how can we create a new row using java script? > > > > > > > > > -Original Message- > > > From: Irfan Shaikh [mailto:[EMAIL PROTECTED] > > > Sent: Monday, December 19, 2005 1:12 PM > > > To: Struts Users Maili

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread atta-ur rehman
tell me how can we create a new row using java script? > > > > > > -----Original Message----- > > From: Irfan Shaikh [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 19, 2005 1:12 PM > > To: Struts Users Mailing List > > Subject: Re: Implementation of

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread Irfan Shaikh
> Irfan can you tell me how can we create a new row using java script? > > > -Original Message- > From: Irfan Shaikh [mailto:[EMAIL PROTECTED] > Sent: Monday, December 19, 2005 1:12 PM > To: Struts Users Mailing List > Subject: Re: Implementation of new row function

RE: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread JEEVANATHAM P. /BPCRP/INFOTECH/VASHI
List Subject: Re: Implementation of new row functionality of HTML table in Struts No, user can add has many row he needed before submit... I had just added one row to handle this scenario... It should work for as many row user has added... On 12/19/05, atta-ur rehman <[EMAIL PROTECTED]>

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread atta-ur rehman
I think, ArrayIndexOutOfBoundsException actually shows that changes to the DOM are being submitted. ATTA On 12/19/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 12/18/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote: > > No, user can add has many row he needed before submit... I had just > add

Re: Implementation of new row functionality of HTML table in Struts

2005-12-19 Thread Michael Jouravlev
On 12/18/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote: > No, user can add has many row he needed before submit... I had just added > one row to handle this scenario... It should work for as many row user has > added... I would start from verifying that browser sends all rows to the server. If you us

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread atta-ur rehman
now i understand you're renaming the dynamically added textboxes thru Javascript? right? if that's the case your renaming looks good to me. can you do the trick in the form's reset() method; that is, set the a new Customer array to the forms's property with something like: String value = request.g

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread Irfan Shaikh
No, user can add has many row he needed before submit... I had just added one row to handle this scenario... It should work for as many row user has added... On 12/19/05, atta-ur rehman <[EMAIL PROTECTED]> wrote: > > okay, so you're saying use can add only ONE row dynamically before submit? > and

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread atta-ur rehman
okay, so you're saying use can add only ONE row dynamically before submit? and that the newly added row's HTML code is: if that's the case, in your ActionForm's reset method, detect that user has added a new row, maybe thru request.getParameter("cus

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread Irfan Shaikh
Once again Generated HTML :

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread Irfan Shaikh
JSP Page : row is hardcoded (with index) on JSP page for simplicity. Now, on submit it give me this error.. javax.servlet.ServletException: BeanUtils.populate org.apache.st

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread atta-ur rehman
Irfan, By looking at the HTML source of the your page, please show me the name of textboxes added thru and name of the textboxes you've added thru Javascript. ATTA On 12/17/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote: > > I am storing data objects into an Array for initial rows and when user >

Re: Implementation of new row functionality of HTML table in Struts

2005-12-18 Thread Irfan Shaikh
Thanks for the reply Michael, 1. Yes, I am adding a row into the browser's DOM. Basically, client requirement is to implement a table like structure where user can add a new row to save new record. i need to know how to handle scenario where client changes (adding a new row) gets notif

Re: Implementation of new row functionality of HTML table in Struts

2005-12-17 Thread Michael Jouravlev
On 12/17/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote: >the problem here is when i populate the data on page for the first time i > have 4 rows and then i add a new row by javascript Do you add a row right into the browser's DOM? >, and i submit the page, > even then i get only 4 rows in execut

Re: Implementation of new row functionality of HTML table in Struts

2005-12-17 Thread Irfan Shaikh
I am storing data objects into an Array for initial rows and when user submit the form i am getting the updated values by using the code highlighted below public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,

Re: Implementation of new row functionality of HTML table in Struts

2005-12-16 Thread atta-ur rehman
Irfan, How are you storing data required for initial rows? As a collection of objects in some scope that uses to paint them on the page? When user submits the page how are you getting the updated values? Populating the objects in the same collection or constructing a new collection and adding a

Implementation of new row functionality of HTML table in Struts

2005-12-16 Thread Irfan Shaikh
Hi All, I am new to Struts and need to implement a functionality where a new row is added to table (generated using logic:iterate tag on JSP page ) on the fly(using javascript) and handling newly added row in DynaActionForm so that row gets saved to database. Need to know how to create a