[
https://issues.apache.org/jira/browse/COCOON-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554366
]
Sylvain Wallez commented on COCOON-2126:
----------------------------------------
A bit of warning: widgets are not block-level components, and are allowed in
places where HTML would forbid a div. For example, it is perfectly legal to
include a <fd:label> in a <b> tag where a <div> is not allowed. So replacing
the <span> with a <div> can actually do more harm than good as a general
solution.
So we must have a special behavior for replacements in a <tr> that inserts a
<td> rather than a <span>.
Handling this server-side in jx-macros.xml (or JXMacrosHelper) seems quite
complicated since we can't grab what is sent to the cocoonConsumer by the
JXTemplateGenerator.
The easiest way is most probably to handle this special case in BUHandler.js,
in the handlers.replace function: if oldElement is a <td> and firstChild is an
empty <span>, then replace firstChild with an empty <td> *with the proper id
attribute* (so that it can be replaced again later).
> CForms-Ajax-Update sends <span> instead of <td>
> -----------------------------------------------
>
> Key: COCOON-2126
> URL: https://issues.apache.org/jira/browse/COCOON-2126
> Project: Cocoon
> Issue Type: Bug
> Components: Blocks: Ajax, Blocks: Forms
> Affects Versions: 2.1.10
> Reporter: Florian Weitling
> Assignee: Grzegorz Kossakowski
> Attachments: screenshot-1.jpg, screenshot-2.jpg, screenshot-3.jpg,
> showQuestion.bind.xml, showQuestion.def.xml, showQuestion.js,
> showQuestion.tmpl.xml, sitemap-excerpt.xmap
>
>
> In a <table> the cells' entries are delivered by a repeater. When hiding a
> cell programmatically via WidgetState.INVISIBLE the bu:update contains a
> <span> instead of a <tr> or another hint to hide away the cell. This results
> in weird optics 'cause <span> is not allowed as child of a <tr>.
> My current workaround: Using <div>s with table* styles.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.