Well, after a long debugging session, I found two issues here:
- if the suggestion box is in a table, then it cannot work since during
ajax processing the component id is assembled the wrong way. Basically,
since nobody set up rowIndex (-1), then the row index segment of the id
will be missing. Then client-side response processing will fail since
unmatching any dom id.
- in any case, all rows of the returned suggestion table will have a
wrong class, thus client-side processing will not recognize them
(searching for "richfaces_suggestionEntry").
No way, and this is all JBoss stuff (not related to Trinidad).
-- Renzo
Matthias Wessendorf wrote:
Right,
that is all JBoss stuff,
a quick google search on the rendered class values make that clear
a) http://jira.jboss.com/jira/browse/RF-516
b) http://jsourcery.com/api/jboss.org/richfaces/3.0.0/org/richfaces/component/html/HtmlSuggestionBox.source.html
HTH,
Matthias
On 8/3/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote:
Oh yes, from firebug I got it. Indeed there are several duplicated class
attributes in the respose body:
<table border="0" cellpadding="0" cellspacing="0"
class="dr-sb-int-decor-table rich-sb-int-decor-table"
id="browser:splitty0:navvy:query:f:sb:suggest"
duplicate_class="">
<colgroup span="1"></colgroup>
<!--Start: org.richfaces.SuggestionBox["sb"]-->
<tbody>
<tr class="dr-sb-int rich-sb-int"
duplicate_class="richfaces_suggestionEntry">
<td nowrap="nowrap" class="dr-sb-cell-padding rich-sb-cell-padding"
style=";">one</td>
</tr>
<!--Start: org.richfaces.SuggestionBox["sb"]-->
<tr class="dr-sb-int rich-sb-int"
duplicate_class="richfaces_suggestionEntry">
<td nowrap="nowrap" class="dr-sb-cell-padding rich-sb-cell-padding"
style=";">two</td>
</tr>
</tbody>
</table>
At least I learned about browsing an XHR. Now I have to discover why
Richfaces folks state that this is an old bug.
-- Renzo
Matthias Wessendorf wrote:
with firebug you can see the result of an XHR (xmlHttpRequest).
I was expecting that they render twice "class". Since you use Trinidad
(and have debug enabled) the Trinidad RenderKit (CoreRenderKit.java)
sends a nice debuging responsewriter.
So, the rendered HTML would help :-)
-M
On 8/3/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote:
Matthias,
I really don't know how to capture a PPR response, unless I dive deeply
into the involved js code (which is compacted as far as I can see).
Btw, someone on the Richfaces forum just answered that this duplicated
class issue is old, but I just installed the very last snapshot - same
result !
So there must be something else in the air, I will investigate further.
-- Renzo
Matthias Wessendorf wrote:
can you send me the returned HTML`?
(the one on the ppr )
-M
On 8/3/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote:
There isn't much more I can say. First I had a table in a Facelet
component, no problems. Then I wanted to add a suggestion box on each row.
I soon discovered that it doesn't work, even when placed alone outside the
table.
I get the reported warning at each keypress within the input field - e.g.
when Richfaces ajax PPR is triggered - not during the very first rendering.
Coding is just simple as in:
<h:inputText id="value" value="#{bean.value}"/>
<rich:suggestionbox for=""
suggestionAction="#{bean.autocomplete}" var="suggest">
<h:column>
<h:outputText value="#{suggest.text}"/>
</h:column>
</rich:suggestionbox>
according to Richfaces dev. guide. The issue about duplicated class is
something concerning Richfaces PPR response, I can't see such class from
Firebug on the resulting page. I don't even know whether this warning is
related to the missing suggestion dropdown rendering.
My application mixes up Tomahawk 1.1.5, Facelets 1.1.11, Trinidad 1.0.1,
Richfaces 3.0.2.
-- Renzo
Matthias Wessendorf wrote:
for some reasons the renderer renders two HTML class attributes, so
Trinidad renders the second as dublicate_class
so, the HTML is looking like
<element class="foo" duplicate_class="bar" ...>
can you provide a bit more infos?
like for instance, what the HTML looks like
Not familiar w/ jboss richfaces
-M
On 8/3/07, Renzo Tomaselli <[EMAIL PROTECTED]> wrote:
In the past I had quite a number of troubles getting these two systems
working together, and issues still keep on.
I tried to attach a suggestion box to a h:inputText when Trinidad is
also in the game. No way, server reports:
3-ago-2007 10.28.00
org.apache.myfaces.trinidadinternal.io.DebugResponseWriter
_checkDuplicateAttribute
WARNING: Attribute "class" output twice; writing attribute as
"duplicate_class" instead.
The involved bean method providing suggestion list is reached, however
no dropdown is appearing.
I also cross-posted the same on the Richfaces users forum.
Just wondering if anybody else got similar problems.
-- Renzo
|