Re: the paramId thing, yeah, that's another limitation of it.  You only had
a single param in your example, so I just assumed you only had one.  If you
have multiple parameters, that won't work.  That actually why I mostly use
the method I illustrated earlier.

As for sorting, there's the sortProperty attribute.  This specifies the
property on which the column should be sorted.  So what I sent before would
look like this:

<display:table name="someFormBean.someMap" uid="myID">
  <display:column sortProperty="prop2">
    <a href="somethingelse.do?prop2=${myID.prop2}">
      ${myID.prop1}
    </a>
  </display:column>
</display:table>

You'd change sortProperty to whatever you want to sort on, obviously.

HTH.

Rick Herrick
[EMAIL PROTECTED]


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:displaytag-user-
> [EMAIL PROTECTED] On Behalf Of vladimir lenin
> Sent: Thursday, April 06, 2006 4:16 PM
> To: [email protected]
> Subject: RE: [displaytag-user] Column attributes and run time expressions
> 
> Thank you, Mr.Herrick
> 
> 1. if I put the anchor tag in the body of the column,
> the default sort will not properly work
> 2. paramid concept works only when you want to send
> only one parameter. it does not work with multiple
> parameters
> 
> If I put anchor tag in the column body, I have to do
> external sorting
> 
> otherwise I have to use table decirators for forming
> links
> 
> I do not know if there are any other options
> 
> Thanks again
> 
> --- Rick Herrick <[EMAIL PROTECTED]> wrote:
> 
> > Oh yeah, that won't work.  This is similar to the
> > problem last week where
> > someone was including EL conditionals (<c:if>)
> > around the body of the table
> > to exclude rows where a property met a particular
> > condition.  Basically, the
> > body of the <display:table> tag is NOT evaluated
> > iteratively, that is, the
> > <display:column> tags are evaluated once, when the
> > tag is first encountered.
> > That means any reference to the row item there is
> > lost.
> >
> > You can however put references to the row item
> > within the body of the
> > <display:column> tags themselves, since the body of
> > these tags is evaluated
> > each iteration.  This means that you need to
> > construct the link within the
> > column body instead of trying to do it through the
> > href attribute.  This
> > would look like this (some attributes removed for
> > clarity):
> >
> > <display:table name="someFormBean.someMap"
> > uid="myID">
> >   <display:column>
> >     <a href="somethingelse.do?prop2=${myID.prop2}">
> >       ${myID.prop1}
> >     </a>
> >   </display:column>
> > </display:table>
> >
> > And actually, looking at it, I think another thing
> > you can do is just leave
> > the EL off of the URL.  The whole point of that
> > paramId/paramProperty stuff
> > is to automatically put "property=value" on the
> > provided URL.  So if you
> > want a URL like somethingelse.do?XXX=valueOfYYY,
> > It's something like:
> >
> > href="somethingelse.do" paramId="XXX"
> > paramProperty="YYY"
> >
> > So paramId gets carried over literally as whatever
> > that value is.  I can't
> > remember though, I always found those param*
> > attributes to be kind of a
> > pain.  I usually use the <a href> thing directly.
> >
> > Rick Herrick
> > [EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > [mailto:displaytag-user-
> > > [EMAIL PROTECTED] On Behalf Of vladimir
> > lenin
> > > Sent: Wednesday, April 05, 2006 3:56 PM
> > > To: [email protected]
> > > Subject: RE: [displaytag-user] Column attributes
> > and run time expressions
> > >
> > > I have a map with java beans. ${myID.prop2} is
> > working
> > > fine when it is included in the body of the
> > display
> > > column.
> > >
> > > however, column attributes like "href" in which I
> > > included ${myID.prop2} is getting evaluated only
> > once.
> > >
> > > it is keeping the values of the first row
> > >
> > >
> > >
> > > <display:table
> > > name="requestScope.someFormBean.someMap"
> > > export="false"
> > >   id="myID" requestURI="some.do" pagesize="25"
> > > sort="list"
> > >   defaultsort="2" excludedParams="*">
> > >
> > >   <display:column sortable="true"
> > > href="somethingelse.do?prop2=${myID.prop2}"
> > >           paramId="prop1" paramProperty="prop2"
> > title="prop1">
> > >
> > >           ${myID.prop1}
> > >
> > >   </display:column>
> > >
> > >
> > >   <display:column sortable="true" title="prop2">
> > >
> > >           ${myID.prop2}
> > >
> > >   </display:column>
> > >
> > >
> > > </display:table>
> > >
> > >
> > > --- Rick Herrick <[EMAIL PROTECTED]> wrote:
> > >
> > > > Can you please post some of the code that didn't
> > > > work?  I'm not 100% clear
> > > > on what you guys are trying to do without an
> > > > illustration, but JSTL or
> > > > scriptlet expressions should re-evaluate each
> > > > iteration.  I use this type
> > > > of construct in my code in just about every
> > > > displaytag table I've got.
> > > >
> > > > Farmer, Todd wrote:
> > > > > I had the same issue - requiring multiple
> > query
> > > > parameters to be
> > > > > dynamically added to the link for each row.  I
> > > > started by using JSTL,
> > > > > and ran into the same issue that you did.  My
> > > > eventual solution was to
> > > > > create table decorators.
> > > > >
> > > > > From: vladimir lenin
> > > > > Sent: Tuesday, April 04, 2006 5:36 PM
> > > > >
> > > > > As I can only specify one paramId for a
> > column, I
> > > > am
> > > > > using a run time expression for the href
> > value.
> > > > but it
> > > > > looks like it is evaluated only once. it it
> > not
> > > > > getting updated by the values from the current
> > > > object
> > > > > in the list.
> > > > > is this the intended behavior. do I have to
> > > > implement
> > > > > a table decorator for links?
> > > > > thank you
> > > >
> > > > --
> > > > Rick Herrick
> > > > [EMAIL PROTECTED]
> > > >
> > > > I haven't got time for inner peace.
> > > >
> > > > "No reasonable definition of reality could be
> > > > expected to permit
> > > > this."--Albert Einstein, Boris Podolsky and
> > Nathan
> > > > Rosen in 1935
> > > >
> > > >
> > > >
> > > >
> > >
> >
> -------------------------------------------------------
> > > > This SF.Net email is sponsored by xPML, a
> > > > groundbreaking scripting language
> > > > that extends applications into web and mobile
> > media.
> > > > Attend the live webcast
> > > > and join the prime developer group breaking into
> > > > this new coding territory!
> > > >
> > >
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> > > > _______________________________________________
> > > > displaytag-user mailing list
> > > > [email protected]
> > > >
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a
> > groundbreaking scripting
> > > language
> > > that extends applications into web and mobile
> > media. Attend the live
> > > webcast
> > > and join the prime developer group breaking into
> > this new coding
> > > territory!
> > >
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> >
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to