RE: Setting and Getting indexed property

2003-03-26 Thread gaffer
Ritesh,

Check the example at www.keyboardmonkey.com or the nested tag lib in
Struts. It may help with the presentation. Though, if you add an object
and need to save to a DB, you will likely need to use a lazyList.

Regards
Al

On Wed, 2003-03-26 at 06:24, Ritesh Singhal wrote:
> In some of the mails I saw people using ListUtils.lazyList() from
> commons library. I think that does the same what u r doing. Or I am not
> getting it right and it means something else?
> 
> Regards
> Ritesh
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 26, 2003 7:37 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Setting and Getting indexed property
> 
> 
> Check the indexed getters n Form...If the beanList in form is empty,The
> beans are added as required when getter is called.. I was referring to
> this...
> 
> -Original Message-
> From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 3:01 PM
> To: Struts Users Mailing List
> Subject: RE: Setting and Getting indexed property
> 
> 
> I think that helps. But you were talking something about Lazy
> initialization. What is that? Thanks and Regards Ritesh
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 26, 2003 7:09 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Setting and Getting indexed property
> 
> 
> look at the following message in the archive...
> 
> 
> http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2
> 
> -Original Message-----
> From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 1:55 PM
> To: Struts Users Mailing List
> Subject: RE: Setting and Getting indexed property
> 
> 
> I couldn't find anything in the mailing list. Actually I am new to this
> group. Do you know any resources on the internet where using indexed
> property and lazy intialization is explained.
> 
> Regards
> Ritesh
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 26, 2003 6:06 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Setting and Getting indexed property
> 
> 
> U need to use lazy initialiszation.
> Search the mail archive...I had replied some similar mail...
> 
> regards,
> Shirish
> 
> -Original Message-
> From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 26, 2003 1:04 PM
> To: Struts Users Mailing List
> Subject: Setting and Getting indexed property
> 
> 
> Hi All,
> 
> I am having problem setting and getting indexed property of a form bean.
> I have a form bean:
> 
> public class ExampleForm extends ActionForm {
> private String id[];
> private String name[];
> private String address[];
> 
> public String getIdIndexed( int index )
> {
> return ( id[index] );
> }
> 
> 
> public void setIdIndexed(int index, String value)
> {
> id[index] = value;
> }
> . And so on
> }
> 
> With appropriate getter and setter methods.
> 
> Now in my jsp page I am trying to access these fields and display them
> in a table format. Something like this:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I want to have the same form bean for create and edit page of the
> entity. So in create page I will have a table with blank fields and in
> edit page I will have prepopulated fields. Also in edit page I shud be
> able add more rows for the table. Now I don't know what property name to
> give in create page of the entity. Above code works fine when form bean
> is already populated, but problem comes when you want to create the
> entity. Do I need to initialize the array? And of what size? As I want
> it to be dynamic. Also in create page I want some default number of rows
> with blank pages. What shud be the property name for those text fields?
> 
> Please help me. I am stuck coz of this problem.
> 
> Thanks and Regards
> Ritesh
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---

RE: Setting and Getting indexed property

2003-03-26 Thread shirishchandra.sakhare
u are right..


-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:24 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


In some of the mails I saw people using ListUtils.lazyList() from
commons library. I think that does the same what u r doing. Or I am not
getting it right and it means something else?

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 7:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


Check the indexed getters n Form...If the beanList in form is empty,The
beans are added as required when getter is called.. I was referring to
this...

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I think that helps. But you were talking something about Lazy
initialization. What is that? Thanks and Regards Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 7:09 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


look at the following message in the archive...


http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:55 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I couldn't find anything in the mailing list. Actually I am new to this
group. Do you know any resources on the internet where using indexed
property and lazy intialization is explained.

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting and Getting indexed property

2003-03-26 Thread Ritesh Singhal
In some of the mails I saw people using ListUtils.lazyList() from
commons library. I think that does the same what u r doing. Or I am not
getting it right and it means something else?

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 7:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


Check the indexed getters n Form...If the beanList in form is empty,The
beans are added as required when getter is called.. I was referring to
this...

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I think that helps. But you were talking something about Lazy
initialization. What is that? Thanks and Regards Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 7:09 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


look at the following message in the archive...


http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:55 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I couldn't find anything in the mailing list. Actually I am new to this
group. Do you know any resources on the internet where using indexed
property and lazy intialization is explained.

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting and Getting indexed property

2003-03-26 Thread shirishchandra.sakhare
Check the indexed getters n Form...If the beanList in form is empty,The beans are 
added as required when getter is called..
I was referring to this...

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:01 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I think that helps. But you were talking something about Lazy
initialization. What is that?
Thanks and Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 7:09 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


look at the following message in the archive...


http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:55 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I couldn't find anything in the mailing list. Actually I am new to this
group. Do you know any resources on the internet where using indexed
property and lazy intialization is explained.

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting and Getting indexed property

2003-03-26 Thread Ritesh Singhal
I think that helps. But you were talking something about Lazy
initialization. What is that?
Thanks and Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 7:09 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


look at the following message in the archive...


http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:55 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I couldn't find anything in the mailing list. Actually I am new to this
group. Do you know any resources on the internet where using indexed
property and lazy intialization is explained.

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting and Getting indexed property

2003-03-26 Thread shirishchandra.sakhare
look at the following message in the archive...


http://marc.theaimsgroup.com/?l=struts-user&m=104815589928698&w=2

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:55 PM
To: Struts Users Mailing List
Subject: RE: Setting and Getting indexed property


I couldn't find anything in the mailing list. Actually I am new to this
group. Do you know any resources on the internet where using indexed
property and lazy intialization is explained.

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting and Getting indexed property

2003-03-26 Thread Ritesh Singhal
I couldn't find anything in the mailing list. Actually I am new to this
group. Do you know any resources on the internet where using indexed
property and lazy intialization is explained.

Regards
Ritesh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: RE: Setting and Getting indexed property


U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting and Getting indexed property

2003-03-26 Thread shirishchandra.sakhare
U need to use lazy initialiszation.
Search the mail archive...I had replied some similar mail...

regards,
Shirish

-Original Message-
From: Ritesh Singhal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Setting and Getting indexed property


Hi All,

I am having problem setting and getting indexed property of a form bean.
I have a form bean:

public class ExampleForm extends ActionForm {
private String id[];
private String name[];
private String address[];

public String getIdIndexed( int index )
{
return ( id[index] );
}


public void setIdIndexed(int index, String value)
{
id[index] = value;
}
. And so on
}

With appropriate getter and setter methods.

Now in my jsp page I am trying to access these fields and display them
in a table format. Something like this:









I want to have the same form bean for create and edit page of the
entity. So in create page I will have a table with blank fields and in
edit page I will have prepopulated fields. Also in edit page I shud be
able add more rows for the table. Now I don't know what property name to
give in create page of the entity. Above code works fine when form bean
is already populated, but problem comes when you want to create the
entity. Do I need to initialize the array? And of what size? As I want
it to be dynamic. Also in create page I want some default number of rows
with blank pages. What shud be the property name for those text fields?

Please help me. I am stuck coz of this problem.

Thanks and Regards
Ritesh

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]