RE: logic:iterate id?

2002-06-21 Thread Kamholz, Keith (corp-staff) USX

Ok, you just made me realize my dumb mistake.  Thanks for the help!

~ Keith


-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 8:42 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate id?


Seems that you're trying to write out a property instead of the bean.
Try this...
logic:iterate id=mc name=entries property=mcEntries
type=com.moog,us.eos.beans.MCEntry
bean:write name=mc property=oldDept /
bean:write name=mc property=oldMatch /
bean:write name=mc property=newDept /
bean:write name=mc property=newMatch /
bean:write name=mc property=pivotDept /
bean:write name=mc property=pivotMatch /
/logic:iterate

...should get you back on the road.


Arron.



On Fri, 2002-06-21 at 04:59, Kamholz, Keith (corp-staff) USX wrote:
 When you use the logic:iterate tag, do you have to define the id that
 stores the result of the iteration before the tag?
 My code is:
 
   logic:present name=entries property=mcEntries
 logic:iterate id=mc name=entries property=mcEntries
 type=com.moog.us.eos.beans.MCentry
   bean:write name=mc.oldDept/br
   bean:write name=mc.oldMach/br
   bean:write name=mc.newDept/br
   bean:write name=mc.newMach/br
   bean:write name=mc.pivotDept/br
   bean:write name=mc.pivotMach/br
 /logic:iterate
   /logic:present
   logic:notPresent name=entries property=mcEntries
 biNO ENTRIES/i/bbr
   /logic:notPresent
 
 If I don't define the id before the iterate tag, I get a runtime error
that
 says:
 Cannot find bean mc.oldDept in scope null:
 However, if I do define the id, then I get a compile time error that
 complains about a duplicate variable.
 Maybe the cannot find bean error is referring to the oldDept part
rather
 than the mc, but I dont' know.
 What's going on?
 
 
 ~ Keith
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



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

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




logic:iterate id?

2002-06-20 Thread Kamholz, Keith (corp-staff) USX

When you use the logic:iterate tag, do you have to define the id that
stores the result of the iteration before the tag?
My code is:

  logic:present name=entries property=mcEntries
logic:iterate id=mc name=entries property=mcEntries
type=com.moog.us.eos.beans.MCentry
  bean:write name=mc.oldDept/br
  bean:write name=mc.oldMach/br
  bean:write name=mc.newDept/br
  bean:write name=mc.newMach/br
  bean:write name=mc.pivotDept/br
  bean:write name=mc.pivotMach/br
/logic:iterate
  /logic:present
  logic:notPresent name=entries property=mcEntries
biNO ENTRIES/i/bbr
  /logic:notPresent

If I don't define the id before the iterate tag, I get a runtime error that
says:
Cannot find bean mc.oldDept in scope null:
However, if I do define the id, then I get a compile time error that
complains about a duplicate variable.
Maybe the cannot find bean error is referring to the oldDept part rather
than the mc, but I dont' know.
What's going on?


~ Keith

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




Re: logic:iterate id?

2002-06-20 Thread Arron Bates

Seems that you're trying to write out a property instead of the bean.
Try this...
logic:iterate id=mc name=entries property=mcEntries
type=com.moog,us.eos.beans.MCEntry
bean:write name=mc property=oldDept /
bean:write name=mc property=oldMatch /
bean:write name=mc property=newDept /
bean:write name=mc property=newMatch /
bean:write name=mc property=pivotDept /
bean:write name=mc property=pivotMatch /
/logic:iterate

...should get you back on the road.


Arron.



On Fri, 2002-06-21 at 04:59, Kamholz, Keith (corp-staff) USX wrote:
 When you use the logic:iterate tag, do you have to define the id that
 stores the result of the iteration before the tag?
 My code is:
 
   logic:present name=entries property=mcEntries
 logic:iterate id=mc name=entries property=mcEntries
 type=com.moog.us.eos.beans.MCentry
   bean:write name=mc.oldDept/br
   bean:write name=mc.oldMach/br
   bean:write name=mc.newDept/br
   bean:write name=mc.newMach/br
   bean:write name=mc.pivotDept/br
   bean:write name=mc.pivotMach/br
 /logic:iterate
   /logic:present
   logic:notPresent name=entries property=mcEntries
 biNO ENTRIES/i/bbr
   /logic:notPresent
 
 If I don't define the id before the iterate tag, I get a runtime error that
 says:
 Cannot find bean mc.oldDept in scope null:
 However, if I do define the id, then I get a compile time error that
 complains about a duplicate variable.
 Maybe the cannot find bean error is referring to the oldDept part rather
 than the mc, but I dont' know.
 What's going on?
 
 
 ~ Keith
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]



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




JSP Compile warning w/ logic:iterate id

2002-05-23 Thread DHS Struts

All -

I am in the process of cleaning up my code to eliminate warning messages, 
and I am stuck on this one. I am using a logic:iterate to display a bean and 
I get this message in conjunction with it:

JavaCompile: The local variable 'results' is never used.

Here is a snippet containing the code in question:

logic:iterate id=results
   name=nameSearchResults
   scope=session
   type=dhs.vcm.vis.form.NameSearchResultsForm
   indexId=myIndex
pg:item
dhshtml:row oddColor=#ff evenColor=#ff
tdnbsp;/td
td
html:link page='%=/do/NameSearch/Details?selectedClient=+myIndex %' 
bean:write name=results property=clientName/
/html:link
/td
tdbean:write name=results property=address//td
tdbean:write name=results property=city//td
tdbean:write name=results property=state//td
tdbean:write name=results property=clientBirthdate//td
tdbean:write name=results property=ssn//td
/dhshtml:row
/pg:item
/logic:iterate

If anyone knows why I am getting this message and can tell me how to get rid 
of it, I would be most appreciative.

I am using WebSphere Studio Application Developer 4.x with Struts 1.02.

Thanks in advance,

mark n.

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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