Iterate of List - need to test if list is null

2004-02-27 Thread sean jones


I have an object named Wizard in the request. 

Wizard has a property defined as

pubic Class Wizard {
  private List progressBar = null;
  public Wizard() {}
  public List getProgressBar() { return progressBar; }
}

in JSP i do this

logic:iterate name=wizard property=progressBar
/logic:iterate

how can i test if the progressBar is null before i start the iterate.

right now i get an error, cant find collection.  

i tried to used logic:notEmpty but i am not using struts 1.1




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



RE: Iterate of List - need to test if list is null

2004-02-27 Thread Slattery, Tim - BLS
 I have an object named Wizard in the request. 
 
 Wizard has a property defined as
 
 pubic Class Wizard {
   private List progressBar = null;
   public Wizard() {}
   public List getProgressBar() { return progressBar; }
 }
 
 in JSP i do this
 
 logic:iterate name=wizard property=progressBar /logic:iterate
 
 how can i test if the progressBar is null before i start the iterate.

Use JSTL:

c: if test=${!empty wizard.progressBar}
logic iterate name=wizard property=pregressBar/logic:iterate
/c:test


--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Iterate of List - need to test if list is null

2004-02-27 Thread sean jones


Thanks Tim,

Hopefully the heads of state won't balk at the JSTL code. 

thanks again.





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