DisplayTag

Allow displaytag in a form

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.2
  • Component/s: None
  • Labels:
    None
  • Application server:
    Any

Description

Basically I would like to be able to make the sort/page links be javascript calls to a function. This is so that I can incorporate the displaytag in existing forms/framework I am using without losing information that is kept on the page.

I can almost achieve this by:
1. using a custom RequestHelperFactory to create custom RequestHelper that creates a special type of Href - a JavascriptHref that takes the displaytag parameter map and passes it to a function to package up in my existing form.
2. the same RequestHelper to retrieve the displaytag parameters from the request object where they are being and pass them back to TableTag when requested.

The only downfall of this plan is gereating the javascript link.
getSortingHref in TableTag (and the similar functions) do:
Href href = new Href(this.basehref);
And hence I lose the functionality of my special JavascriptHref class.

If it was:
Href href = this.basehref.clone();
or similar my plan would work perfectly.

As far as I can tell, this would be a minimal impact change, just a clone method in Href and the use of it in TableTag.

Would this be possible?

Apart from this tiny issue I have, it's a truly excellent project.

Activity

Hide
Anonymous added a comment -
Rather than relying on JavaScript could the same functionality be achieved by making the sorting/paging links be form submit buttons?

These could be styled to look like links, but wouldn't require JS to be enabled to work.
Show
Anonymous added a comment - Rather than relying on JavaScript could the same functionality be achieved by making the sorting/paging links be form submit buttons? These could be styled to look like links, but wouldn't require JS to be enabled to work.
Hide
Emilio Dolce added a comment -
Possible solution can be in the DISPL-267
Show
Emilio Dolce added a comment - Possible solution can be in the DISPL-267
Hide
fabrizio giustina added a comment -
implemented in 1.2. DIsplaytag can now be configured to submit a form when clicking on a pagination or sorting link
Show
fabrizio giustina added a comment - implemented in 1.2. DIsplaytag can now be configured to submit a form when clicking on a pagination or sorting link
Hide
Mike Calmus added a comment -
Part of this most recent patch could cause issues:

            if (value != null & value.getClass().isArray())

should be rewritten as:

            if (value != null && value.getClass().isArray())

If value is null, a NullPointerException will be thrown
Show
Mike Calmus added a comment - Part of this most recent patch could cause issues:             if (value != null & value.getClass().isArray()) should be rewritten as:             if (value != null && value.getClass().isArray()) If value is null, a NullPointerException will be thrown
Hide
Esat Postaci added a comment -
Where is the 1.2 version :)

Still testing since 6 months.

OMG...
Show
Esat Postaci added a comment - Where is the 1.2 version :) Still testing since 6 months. OMG...
Hide
Severyn Vital added a comment -
why form attribute was not added in displaytag-el.tld but only in displaytag.tld?
Show
Severyn Vital added a comment - why form attribute was not added in displaytag-el.tld but only in displaytag.tld?

People

Vote (0)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
2h
Remaining Estimate - 2 hours
Logged:
Not Specified
Time Spent - Not Specified