(Newbie) html:link passing an object via the request object

2003-07-08 Thread Davidson, Glenn
I need to assign an object to the request object via an html:link

I am iterating over a collection of objects as such:

logic:iterate id=doc name=listofdocs scope=session
type=app.TiaaDocument

I would like to assign the object represented by doc into the request
object as part of the html:link (shown below as it currently exists.

html:link forward=editxml
paramId=tiaaDocument
paramName=doc
scope=session
Edit
/html:link

Can anyone give me some guidance?

Thanks

Glenn







RE: (Newbie) html:link passing an object via the request object

2003-07-08 Thread Davidson, Glenn
Further research shows that the link is converted to html which does not
accept objects, only strings. So it looks like I need to pass in a string
that will be used to identify the data I need. I should have an Action to
take the string id from the request object and generate an object with the
data I want and then pass control to the jsp that will display it.

Is this the best way to do this? Is there an easier way?

I could use an object cache to eliminate the need to recreate the objects
each time they are created (the data is static).

Thanks

Glenn

-Original Message-
From: Davidson, Glenn 
Sent: Tuesday, July 08, 2003 3:40 PM
To: 'Struts Users Mailing List'
Subject: (Newbie) html:link passing an object via the request object


I need to assign an object to the request object via an html:link

I am iterating over a collection of objects as such:

logic:iterate id=doc name=listofdocs scope=session
type=app.TiaaDocument

I would like to assign the object represented by doc into the request
object as part of the html:link (shown below as it currently exists.

html:link forward=editxml
paramId=tiaaDocument
paramName=doc
scope=session
Edit
/html:link

Can anyone give me some guidance?

Thanks

Glenn







newbie html:link question

2002-06-27 Thread @Basebeans.com

Subject: newbie html:link question
From: Jeff Herald [EMAIL PROTECTED]
 ===
Hello all,

I have an html:link tag that is nested in a logic:iterate tag. I need to add
the iterate index
as a parameter to the link url. I'm having trouble referencing the page
scope variable index
from the html:link tag.What is the correct way to do this?

Here is my code snippet (right now it throws a cannot find bean page in
scope null error):

logic:iterate name=add property=subnets id=item
indexId=index
%=item% nbsp; html:link page=/admin/add.do
paramName=page paramProperty=index
paramId=indexDelete/html:linkBR
/logic:iterate

Any help would be appreciated.



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




RE: newbie html:link question

2002-06-27 Thread Regan, Patrick

I know I have used the bean:write tag (with name=index) to get at the
index.

Pat

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 3:10 PM
To: [EMAIL PROTECTED]
Subject: newbie html:link question


Subject: newbie html:link question
From: Jeff Herald [EMAIL PROTECTED]
 ===
Hello all,

I have an html:link tag that is nested in a logic:iterate tag. I need to add
the iterate index
as a parameter to the link url. I'm having trouble referencing the page
scope variable index
from the html:link tag.What is the correct way to do this?

Here is my code snippet (right now it throws a cannot find bean page in
scope null error):

logic:iterate name=add property=subnets id=item
indexId=index
%=item% nbsp; html:link page=/admin/add.do
paramName=page paramProperty=index
paramId=indexDelete/html:linkBR
/logic:iterate

Any help would be appreciated.



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




Re: [Newbie] html:link

2002-03-10 Thread Slimane

Hi,

Nobody had answered me 'till you did. So, thank you and I will take a look 
at the java.util.Map :)

Friendly Regards,
Slimane

At 05:05 11/03/2002 +1100, you wrote:
Hi Silmane,

you may have already received a reply regarding this but none the less
this is how I've been doing it.

If you place a java.util.Map into the request the html:link tag will
then build
the parameter list for you where the keys are the parameter names and
their
values the parameter values (of course).

In your case your iterating over a Collection of beans and from that
collection
you would/could provide a method to return the Map.

In my example I have a Vector of 'foo.Bar' objects where Bar objects
have a getter
method for the map property.  My Vector of foo.Bar objects is an
attribute of the
request stored under the key 'things'.

logic:iterate id=bar name=things type=foo.Bar
linkname The documentation for the link tag is of course located at: 
http://jakarta.apache.org/struts/struts-html.html#link There are a couple 
of restrictions I didn't mention documented there. Someone just helped me 
out with this a few days ago so to whomever it was thanks. Rob Slimane 
Zouggari wrote:   Hi,   I have the following piece of code 
:type=be.stluc.info.struts.ElementProjetcodpha=  cod 
tac=  
 I was wondering if there's a easier way to do that with the 
 html:link tag ?   Thanx in advance,  Slimane   --  To unsubscribe, 
 e-mail:  For additional commands, e-mail: -- To unsubscribe, e-mail: For 
 additional commands, e-mail:


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




Re: [Newbie] html:link

2002-03-09 Thread tyler

Hi Silmane,

you may have already received a reply regarding this but none the less
this is how I've been doing it.

If you place a java.util.Map into the request the html:link tag will
then build
the parameter list for you where the keys are the parameter names and
their
values the parameter values (of course).

In your case your iterating over a Collection of beans and from that
collection
you would/could provide a method to return the Map.

In my example I have a Vector of 'foo.Bar' objects where Bar objects
have a getter
method for the map property.  My Vector of foo.Bar objects is an
attribute of the 
request stored under the key 'things'.

logic:iterate id=bar name=things type=foo.Bar
html:link href=wherever paramName=bar name=bar property=map
linkname /html:link
/logic:iterate

The documentation for the link tag is of course located at:
http://jakarta.apache.org/struts/struts-html.html#link
There are a couple of restrictions I didn't mention documented there.

Someone just helped me out with this a few days ago so to whomever it
was thanks.

Rob

Slimane Zouggari wrote:

 Hi,
 
 I have the following piece of code :
 
 logic:iterate id=elt name=listform scope=session property=vect
 type=be.stluc.info.struts.ElementProjet
 A HREF=/projectdetails.do?codpro=bean:write name=elt property=codpro/
 codpha=bean:write name=elt property=codpha/
 codtac=bean:write name=elt property=codtac/
 bean:write name=elt property=lib/
 /A
 BR
 /logic:iterate
 
 I was wondering if there's a easier way to do that with the html:link tag ?
 
 Thanx in advance,
 Slimane
 
 --
 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]




[Newbie] html:link

2002-03-07 Thread Slimane Zouggari

Hi,

I have the following piece of code :

logic:iterate id=elt name=listform scope=session property=vect 
type=be.stluc.info.struts.ElementProjet
A HREF=/projectdetails.do?codpro=bean:write name=elt property=codpro/
codpha=bean:write name=elt property=codpha/
codtac=bean:write name=elt property=codtac/
bean:write name=elt property=lib/
/A
BR
/logic:iterate

I was wondering if there's a easier way to do that with the html:link tag ?

Thanx in advance,
Slimane


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