When the form attribute of the table taglib is empty (blank), it still tries to 
render the table to use javascript in order to submit the pagination and 
ordering params.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DISPL-626
                 URL: http://jira.codehaus.org/browse/DISPL-626
             Project: DisplayTag
          Issue Type: Bug
          Components: Tag Library
    Affects Versions: 1.2
            Reporter: Angel Ruiz
             Fix For: 1.2
         Attachments: HtmlTableWriter.java

In order to add support to the DisplayTag when javascript is disabled I have 
used the display tag considering the following premise: if javascript is 
enabled I put the form with a value of the corresponding formId and if not I 
just live it blank. The result is the following piece of code:
                <display:table 
name="industrySourceSearchForm.listIndustrySource" export="false"
                    form="${param.javascript == 'false' ? '' : 
'industrySourceSearchForm'}"
                    requestURI="/action/load/industry-source-search"
                    requestURIcontext="true"    
                    id="industrySource">
This way I have covered both situation when the javacript is enable and when it 
is not. The problem is that the current code of the class 
org.displaytag.render.HtmlTableWriter, just checks if the form attribute is 
null instead of checking if the form attribute is empty, so at the end in order 
to have this working I was forced to rewrite that class. Independently of my 
concret use case, which is quite special, I think the code should just check if 
the attribute is empty and not only that the attribute is not null.

Plese, attached find the class file with the bug fixed. I have not tried to 
check if the same implementation criteria could apply to the way other taglib 
attributes are managed.

Cheers.

Angel Ruiz.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to