Nested span issue

6 views
Skip to first unread message

Gan...@j4fry.org

unread,
Feb 3, 2009, 3:11:33 AM2/3/09
to j4fry
This thread was moved from our old sourceforge forum:

Nested span issue
By: Dennis (dennis-) - 2008-03-24 20:41
Hi,

it seems like everytime a component is re-rendered after an AJAX call,
it gets wrapped in a new <span />-Tag. If the rendered component
itself uses the ajax tag the J4Fry JavaScript code gets inserted into
each of these nested spans!

Example:
<f:view>
<h:form id="myForm">
<h:inputText id="in" value="#{bean.myValue}">
<fry:ajax event="onclick" action="#{bean.update}" reRender="result" /
>
</h:inputText><br />

<h:outputText id="result" value="#{bean.myValue}" />
</h:form>
</f:view>

Everytime I click on the h:inputText field the rendered outputText is
wrapped in one <span>-Element more.
I use Firebug (Inspect) and WebDeveloper toolbar (View Generated
Source) for analyzing such stuff.

Thanks in advance for any hints.

Regards,
Dennis



RE: Nested span issue
By: ganesh (ganeshpuriProject Admin) - 2008-03-25 04:25
Dear Dennis,

Thank you for digging into the generated HTML structure. I will
set up your example to debug the behaviour you describe. Which JSF
implementaiton and which web container are you using?

Regards,
Ganesh

RE: Nested span issue
By: ganesh (ganeshpuriProject Admin) - 2008-03-25 05:43
Hi,

I see the same behaviour. Actually there are 2 separate
concerns:

- The routine that is responsible for rendering the j4fry
script tag only once per page is incorrectly initialized when an AJAX
enabled tag is rerendered.
- When replacing a component the replacement is always
wrapped in a span tag. This is currently done on pupose in
j4fry_common.fry, line 186. We'll need to think about this because
frequent AJAX updates (e.g. onkeyup) may generate loads of spans.

I will create bugs in the tracker for both.

Greetz,
Ganesh

issues fixed
By: ganesh (ganeshpuriProject Admin) - 2008-03-30
07:26
Hi,

Bugs 1924914 and 1924915 have been closed. The
description for the fixes is included in the bug description. Here is
a release 1.2_01 beta1 containing the fixes:
http://j4fry.cvs.sourceforge.net/*checkout*/j4fry/JSFComponents/j4fry-components-1.2_01.jar

Greetz,
Ganesh
Reply all
Reply to author
Forward
0 new messages