myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cedric Durmont (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-1870) tr:commandLink blocks tr:panelAccordion
Date Tue, 14 Sep 2010 08:53:34 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909151#action_12909151
] 

Cedric Durmont commented on TRINIDAD-1870:
------------------------------------------

Still having the bug with beta1.
However I think I ran into something interesting with Firebug :

=== 1st trace, without commandlink (working) ===
POST :
Tr-PPR-Message	true
_noJavaScript	false
event	show
javax.faces.ViewState	!-rw4e3s12f
javax.faces.partial.ajax	true
javax.faces.partial.execu...	j_id2114509110_7e08d943
javax.faces.source	j_id2114509110_7e08d943
org.apache.myfaces.trinid...	j_id2114509110_7e08d96d
partial	true
source	j_id2114509110_7e08d943
targetItem	j_id2114509110_7e08d99f

=== 2nd trace, with a commandlink (does not work) ===
Tr-PPR-Message	true
_noJavaScript	false
event	show
javax.faces.ViewState	!-rw4e3s12e
javax.faces.partial.ajax	true
javax.faces.partial.execu...	j_id2114509110_7e08d9b4
javax.faces.source	j_id2114509110_7e08d9b4
org.apache.myfaces.trinid...	j_id2114509110_7e08d96d
partial	true
source	
source	j_id2114509110_7e08d9b4
targetItem	j_id2114509110_7e08d980


=> "source" field is sent 2 times, the first one being empty ! I could explain why the
response in the first case contains only postScript JS, and no HTML update to the panelAccordion
(or PanelTabbed, does the same)

If I compare the generated HTML, the non-working page has the following lines added :
[...]
<a onclick="submitForm('j_id2114509110_7e08d96d',1,{source:'j_id2114509110_7e08d943'});return
false;" class="OraLink" href="#"></a> <!-- ok, this one's the commandlink, looks
good-->
[...]
<input type="hidden" name="source"> <!-- now, that's interesting -->
 <script type="text/javascript">TrPage.getInstance()._addResetFields('j_id2114509110_7e08d96d',["source"]);</script>


1st case : no input field named "source", but one seems to be added on the fly on form submit,
with the correct value. Works as expected.
2nd case : one "source" input field, but another one is still added on form submit. My guess
is that the generated one is still correct, but the explicit one is ignored, thus never set
with the correct value. That would explain the 2 "source" in the POST.

I'm not familiar enough with Trinidad internals to investigate further. I hope this may lead
to the bug.
Regards,
Cedric

> tr:commandLink blocks tr:panelAccordion
> ---------------------------------------
>
>                 Key: TRINIDAD-1870
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1870
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 2.0.0.3-core
>         Environment: MyFaces 2.0.1, Jetty 6.1.8, jdk 1.6.0_20, win 7
>            Reporter: Cedric Durmont
>
> I'm cleaning bugs in my app after my switch to Trinidad2, and I found
> 2 problems that seems not to be on my side :
> 1. I'm unable to change of tab in a panelTabbed with a click (works
> programmatically using "disclosed" attribute)
> 2. Consider this sample.xhtml :
> <?xml version="1.0" encoding="windows-1252" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>        xmlns:f="http://java.sun.com/jsf/core"
>        xmlns:tr="http://myfaces.apache.org/trinidad"
>        xmlns:t="http://myfaces.apache.org/tomahawk"
>        xmlns:trh="http://myfaces.apache.org/trinidad/html"
>        xmlns:c="http://java.sun.com/jsp/jstl/core"
>        xmlns:ui="http://java.sun.com/jsf/facelets">
> <trh:head>
>        <title>Some title</title>
>        <tr:importScript></tr:importScript>
> </trh:head>
> <trh:body>
> <tr:form>
> <tr:commandLink/>
>        <tr:panelAccordion>
>        <tr:showDetailItem text="foo">foo</tr:showDetailItem>
>        <tr:showDetailItem text="bar">bar</tr:showDetailItem>
> </tr:panelAccordion>
> </tr:form>
> </trh:body>
> </html>
> In this case, the panelAccordion does not work (details are not
> disclosed when you click on it). Remove the commandLink, it works
> again. Replace the commandLink by a commandButton, it works too.
> Setting attributes on the commandLink does not change the situation.

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


Mime
View raw message