Logic iterate problems

2001-05-10 Thread Sylvain FAGNENT



Hello,

I have a Vector Object stored in my session with 
the key "tabTest" this Vector contains "Client" Objetcs, Client classe have 
a "name" property.

I use this code in my JSP :

logic:iterate id="client" name="tabTest" 
scope="session" type="Client" bean:write 
name="client" property="name"//logic:iterate

This error is return :

...JSP Exception : Cannot find bean client in scope 
null

any help...Thanks

Sylvain


RE: Logic iterate problems

2001-05-10 Thread Dudley [EMAIL PROTECTED]



have u 
put that object into the session, before u get to the form

session.setAttribute("tabTest", 
VectorObject);

  -Original Message-From: Sylvain FAGNENT 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 2:57 
  PMTo: [EMAIL PROTECTED]Subject: Logic 
  iterate problems
  Hello,
  
  I have a Vector Object stored in my session with 
  the key "tabTest" this Vector contains "Client" Objetcs, Client classe 
  have a "name" property.
  
  I use this code in my JSP :
  
  logic:iterate id="client" name="tabTest" 
  scope="session" type="Client" bean:write 
  name="client" property="name"//logic:iterate
  
  This error is return :
  
  ...JSP Exception : Cannot find bean client in 
  scope null
  
  any help...Thanks
  
  Sylvain


Re: Logic iterate problems

2001-05-10 Thread Sylvain FAGNENT



Yes , we did ! :-(

  - Original Message - 
  From: 
  Dudley Butt@i-Commerce 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, May 10, 2001 3:04 
PM
  Subject: RE: Logic iterate problems
  
  have 
  u put that object into the session, before u get to the 
  form
  
  session.setAttribute("tabTest", 
  VectorObject);
  
-Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: 
Logic iterate problems
Hello,

I have a Vector Object stored in my session 
with the key "tabTest" this Vector contains "Client" Objetcs, Client 
classe have a "name" property.

I use this code in my JSP :

logic:iterate id="client" name="tabTest" 
scope="session" type="Client" bean:write 
name="client" property="name"//logic:iterate

This error is return :

...JSP Exception : Cannot find bean client in 
scope null

any help...Thanks

Sylvain


RE: Logic iterate problems

2001-05-10 Thread Nanduri, Amarnath



Maybe 
use need to use the jsp:useBean name="tabTest" 
class="VectorObject" scope = "session" /
in 
your jsp page. Give it a shot and let me know...

cheers,
Amar..

  -Original Message-From: Sylvain FAGNENT 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:13 
  AMTo: [EMAIL PROTECTED]Subject: Re: Logic 
  iterate problems
  Yes , we did ! :-(
  
- Original Message - 
From: 
Dudley Butt@i-Commerce 
To: '[EMAIL PROTECTED]' 

Sent: Thursday, May 10, 2001 3:04 
PM
Subject: RE: Logic iterate 
problems

have u put that object into the session, before u 
get to the form

session.setAttribute("tabTest", 
VectorObject);

  -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
  Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: 
  Logic iterate problems
  Hello,
  
  I have a Vector Object stored in my session 
  with the key "tabTest" this Vector contains "Client" Objetcs, Client 
  classe have a "name" property.
  
  I use this code in my JSP :
  
  logic:iterate id="client" name="tabTest" 
  scope="session" type="Client" bean:write 
  name="client" property="name"//logic:iterate
  
  This error is return :
  
  ...JSP Exception : Cannot find bean client in 
  scope null
  
  any help...Thanks
  
  Sylvain


RE: Logic iterate problems

2001-05-10 Thread Firmin David

I came across a similar problem not so long ago. What I'd done wrong was try
and access properties outside the html:form tags.
Moving my tag calls inside the form tags fixed my problem at the time, but I
don't know if this applies in your case. It's worth double checking
none-the-less.
 
Regards
David

-Original Message-
From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 13:57
To: [EMAIL PROTECTED]
Subject: Logic iterate problems


Hello,
 
I have a Vector Object stored in my session with the key tabTest this
Vector 
contains Client Objetcs, Client classe have a name property.
 
I use this code in my JSP :
 
logic:iterate id=client name=tabTest scope=session type=Client
bean:write name=client property=name/
/logic:iterate
 
This error is return :
 
...JSP Exception : Cannot find bean client in scope null
 
any help...Thanks
 
Sylvain




The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: Logic iterate problems

2001-05-10 Thread Sylvain FAGNENT



I tried, here is the code in my action 
:

tabTest= new 
Vector();test = new 
Client();test.setName("Tata 
DUBAR");tabTest.add(test);test 
= new 
Client();test.setName("SFA");tabTest.add(test);
session.setAttribute("tabTest",tabTest);

And the JSP code :

jsp:useBean id="tabTest" scope="session" 
class="java.util.Vector" / logic:iterate id="client" name="tabTest" 
type="Client" bean:write name="client" 
property="name"//logic:iterate

I still have my "cannnot find client bean " 
error.

Thanks Sylvain !

  - Original Message ----- 
  From: 
  Nanduri, Amarnath 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, May 10, 2001 3:17 
PM
  Subject: RE: Logic iterate problems
  
  Maybe use need to use the jsp:useBean name="tabTest" 
  class="VectorObject" scope = "session" /
  in 
  your jsp page. Give it a shot and let me know...
  
  cheers,
  Amar..
  
-Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
Thursday, May 10, 2001 9:13 AMTo: [EMAIL PROTECTED]Subject: 
Re: Logic iterate problems
Yes , we did ! :-(

  - Original Message - 
  From: 
  Dudley Butt@i-Commerce 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, May 10, 2001 3:04 
  PM
  Subject: RE: Logic iterate 
  problems
  
  have u put that object into the session, before u 
  get to the form
  
  session.setAttribute("tabTest", 
  VectorObject);
  
    -----Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: 
Logic iterate problems
Hello,

I have a Vector Object stored in my session 
with the key "tabTest" this Vector contains "Client" Objetcs, Client 
classe have a "name" property.

I use this code in my JSP :

logic:iterate id="client" 
name="tabTest" scope="session" type="Client" 
bean:write name="client" 
property="name"//logic:iterate

This error is return :

...JSP Exception : Cannot find bean client 
in scope null

any help...Thanks

Sylvain


Re: Logic iterate problems

2001-05-10 Thread Sylvain FAGNENT

I tried to encapsulate all my tags with
html:form action=realAction
..
/html:form

But it still doesn't work !
- Original Message -
From: Firmin David [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:22 PM
Subject: RE: Logic iterate problems


 I came across a similar problem not so long ago. What I'd done wrong was
try
 and access properties outside the html:form tags.
 Moving my tag calls inside the form tags fixed my problem at the time, but
I
 don't know if this applies in your case. It's worth double checking
 none-the-less.

 Regards
 David

 -Original Message-
 From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
 Sent: 10 May 2001 13:57
 To: [EMAIL PROTECTED]
 Subject: Logic iterate problems


 Hello,

 I have a Vector Object stored in my session with the key tabTest this
 Vector
 contains Client Objetcs, Client classe have a name property.

 I use this code in my JSP :

 logic:iterate id=client name=tabTest scope=session type=Client
 bean:write name=client property=name/
 /logic:iterate

 This error is return :

 ...JSP Exception : Cannot find bean client in scope null

 any help...Thanks

 Sylvain



 
 The information in this email is confidential and is intended solely
 for the addressee(s).
 Access to this email by anyone else is unauthorised. If you are not
 an intended recipient, you must not read, use or disseminate the
 information contained in the email.
 Any views expressed in this message are those of the individual
 sender, except where the sender specifically states them to be
 the views of Capco.

 http://www.capco.com
 ***






RE: Logic iterate problems

2001-05-10 Thread Nanduri, Amarnath



In 
your jsp page did you do an import on client ?


%@ page import = "beans.Client" %


  -Original Message-From: Sylvain FAGNENT 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:33 
  AMTo: [EMAIL PROTECTED]Subject: Re: Logic 
  iterate problems
  I tried, here is the code in my action 
  :
  
  tabTest= new 
  Vector();test = new 
  Client();test.setName("Tata 
  DUBAR");tabTest.add(test);test 
  = new 
  Client();test.setName("SFA");tabTest.add(test);
  session.setAttribute("tabTest",tabTest);
  
  And the JSP code :
  
  jsp:useBean id="tabTest" scope="session" 
  class="java.util.Vector" / logic:iterate id="client" 
  name="tabTest" type="Client" bean:write 
  name="client" property="name"//logic:iterate
  
  I still have my "cannnot find client bean " 
  error.
  
  Thanks Sylvain !
  
- Original Message - 
    From: 
    Nanduri, Amarnath 
To: '[EMAIL PROTECTED]' 

Sent: Thursday, May 10, 2001 3:17 
PM
Subject: RE: Logic iterate 
problems

Maybe use need to use the jsp:useBean name="tabTest" 
class="VectorObject" scope = "session" /
in 
your jsp page. Give it a shot and let me know...

cheers,
Amar..

  -----Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
  Thursday, May 10, 2001 9:13 AMTo: [EMAIL PROTECTED]Subject: 
  Re: Logic iterate problems
  Yes , we did ! :-(
  
- Original Message - 
    From: 
    Dudley Butt@i-Commerce 

To: '[EMAIL PROTECTED]' 

Sent: Thursday, May 10, 2001 3:04 
PM
Subject: RE: Logic iterate 
problems

have u put that object into the session, before 
u get to the form

session.setAttribute("tabTest", 
VectorObject);

      -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
  Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: 
  Logic iterate problems
  Hello,
  
  I have a Vector Object stored in my 
  session with the key "tabTest" this Vector contains "Client" 
  Objetcs, Client classe have a "name" property.
  
  I use this code in my JSP :
  
  logic:iterate id="client" 
  name="tabTest" scope="session" type="Client" 
  bean:write name="client" 
  property="name"//logic:iterate
  
  This error is return :
  
  ...JSP Exception : Cannot find bean 
  client in scope null
  
  any help...Thanks
  
  Sylvain


Re: Logic iterate problems

2001-05-10 Thread Sylvain FAGNENT



In fact I use the full class name in the iterate 
Tag !

  - Original Message - 
  From: 
  Nanduri, Amarnath 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, May 10, 2001 3:39 
PM
  Subject: RE: Logic iterate problems
  
  In 
  your jsp page did you do an import on client ?
  
  
  %@ page import = "beans.Client" %
  


RE: Logic iterate problems

2001-05-10 Thread Deadman, Hal



I 
don't think you need the jsp:useBean. You also don't need type="Client". If you 
want to use type, make sure the class is fully qualified with the package it's 
in. 

  -Original Message-From: Sylvain FAGNENT 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 10, 2001 9:33 
  AMTo: [EMAIL PROTECTED]Subject: Re: Logic 
  iterate problems
  I tried, here is the code in my action 
  :
  
  tabTest= new 
  Vector();test = new 
  Client();test.setName("Tata 
  DUBAR");tabTest.add(test);test 
  = new 
  Client();test.setName("SFA");tabTest.add(test);
  session.setAttribute("tabTest",tabTest);
  
  And the JSP code :
  
  jsp:useBean id="tabTest" scope="session" 
  class="java.util.Vector" / logic:iterate id="client" 
  name="tabTest" type="Client" bean:write 
  name="client" property="name"//logic:iterate
  
  I still have my "cannnot find client bean " 
  error.
  
  Thanks Sylvain !
  
- Original Message - 
    From: 
    Nanduri, Amarnath 
To: '[EMAIL PROTECTED]' 

Sent: Thursday, May 10, 2001 3:17 
PM
Subject: RE: Logic iterate 
problems

Maybe use need to use the jsp:useBean name="tabTest" 
class="VectorObject" scope = "session" /
in 
your jsp page. Give it a shot and let me know...

cheers,
Amar..

  -----Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
  Thursday, May 10, 2001 9:13 AMTo: [EMAIL PROTECTED]Subject: 
  Re: Logic iterate problems
  Yes , we did ! :-(
  
- Original Message - 
    From: 
    Dudley Butt@i-Commerce 

To: '[EMAIL PROTECTED]' 

Sent: Thursday, May 10, 2001 3:04 
PM
Subject: RE: Logic iterate 
problems

have u put that object into the session, before 
u get to the form

session.setAttribute("tabTest", 
VectorObject);

      -Original Message-From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]Sent: 
  Thursday, May 10, 2001 2:57 PMTo: [EMAIL PROTECTED]Subject: 
  Logic iterate problems
  Hello,
  
  I have a Vector Object stored in my 
  session with the key "tabTest" this Vector contains "Client" 
  Objetcs, Client classe have a "name" property.
  
  I use this code in my JSP :
  
  logic:iterate id="client" 
  name="tabTest" scope="session" type="Client" 
  bean:write name="client" 
  property="name"//logic:iterate
  
  This error is return :
  
  ...JSP Exception : Cannot find bean 
  client in scope null
  
  any help...Thanks
  
  Sylvain


RE: Logic iterate problems

2001-05-10 Thread Dudley [EMAIL PROTECTED]

try this

logic:iterate id=tabTest name=tabTest scope=session type=Client
 bean:write name=tabTest property=name/
 /logic:iterate

-Original Message-
From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 3:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Logic iterate problems


I tried to encapsulate all my tags with
html:form action=realAction
..
/html:form

But it still doesn't work !
- Original Message -
From: Firmin David [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:22 PM
Subject: RE: Logic iterate problems


 I came across a similar problem not so long ago. What I'd done wrong was
try
 and access properties outside the html:form tags.
 Moving my tag calls inside the form tags fixed my problem at the time, but
I
 don't know if this applies in your case. It's worth double checking
 none-the-less.

 Regards
 David

 -Original Message-
 From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
 Sent: 10 May 2001 13:57
 To: [EMAIL PROTECTED]
 Subject: Logic iterate problems


 Hello,

 I have a Vector Object stored in my session with the key tabTest this
 Vector
 contains Client Objetcs, Client classe have a name property.

 I use this code in my JSP :

 logic:iterate id=client name=tabTest scope=session type=Client
 bean:write name=client property=name/
 /logic:iterate

 This error is return :

 ...JSP Exception : Cannot find bean client in scope null

 any help...Thanks

 Sylvain



 
 The information in this email is confidential and is intended solely
 for the addressee(s).
 Access to this email by anyone else is unauthorised. If you are not
 an intended recipient, you must not read, use or disseminate the
 information contained in the email.
 Any views expressed in this message are those of the individual
 sender, except where the sender specifically states them to be
 the views of Capco.

 http://www.capco.com
 ***





RE: Logic iterate problems

2001-05-10 Thread Firmin David

Humour me...I'm not entirely convinced this'll work, and I know it's not
ideal anyway, but here goes...
Could you try:
logic:iterate collection=%=tabTest% type=your.class.name.Client
id=aClient
bean:write name=aClient property=name/
/logic:iterate
 
Like I say, I'm not convinced this'll work, but no harm in trying, hey!
Regards
David

-Original Message-
From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 14:33
To: [EMAIL PROTECTED]
Subject: Re: Logic iterate problems


I tried, here is the code in my action :
 
 tabTest= new Vector();
 test = new Client();
 test.setName(Tata DUBAR);
 tabTest.add(test);
 test = new Client();
 test.setName(SFA);
 tabTest.add(test);
 session.setAttribute(tabTest,tabTest);
 
And the JSP code :
 
jsp:useBean id=tabTest scope=session class=java.util.Vector / 
logic:iterate id=client name=tabTest type=Client
bean:write name=client property=name/
/logic:iterate
 
I still have my cannnot find client bean  error.
 
Thanks Sylvain !

- Original Message - 
From: Nanduri, Amarnath mailto:[EMAIL PROTECTED]  
To: '[EMAIL PROTECTED]'
mailto:'[EMAIL PROTECTED]'  
Sent: Thursday, May 10, 2001 3:17 PM
Subject: RE: Logic iterate problems

Maybe use need to use the  jsp:useBean name=tabTest  class=VectorObject
scope = session /
in your jsp page. Give it a shot and let me know...
 
cheers,
Amar..

-Original Message-
From: Sylvain FAGNENT [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
]
Sent: Thursday, May 10, 2001 9:13 AM
To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Subject: Re: Logic iterate problems


Yes , we did ! :-(

- Original Message - 
From: Dudley Butt@i-Commerce mailto:[EMAIL PROTECTED]  
To: '[EMAIL PROTECTED]'
mailto:'[EMAIL PROTECTED]'  
Sent: Thursday, May 10, 2001 3:04 PM
Subject: RE: Logic iterate problems

have u put that object into the session, before u get to the form
 
session.setAttribute(tabTest, VectorObject);

-Original Message-
From: Sylvain FAGNENT [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
]
Sent: Thursday, May 10, 2001 2:57 PM
To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Subject: Logic iterate problems


Hello,
 
I have a Vector Object stored in my session with the key tabTest this
Vector 
contains Client Objetcs, Client classe have a name property.
 
I use this code in my JSP :
 
logic:iterate id=client name=tabTest scope=session type=Client
bean:write name=client property=name/
/logic:iterate
 
This error is return :
 
...JSP Exception : Cannot find bean client in scope null
 
any help...Thanks
 
Sylvain




The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: Logic iterate problems

2001-05-10 Thread Sylvain FAGNENT

Doesn't work since we retrieve the following exception:
javax.servlet.jsp.JspException: No getter method for property choix of bean
tabTest

tabTest is a Vector!!

- Original Message -
From: Dudley Butt@i-Commerce [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:45 PM
Subject: RE: Logic iterate problems


 try this

 logic:iterate id=tabTest name=tabTest scope=session type=Client
  bean:write name=tabTest property=name/
  /logic:iterate

 -Original Message-
 From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 3:37 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Logic iterate problems


 I tried to encapsulate all my tags with
 html:form action=realAction
 ..
 /html:form

 But it still doesn't work !
 - Original Message -
 From: Firmin David [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 10, 2001 3:22 PM
 Subject: RE: Logic iterate problems


  I came across a similar problem not so long ago. What I'd done wrong was
 try
  and access properties outside the html:form tags.
  Moving my tag calls inside the form tags fixed my problem at the time,
but
 I
  don't know if this applies in your case. It's worth double checking
  none-the-less.
 
  Regards
  David
 
  -Original Message-
  From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
  Sent: 10 May 2001 13:57
  To: [EMAIL PROTECTED]
  Subject: Logic iterate problems
 
 
  Hello,
 
  I have a Vector Object stored in my session with the key tabTest this
  Vector
  contains Client Objetcs, Client classe have a name property.
 
  I use this code in my JSP :
 
  logic:iterate id=client name=tabTest scope=session type=Client
  bean:write name=client property=name/
  /logic:iterate
 
  This error is return :
 
  ...JSP Exception : Cannot find bean client in scope null
 
  any help...Thanks
 
  Sylvain
 
 
 
  
  The information in this email is confidential and is intended solely
  for the addressee(s).
  Access to this email by anyone else is unauthorised. If you are not
  an intended recipient, you must not read, use or disseminate the
  information contained in the email.
  Any views expressed in this message are those of the individual
  sender, except where the sender specifically states them to be
  the views of Capco.
 
  http://www.capco.com
  ***
 
 





RE: Logic iterate problems

2001-05-10 Thread Dudley [EMAIL PROTECTED]
 FAGNENT [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 4:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Logic iterate problems


Doesn't work since we retrieve the following exception:
javax.servlet.jsp.JspException: No getter method for property choix of bean
tabTest

tabTest is a Vector!!

- Original Message -
From: Dudley Butt@i-Commerce [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 3:45 PM
Subject: RE: Logic iterate problems


 try this

 logic:iterate id=tabTest name=tabTest scope=session type=Client
  bean:write name=tabTest property=name/
  /logic:iterate

 -Original Message-
 From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 3:37 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Logic iterate problems


 I tried to encapsulate all my tags with
 html:form action=realAction
 ..
 /html:form

 But it still doesn't work !
 - Original Message -
 From: Firmin David [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 10, 2001 3:22 PM
 Subject: RE: Logic iterate problems


  I came across a similar problem not so long ago. What I'd done wrong was
 try
  and access properties outside the html:form tags.
  Moving my tag calls inside the form tags fixed my problem at the time,
but
 I
  don't know if this applies in your case. It's worth double checking
  none-the-less.
 
  Regards
  David
 
  -Original Message-
  From: Sylvain FAGNENT [mailto:[EMAIL PROTECTED]]
  Sent: 10 May 2001 13:57
  To: [EMAIL PROTECTED]
  Subject: Logic iterate problems
 
 
  Hello,
 
  I have a Vector Object stored in my session with the key tabTest this
  Vector
  contains Client Objetcs, Client classe have a name property.
 
  I use this code in my JSP :
 
  logic:iterate id=client name=tabTest scope=session type=Client
  bean:write name=client property=name/
  /logic:iterate
 
  This error is return :
 
  ...JSP Exception : Cannot find bean client in scope null
 
  any help...Thanks
 
  Sylvain
 
 
 
  
  The information in this email is confidential and is intended solely
  for the addressee(s).
  Access to this email by anyone else is unauthorised. If you are not
  an intended recipient, you must not read, use or disseminate the
  information contained in the email.
  Any views expressed in this message are those of the individual
  sender, except where the sender specifically states them to be
  the views of Capco.
 
  http://www.capco.com
  ***
 
 




RE: Logic iterate problems

2001-05-10 Thread Deadman, Hal

Have you tried this? It should work as long as whatever is in the Vector has
a method defined like: public String getName();

logic:iterate id=client name=tabTest
bean:write name=client property=name/
/logic:iterate


Put something like this at the top of your JSP just to make sure tabTest is
in there.
%
Object obj = session.getAttribute(tabTest);
if (obj==null)
{
System.err.println(The action wasn't called before this jsp);
}
else
{
System.err.println(tabTest is a  + obj.getClass().getName());
}
%


 -Original Message-
 From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 10:36 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Logic iterate problems


 i'll send u some code that u can adapt for Vectors that we used quite
 effectively with Arraylists, try it out...

 we used like a wrapper class to put our collection object in
 as follows:


 -
 package com.didata.itax.payment.web.data;

 import java.util.ArrayList;

 /**
  * Title:
  * Description:
  * Copyright:Copyright (c) 2001
  * Company:
  * @author
  * @version 1.0
  */

 public class EFilerList {
 private ArrayList list = null;
 private int size = 0;

 public int getSize(){
 return list.size();
 }

 public EFilerList() {
 list = new ArrayList();
 }
 public EFilerList(ArrayList newList) {
 list = newList;
 }
 public void addEFiler(EFiler efiler){
 list.add(efiler);
 }

 public void removeEFiler(int eFilerID){
 list.remove(eFilerID);
 list.trimToSize();
 }
 public EFiler[] getEfilers(){//the iterate tags
 property=efilers will
 call this method!!
 EFiler[] eFilers = new EFiler[list.size()];
 eFilers = (EFiler[])list.toArray(eFilers);
 return eFilers;
 }


 public EFiler getEfiler(int eFilerID){
 EFiler eFiler = new EFiler();
 eFiler = (EFiler)list.get(eFilerID);
 return eFiler;
 }
 }

 in your actionform or wherever u build the vector, use the
 above class to
 wrap your Vector, then, u push this list class above as your
 session object.
 This class is juts a wrapper, so we can access the ArrayList
 or Vector in
 our jsp. Once you've built EFilerList, put all the elements
 in it that u
 need, add it to the session   session.setAttribute...etc


 the jsp for the above example looks like this

   logic:iterate id=eFilerList
 name=eFilerList scope=session property=efilers
 tr
   td align=center
 bean:write name=eFilerList
 property=firstName filter=true/
   /td
   td align=center
 bean:write name=eFilerList
 property=initials filter=true/
   /td
   td align=center
 bean:write name=eFilerList
 property=lastName filter=true/
   /td
   td align=center
 bean:write name=eFilerList
 property=idNumber/
   /td
   td align=center
 bean:write name=eFilerList
 property=state/
   /td

   td align=center
   html:link
 page=/eFilerEdit.do?action=Edit bean:message
 key=eFilerList.edit//html:link
   /td
   td align=center
 html:checkbox name=eFilerList
 property=state/
   /td

 /tr
   /logic:iterate


 the eFiler class looks like this.


 package com.didata.itax.payment.web.data;

 import com.didata.itax.payment.web.actionform.*;

 /**
  * Title:
  * Description:
  * Copyright:Copyright (c) 2001
  * Company:
  * @author
  * @version 1.0
  */

 public class EFiler implements java.io.Serializable {

 String firstName = null;
 String initials = null;
 String lastName = null;
 String idNumber = null;
 Boolean state = new Boolean(false);

 public EFiler() {

 }

 public EFiler(EFilerActionForm eFilerForm) {
 firstName = eFilerForm.getFirstName();
 initials = eFilerForm.getInitials();
 lastName = eFilerForm.getLastName();
 idNumber = eFilerForm.getIdNumber();
 state = eFilerForm.getState();
 }

public Boolean getState(){
  return state;
}

public void setState(Boolean _state){
   this.state = _state;
}
   public String getFirstName(){
   return firstName

Re: Logic iterate problems = solution

2001-05-10 Thread Sylvain FAGNENT



I found the error, the logic tld was not 
imported...
the logic tag was not parsed 

stupid error isn't it ?? :-

  - Original Message - 
  From: 
  Sylvain FAGNENT 
  
  To: [EMAIL PROTECTED] 
  Sent: Thursday, May 10, 2001 3:41 
PM
  Subject: Re: Logic iterate problems
  
  In fact I use the full class name in the iterate 
  Tag !
  
- Original Message - 
From: 
Nanduri, Amarnath 
To: '[EMAIL PROTECTED]' 

Sent: Thursday, May 10, 2001 3:39 
PM
Subject: RE: Logic iterate 
problems

In 
your jsp page did you do an import on client ?


%@ page import = "beans.Client" %