The general idea is correct though.  You’d use the ${foo.id} _expression_ wherever you’d pass the parameter to the tag that generates the link.  So instead of having a direct href, you could have:

 

<portlet:something action="" param0=”${foo.id}”/>

 

If you don’t have the ability to use an _expression_ in your tags or the tags don’t support parameters of any sort, then the problem lies in the portlet tag library you’re using.  But as far as displaytag goes, that’s how you’d do it (assuming you’re using EL; if not, you can use a scriptlet instead, but the concept’s the same).

 

Rick Herrick

[EMAIL PROTECTED]

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gaurav Vaish
Sent: Wednesday, April 06, 2005 1:13 AM
To: [email protected]
Cc: Portlets YahooGroup
Subject: Re: [displaytag-user] Using DisplayTag in Portlets

 

edit.html?...
Hey... I'm working inside a portlet. Not allowed to have direct links in JSP. It's a biggest blunder that I'd ever do.


--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------

On Apr 5, 2005 10:30 PM, Matt Raible <[EMAIL PROTECTED]> wrote:

You can construct your own URL inside a table cell - just leave the
"property" element out and give the cell a body.  For example:

<display:table id="foo">
<display:column>
        <a href="" value="edit.html?id=${foo.id}"/>">Edit</a>
</display:column>

Matt

On Apr 4, 2005, at 11:59 PM, Gaurav Vaish wrote:

> Hi,
>
>    I wish to use DisplayTag (http://displaytag.sf.net) in my portlets.
> I am using Pluto as my portlet engine.
>
>    I am facing an issue: using DT in a column that has hyperlink with
> parameters. Here's the detailed problem:
>
>    I have to show a few results in a datagrid (table) with a link to
> each entry to either view details or edit it. However, I cannot use
>      <portlet:actionURL><portlet:param .../>...
>    or
>      <portlet:renderURL><portlet:param .../>...
>
>    since the value to the parameter is dynamic, depends on the
> row-number.
>
>    How can I make it happen?
>
>    Expected output like:
>
>    ___________________________________
>   |  Data          |      |         |
>   |----------------|------|---------|
>   |  Row 1         | View |   Edit  |
>  |  Row 2         | View |   Edit  |
>  |________________|______|_________|
>
>    Now the "View" and "Edit" items are hyperlinks. In normal JSP, they
> would be something like "view.jsp?item=1" or "edit.jsp?item=2" etc.
>
>
> --
> Cheers,
> Gaurav Vaish
> http://www.mastergaurav.org
> http://mastergaurav.blogspot.com
> --------------------------------
>

 

Reply via email to