You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org> on 2010/09/23 23:50:33 UTC

[jira] Created: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

In Facelets, Partial Refreshing <tr:inputText> Not Working
----------------------------------------------------------

                 Key: TRINIDAD-1922
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 2.0.0.3-core
         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:tr="http://myfaces.apache.org/trinidad"
                xmlns:trd="http://myfaces.apache.org/trinidad/demo"
                xmlns:trh="http://myfaces.apache.org/trinidad/html">
    <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" columns="6"/>
            </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Pavitra Subramaniam (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919095#action_12919095 ] 

Pavitra Subramaniam commented on TRINIDAD-1922:
-----------------------------------------------

Unfortunately using JS code to lookup DOM nodes is not guaranteed to work and in fact is not recommended. The best solution to address this issue at this point is to set the clientId (and name) in the root element.

> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917038#action_12917038 ] 

Mamallan Uthaman commented on TRINIDAD-1922:
--------------------------------------------

@Cedric: Sorry, your patch didn't fix this issue.
After a few more testing, I found this problem is Mojarra specific as with Myfaces I cound't repro this problem. We need to investigate if we miss any parameter before calling Mojarra's Ajax apis or it is simply a bug in Mojarra.


> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Pavitra Subramaniam (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918344#action_12918344 ] 

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" summary="">
    <tr>
      <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>
    </tr>
    <tr>
      <td></td>
      <td class="AFComponentMessageCell"><span id="foo::msg" style="display:none;"></span></td>
    </tr>
  </table>]]>
</update>

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: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918148#action_12918148 ] 

Mamallan Uthaman commented on TRINIDAD-1922:
--------------------------------------------

@Pavithra: Not sure we are both referring the same issue. With my test-case, I can see view param is sent to the client, and I do get a PPR response with correct values. But the issue I believe is in Mojarra's Ajax apis which couldn't handle PPR response from Trinidad. If I partial refresh <tr:outputText> instead of <tr:inputText>, everything works fine.

> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


Re: [jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by ma...@oracle.com.
Hi Cedric,
I'm on vacation now. Will check your patch once I'm back on 09/28.

Thanks
Mamallan

On 9/24/2010 12:32 AM, Cedric Durmont (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914371#action_12914371 ] 
>
> Cedric Durmont commented on TRINIDAD-1922:
> ------------------------------------------
>
> Please check my patch on TRINIDAD-1870. With my modified Trinidad version, I can run your test case flawlessly.
> Not sure my solution is the "good" way to go, though.
>
>
>
>   
>> In Facelets, Partial Refreshing <tr:inputText> Not Working
>> ----------------------------------------------------------
>>
>>                 Key: TRINIDAD-1922
>>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>>             Project: MyFaces Trinidad
>>          Issue Type: Bug
>>          Components: Components
>>    Affects Versions: 2.0.0.3-core
>>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>>                 xmlns:f="http://java.sun.com/jsf/core"
>>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>>     <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" columns="6"/>
>>             </tr:panelHorizontalLayout>
>>         </tr:form>
>>     </tr:document>
>> </ui:composition>
>>     
>
>   

Re: [jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by wo...@pta.de.
Hi,

Regarding 1.2.13 we noticed failure problems with inputText when using its 
partialTriggers attribute i.e. the refresh is not working.

So I was wondering whether this problem in 2.x is somehow inherited from 
the recent 1.2.x line?

Any ideas?

Thanks,
Wolfgang.

PTA Programmier-Technische Arbeiten GmbH
Seckenheimer Str. 65-67, 68165 Mannheim
Amtsgericht Mannheim, HRB 1139
USt-IdNr.: DE 143 839 368
Geschaeftsfuehrer:
Dipl.-Ing. Peter Fischer
Dr. Harald W. Busch
Dipl.-Kfm. Knut Fischer

[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Cedric Durmont (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914371#action_12914371 ] 

Cedric Durmont commented on TRINIDAD-1922:
------------------------------------------

Please check my patch on TRINIDAD-1870. With my modified Trinidad version, I can run your test case flawlessly.
Not sure my solution is the "good" way to go, though.



> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Issue Comment Edited: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Pavitra Subramaniam (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918344#action_12918344 ] 

Pavitra Subramaniam edited comment on TRINIDAD-1922 at 10/5/10 8:22 PM:
------------------------------------------------------------------------

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" summary="">
    <tr>
      <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>
    </tr>
    <tr>
      <td></td>
      <td class="AFComponentMessageCell"><span id="foo::msg" style="display:none;"></span></td>
    </tr>
  </table>]]>
</update>

Investigating a fix...

      was (Author: pasubra):
    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" summary="">
    <tr>
      <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>
    </tr>
    <tr>
      <td></td>
      <td class="AFComponentMessageCell"><span id="foo::msg" style="display:none;"></span></td>
    </tr>
  </table>]]>
</update>

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: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Pavitra Subramaniam (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917818#action_12917818 ] 

Pavitra Subramaniam commented on TRINIDAD-1922:
-----------------------------------------------

With the above testcase I observe the following behavior:

1. When initially refreshing the page (a GET request), the "javax.faces.ViewState" param never gets sent to the client. 
2. Now when the user clicks on the partialSubmit button (cb1), the server does not recognize this as a postback because of the absence of the ViewState param. So server jumps to render response without executing the fill lifecycle. This time around the response contains the ViewState
3. Any subsequent partial request will be treated as a postback and the inputText gets partially refreshed. 

Investigating a fix.

> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918310#action_12918310 ] 

Mamallan Uthaman commented on TRINIDAD-1922:
--------------------------------------------

On further investigation, I narrowed down the problem to the PPR response. In my failure case, update element's id in PRR response doesn't match the actual element to be partial refreshed. Example, observe update element's id and table's id in CDATA

<partial-response>
  <changes>
    <update id="inputid">
      <!  [CDATA[   <table id="inputid__xc_" class="x1u" cellpadding="0" cellspacing="0"
                   border="0" summary="">
            ....
</partial-response>



> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.


[jira] Commented: (TRINIDAD-1922) In Facelets, Partial Refreshing Not Working

Posted by "Mamallan Uthaman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918366#action_12918366 ] 

Mamallan Uthaman commented on TRINIDAD-1922:
--------------------------------------------

Since developers might use a component's id in JavaScript code like setting focus on an inputText, our solution should not manipulate a component's id during rendering. One workaround is to simply change the update element's id to the root element's id in a PPR response. Example, for the above sample, we can render <update id="foo__xc_"> instead of  <update id="foo">.

> In Facelets, Partial Refreshing <tr:inputText> Not Working
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-1922
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1922
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:tr="http://myfaces.apache.org/trinidad"
>                 xmlns:trd="http://myfaces.apache.org/trinidad/demo"
>                 xmlns:trh="http://myfaces.apache.org/trinidad/html">
>     <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" columns="6"/>
>             </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.