myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavitra Subramaniam (JIRA)" <>
Subject [jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing <tr:inputText> Not Working
Date Wed, 06 Oct 2010 00:12:34 GMT


Pavitra Subramaniam commented on TRINIDAD-1922:

Ok, I was able to reproduce the issue Mamallan encountered when creating a standalone testcase.
The problem is not with Mojarra's partial response processing code, rather it's a problem
with the renderer implementation of LabelAndMessageRenderer!!

The problem is that when building a partial response for an inputText with id "foo", the above
renderer, under certain conditions determines that the <input> HTML needs to be within
a <table> and so renders HTML with <table> as the root element with an id "foo_xc"

This is the reason why partial update fails when using JSF Ajax. This renderer code appears
to have been implemented this way for legacy reasons (from the UIX days). With JSF 2 and especially
when using JSF 2 Ajax style requests, we always expect the root DOM element to have the same
id as the component for which it's generated. Currently the PPR response for 

<tr:inputText id="foo" />

in jsf 2 ajax becomes

<update id="foo"><![CDATA[
  <table id="foo__xc_" class="af_inputText" cellpadding="0" cellspacing="0" border="0"
      <td class="af_inputText_label" nowrap><span id="foo::icon" style="display:none;"><a
name="_msgAnc_foo" title="Error" class="AFErrorIconStyle">X</a></span></td>
      <td valign="top" nowrap class="AFContentCell">
        <input id="foo" name="foo" class="af_inputText_content" size="30" type="text" value="Success"></td>
      <td class="AFComponentMessageCell"><span id="foo::msg" style="display:none;"></span></td>

Working on fixing the renderers to render their root element with the right id.

> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>                 Key: TRINIDAD-1922
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions:
>         Environment: Any browser
>            Reporter: Mamallan Uthaman
> Trinidad currently has an issue partial refreshing an <tr:inputText>. This problem
is specific to facelets where we use JSF Ajax apis. I tested with the latest code from our
trunk, and below is my  test page:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
> <ui:composition xmlns:ui=""
>                 xmlns:f=""
>                 xmlns:tr=""
>                 xmlns:trd=""
>                 xmlns:trh="">
>     <tr:document id="d1" title="Client Behavior Support">
>         <tr:form id="f1">
>             <tr:panelHeader text="Ajax Issue"/>
>             <tr:panelHorizontalLayout>
>                 <tr:commandLink text="Press" id="cb1" partialSubmit="true">
>                     <tr:setActionListener from="Success" to="#{sessionScope.status}"/>
>                 </tr:commandLink>
>                 <tr:inputText value="#{sessionScope.status}"  partialTriggers="cb1"
>             </tr:panelHorizontalLayout>
>         </tr:form>
>     </tr:document>
> </ui:composition>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message