jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • DisplayTag
  • DISPL-192

add row style to current row from TableDecorator

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.1
  • Component/s: Build/distribution
  • Labels:
    None
  • Application server:
    any

Description

Add a call back method on TableDecorator called addRowStyle(). This allows a row style to be added based on inspection of data for the current row.
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    addrowstyle.patch
    16/Feb/05 5:40 PM
    2 kB
    Justin James

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Justin James added a comment - 16/Feb/05 5:40 PM
Feature request implementation patch.
Show
Justin James added a comment - 16/Feb/05 5:40 PM Feature request implementation patch.
Hide
Permalink
Justin James added a comment - 16/Feb/05 5:48 PM
Used incorrect component. Component should be HTML generation
Show
Justin James added a comment - 16/Feb/05 5:48 PM Used incorrect component. Component should be HTML generation
Hide
Permalink
Anonymous added a comment - 24/Feb/05 10:06 AM
I have applied the patch and it seems to be working correctly, but if I'm not wrong it throws a NullPointerException if you haven't declared a decorator for the table. I have traced the error back to the Row class. This sentence on line 151 is causing the exception:
             addStyle = this.tableModel.getTableDecorator().addRowClass();

Prepending this line with a null check for tableModel.getTableDecorator() corrects the bug.
Show
Anonymous added a comment - 24/Feb/05 10:06 AM I have applied the patch and it seems to be working correctly, but if I'm not wrong it throws a NullPointerException if you haven't declared a decorator for the table. I have traced the error back to the Row class. This sentence on line 151 is causing the exception:              addStyle = this.tableModel.getTableDecorator().addRowClass(); Prepending this line with a null check for tableModel.getTableDecorator() corrects the bug.
Hide
Permalink
Jonathan A Harper added a comment - 19/Apr/05 5:42 PM
A setRowId() method for TableDecorator would be very useful as well.
Show
Jonathan A Harper added a comment - 19/Apr/05 5:42 PM A setRowId() method for TableDecorator would be very useful as well.
Hide
Permalink
Anonymous added a comment - 11/May/05 9:00 AM
thanks for the patch... just what i was looking for.
Show
Anonymous added a comment - 11/May/05 9:00 AM thanks for the patch... just what i was looking for.
Hide
Permalink
Matt Raible added a comment - 02/Jun/05 7:03 AM
I tried committing this patch, but it causes all the tests to fail:

Testcase: org.displaytag.jsptests.AutocolumnStringTest.test11 (autocolumns-string.jsp)(org.displaytag.jsptests.AutocolumnStringTest): Caused an ERROR
null
java.lang.NullPointerException
at org.displaytag.model.Row.getOpenTag(Row.java:151)

Line 151 is:

String addStyle = this.tableModel.getTableDecorator().addRowClass();
Show
Matt Raible added a comment - 02/Jun/05 7:03 AM I tried committing this patch, but it causes all the tests to fail: Testcase: org.displaytag.jsptests.AutocolumnStringTest.test11 (autocolumns-string.jsp)(org.displaytag.jsptests.AutocolumnStringTest): Caused an ERROR null java.lang.NullPointerException at org.displaytag.model.Row.getOpenTag(Row.java:151) Line 151 is: String addStyle = this.tableModel.getTableDecorator().addRowClass();
Hide
Permalink
fabrizio giustina added a comment - 04/Jun/05 1:56 PM
patch committed. dummy test case added, will close the issue only when the test case will be working
Show
fabrizio giustina added a comment - 04/Jun/05 1:56 PM patch committed. dummy test case added, will close the issue only when the test case will be working
Hide
Permalink
fabrizio giustina added a comment - 11/Sep/05 12:03 PM
testcase added and working, closing
(CVS for 1.1)
Show
fabrizio giustina added a comment - 11/Sep/05 12:03 PM testcase added and working, closing (CVS for 1.1)

People

  • Reporter:
    Justin James
Vote (3)
Watch (4)

Dates

  • Created:
    16/Feb/05 5:37 PM
    Updated:
    11/Sep/05 12:03 PM
    Resolved:
    11/Sep/05 12:03 PM

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.