XHTML Validation - Form Widget with type= list|multi and inner form renders bad
markup with visible effects
-----------------------------------------------------------------------------------------------------------
Key: OFBIZ-3737
URL: https://issues.apache.org/jira/browse/OFBIZ-3737
Project: OFBiz
Issue Type: Sub-task
Components: framework
Affects Versions: SVN trunk
Reporter: Blas Rodriguez Somoza
Priority: Minor
Fix For: SVN trunk
The markup rendered for form widgets with inner fields are (this is the rows
sample, but the header is the same):
1.- With separate columns == true (wrong render)
* <td....> generated by macro renderFormatItem{color:red}
RowFormCell{color}Open
** <form ....>
** <input .../>
** <input .../>
** <td> generated by macro renderFormatItem{color:red}RowCell{color}Open
*** cell content 1
** </td> generated by renderFormatItem{color:red}RowCell{color}Close
** <td> generated by macro renderFormatItem{color:red}RowCell{color}Open
*** cell content 2
** </td> generated by renderFormatItem{color:red}RowCell{color}Close
*** ...
** </form>
* </td>generated by renderFormatItem{color:red}RowFormCell{color}Close
2.- With separateColumns == false (renders OK)
* <td....> generated by macro renderFormatItem{color:red}RowFormCell{color}Open
** <form ....>
** <input .../>
** <input .../>
*** cell content 1
*** cell content 2
*** ...
** </form>
* </td>generated by renderFormatItem{color:red} RowFormCell{color}Close
The render with separate columns is not only invalid from html POV, but also
have a visible effect (see screenshots)
In the screenshot can be seen a ghost column, which is generated by the browser
parser when it closes the unclosed initial td.
The solution is
* Change the RowFormCell macros to render nothing in html
* Modify the code to add open and close of {color:red}RowCell{color} when
separateColumns is false
Although this patch don't solve the issue about form being inside tr, it
simplifies the problem and avoid the visual effects.
The new rendering will be:
When separateColumns == true (removed ItemRowFormCell macros)
** <form ....>
** <input .../>
** <input .../>
** <td> generated by macro renderFormatItem{color:red}RowCell{color}Open
*** cell content 1
** </td> generated by renderFormatItem{color:red}RowCell{color}Close
** <td> generated by macro renderFormatItem{color:red}RowCell{color}Open
*** cell content 2
** </td> generated by renderFormatItem{color:red}RowCell{color}Close
*** ...
** </form>
When separateColumns == false (replaced ItemRowFormCell macros with ItemRowCell)
** <form ....>
** <input .../>
** <input .../>
** <td> generated by macro renderFormatItem{color:red}RowCell{color}Open
(Changed)
*** cell content 1
*** cell content 2
*** ...
** </td> generated by renderFormatItem{color:red}RowCell{color}Close (Changed)
** </form>
Tested with ff 3.5 Opera 10 Chrome 4.1 and IE 7
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.