Re: get data to Collection

2003-01-30 Thread Kafka
Hello,
 1. write set and get methods in Form bean for a Collection Flag.
I have this methods

 2. In the jsp write the following code
 logic:equal name=NameOfForm property=collectionFlag value=true
 on top of the iterate tag.
I don't understant this code. What does it do?
I used this code, but ineffectibely:

 logic:iterate id=daiktas name=access scope=session indexId=testid

logic:equal name=daiktas property=read value=true

  html:multibox property=read name = daiktas 
bean:write name = daiktas  property=read/
/html:multibox
bean:write  name = daiktas property=read/
bean:write name=testid/
/logic:equal 
 /logic:iterate
Must I set inside Collection or something...?

- Original Message -
From: neelima mahesh [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 12:21 AM
Subject: Re: get data to Collection

 Hi,
  Please try this.
  When u set collection to Form Bean in Action Bean, u can determine the
size of the collection. Depending on the collection size u can set a Flag
value true/false..
 1. write set and get methods in Form bean for a Collection Flag.
 2. In the jsp write the following code
 logic:equal name=NameOfForm property=collectionFlag value=true
 on top of the iterate tag.
 Which solves ur problem
 Thanks
 Mahesh!

  Kafka [EMAIL PROTECTED] wrote:Hello,
 I think, this problem many times was solve here,
 but I don't find particular answer.
 How I can use Form class, if I don't know how many
 are rows? Must I use Collection? Maybe I can see example,
 because I can not find decision.

 Now my jsp:










 Form.class
 private Collection read = new ArrayList();
 //skip

 public void setRead(Collection read)
 {
 this.read.addAll(read);
 }

 public Collection getRead()
 {
 return this.read ;
 }
 public void reset(ActionMapping mapping, HttpServletRequest request) {
 //skip others params
 read.clear();
 }

 but I get error:
 description The server encountered an internal error (Internal Server
Error)
 that prevented it from fulfilling this request.
 exception
 javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)




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





 -
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now



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




Re: get data to Collection

2003-01-30 Thread Kafka
I try this, but ineffectively... I get follow error.
Maybe I can get example, where I can see how implement
Collection and multicheck...

error:
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 12:29 AM
Subject: RE: get data to Collection


 public void reset(ActionMapping mapping, HttpServletRequest request) {
 read = new ArrayList();
 //skip others params
 }

 Regards,


 PQ

 This Guy Thinks He Knows Everything
 This Guy Thinks He Knows What He Is Doing

 -Original Message-
 From: Kafka [mailto:[EMAIL PROTECTED]]
 Sent: January 29, 2003 5:02 PM
 To: Struts Users Mailing List
 Subject: get data to Collection

 Hello,
 I think, this problem many times was solve here,
 but I don't find particular answer.
 How I can use Form class, if I don't know how many
 are rows? Must I use Collection? Maybe I can see example,
 because I can not find decision.

 Now my jsp:

 logic:notEmpty name=access 
 logic:iterate id=daiktas name=access scope=session
   html:multibox property=read name = daiktas 
bean:write name = daiktas  property=read/
   /html:multibox
   bean:write  name = daiktas property=read/
 /logic:iterate
 /logic:notEmpty

 Form.class
  private Collection read = new ArrayList();
 //skip

  public void setRead(Collection read)
  {
 this.read.addAll(read);
   }

 public Collection getRead()
 {
 return this.read ;
 }
 public void reset(ActionMapping mapping, HttpServletRequest request) {
 //skip others params
 read.clear();
 }

 but I get error:
 description The server encountered an internal error (Internal Server
Error)
 that prevented it from fulfilling this request.
 exception
 javax.servlet.ServletException: BeanUtils.populate
  at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)




 -
 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]




get data to Collection

2003-01-29 Thread Kafka
Hello,
I think, this problem many times was solve here,
but I don't find particular answer.
How I can use Form class, if I don't know how many
are rows? Must I use Collection? Maybe I can see example,
because I can not find decision.

Now my jsp:

logic:notEmpty name=access 
logic:iterate id=daiktas name=access scope=session
  html:multibox property=read name = daiktas 
   bean:write name = daiktas  property=read/
  /html:multibox
  bean:write  name = daiktas property=read/
/logic:iterate
/logic:notEmpty

Form.class
 private Collection read = new ArrayList();
//skip

 public void setRead(Collection read)
 {
this.read.addAll(read);
  }

public Collection getRead()
{
return this.read ;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
//skip others params
read.clear();
}

but I get error:
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)




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




Re: get data to Collection

2003-01-29 Thread neelima mahesh

Hi,
 Please try this.
 When u set collection to Form Bean in Action Bean, u can determine the size of the 
collection. Depending on the collection size u can set a Flag value true/false..
1. write set and get methods in Form bean for a Collection Flag.
2. In the jsp write the following code
logic:equal name=NameOfForm property=collectionFlag value=true 
on top of the iterate tag.
Which solves ur problem
Thanks
Mahesh!
  
 Kafka [EMAIL PROTECTED] wrote:Hello,
I think, this problem many times was solve here,
but I don't find particular answer.
How I can use Form class, if I don't know how many
are rows? Must I use Collection? Maybe I can see example,
because I can not find decision.

Now my jsp:










Form.class
private Collection read = new ArrayList();
//skip

public void setRead(Collection read)
{
this.read.addAll(read);
}

public Collection getRead()
{
return this.read ;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
//skip others params
read.clear();
}

but I get error:
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)




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





-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


RE: get data to Collection

2003-01-29 Thread pqin
public void reset(ActionMapping mapping, HttpServletRequest request) {
read = new ArrayList();
//skip others params
}

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Kafka [mailto:[EMAIL PROTECTED]] 
Sent: January 29, 2003 5:02 PM
To: Struts Users Mailing List
Subject: get data to Collection

Hello,
I think, this problem many times was solve here,
but I don't find particular answer.
How I can use Form class, if I don't know how many
are rows? Must I use Collection? Maybe I can see example,
because I can not find decision.

Now my jsp:

logic:notEmpty name=access 
logic:iterate id=daiktas name=access scope=session
  html:multibox property=read name = daiktas 
   bean:write name = daiktas  property=read/
  /html:multibox
  bean:write  name = daiktas property=read/
/logic:iterate
/logic:notEmpty

Form.class
 private Collection read = new ArrayList();
//skip

 public void setRead(Collection read)
 {
this.read.addAll(read);
  }

public Collection getRead()
{
return this.read ;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
//skip others params
read.clear();
}

but I get error:
description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:988)




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