My scenario is that I need a column only for checkboxes. In the title there
will be a checkbox and a link "Delete". How can I show these using display
tag.
When the user will select the top checkbox, all other checkboxes in that
column should be selected or unselected accordingly.


On Thu, Jan 7, 2010 at 6:35 AM, Chris Pratt <thechrispr...@gmail.com> wrote:

> Maybe this will clear things up.  This is a working example from our site:
>
>  <s:url action="reset-password-csr" id="reset" escapeAmp="false"/>
>  <display:table uid="user" name="${users.list}" pagesize="20"
> requestURI="csr-search-results.html" class="tableWithHeaderBG"
> cellpadding="0" cellspacing="0" summary="This table lists Users
> resulting from a previous search" export="false">
>    <display:setProperty name="basic.msg.empty_list">No Users
> Found</display:setProperty>
>    <display:column title="Last Name" property="name.lastname"
> class="tdLeft" scope="row"/>
>    <display:column title="First Name" property="name.firstname"
> class="tdLeftNoPad"/>
>    <display:column title="User ID" property="userid" paramId="userid"
> value="%{'userid'}" paramProperty="userid" class="tdLeft"
> scope="row"/>
>    <display:column title="Email" property="email" paramId="email"
> paramProperty="email" class="tdLeftNoPad"/>
>    <display:column title="Security Question"
> property="securityChallenge" class="tdLeftNoPad"/>
>    <display:column title="Security Answer"
> property="securityResponse" class="tdLeftNoPad"/>
>    <display:column title="&nbsp;" href="${reset}" paramId="userid"
> paramProperty="userid" class="tdLeftNoPad">Reset
> Password</display:column>
>  </display:table>
>
>   (*Chris*)
>
>
> On Wed, Jan 6, 2010 at 5:00 PM, Chris Pratt <thechrispr...@gmail.com>
> wrote:
>
> > In your action, add a getList() method that returns the list generated by
> > the action, then just pass name="${list}" to the display:table tag.  Or,
> you
> > could create the list and put it in the request or session scope and it
> > would work exactly the same.
> >
> > The trick with the interceptor is just to get it to ignore the special
> > tracking parameters that DisplayTag uses in the prev/next links.
> >
> >   (*Chris*)
> >
> >
> > On Wed, Jan 6, 2010 at 4:28 PM, Frans Thamura <fr...@meruvian.org>
> wrote:
> >
> >> wah can share how the interceptor work with display tag
> >>
> >> sorry if this is silly question, but honestly i still need the glue
> >>
> >> usually i create a private xxx List, and will be passed to the list
> >>
> >> how integrate the list $xxx with the display tag?
> >>
> >> thx
> >>
> >>
> >> On Thu, Jan 7, 2010 at 7:25 AM, Chris Pratt <thechrispr...@gmail.com>
> >> wrote:
> >> > It's just a standard JSP Tag Library.  Because Struts 2 has the
> Request
> >> > Wrapper, you can use standard JSTL EL to get the list from your action
> >> and
> >> > pass it to the DisplayTag Table, from then on it's just using the
> >> > capabilities of DisplayTag to put the data where you want it.  The one
> >> > caveat is that we've had to set the requestURI attribute to make sure
> >> that
> >> > the prev/next links go to the right place and I added the
> excludeParams
> >> > parameter below to the params interceptor so that you don't get the
> ugly
> >> > warnings from struts.
> >> >
> >> >        <interceptor-ref name="params">
> >> >          <param name="excludeParams">d-\d*-[a-z]</param>
> >> >        </interceptor-ref>
> >> >
> >> > (*Chris*)
> >> >
> >> > On Wed, Jan 6, 2010 at 4:12 PM, Frans Thamura <fr...@meruvian.org>
> >> wrote:
> >> >
> >> >> can share how the struts2 work with display tag
> >> >>
> >> >>
> >> >> sorry never use this also, how the display tag work with List when we
> >> >> submit the grid
> >> >>
> >> >> F
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Thu, Jan 7, 2010 at 7:00 AM, Chris Pratt <thechrispr...@gmail.com
> >
> >> >> wrote:
> >> >> > We use DisplayTag (http://www.displaytag.org), it works pretty
> well.
> >> >> >  (*Chris*)
> >> >> >
> >> >> > On Wed, Jan 6, 2010 at 3:28 PM, Sergio
> >> >> > <killing-is-my-busin...@hotmail.com>wrote:
> >> >> >
> >> >> >> Hi, people, how can i show a table into a jsp from the struts
> >> action?
> >> >> Are
> >> >> >> there a simple method for doing that? I've tried with java
> >> collections
> >> >> into
> >> >> >> the action and "property" tag into the jsp with no success.
> >> >> >>
> >> >> >> thanks in advance
> >> >> >>
> >> >> >> --
> >> >> >> Sergio
> >> >> >>
> >> >> >>
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> >> >> For additional commands, e-mail: user-h...@struts.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> >> For additional commands, e-mail: user-h...@struts.apache.org
> >> >>
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
>

Reply via email to