[jira] Created: (MYFACES-2323) Implement <f:ajax> tag handler

View: New views
13 Messages — Rating Filter:   Alert me  

[jira] Created: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Implement <f:ajax> tag handler
------------------------------

                 Key: MYFACES-2323
                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
             Project: MyFaces Core
          Issue Type: Task
          Components: JSR-314
            Reporter: Leonardo Uribe




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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749763#action_12749763 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Added implementation of this tag, but still it is not tested because we need other parts working to see if something is missing.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757613#action_12757613 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Testing basic-ajax demo with myfaces I have found two problems:

1. Components that renders client behaviors should always render  "id" and "name" attribute.
2. if f:ajax is on a page, it should be created automatically a component that register and render jsf.js javascript with target head.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760426#action_12760426 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

I have checked the patch and it looks great, so I'll committed that one. Thanks Jakob for provide this patch.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760834#action_12760834 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Committed solution for the second part of problems found. There is still one problem with basic-ajax demo (ajax redirect does not work as expected).

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761458#action_12761458 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

There is still some pending stuff on f:ajax, related to its behavior when it has child components. Right now this one only works when it is inside components. See jsf spec 2.0 section 10.4.1.1

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773140#action_12773140 ]

Jakob Korherr commented on MYFACES-2323:
----------------------------------------

I tried to run f:ajax yesterday and I found out that the following still does not work:
2. if f:ajax is on a page, it should be created automatically a component that register and render jsf.js javascript with target head.

I tried some different versions, but the jsf.js was never included in the rendered html, however every version worked well in mojarra.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773161#action_12773161 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Maybe some changes done in the last days in UIComponent.setParent causes the problem.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch
>
>


--
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: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773409#action_12773409 ]

Dominik Dejmek edited comment on MYFACES-2323 at 11/4/09 9:41 AM:
------------------------------------------------------------------

I tried this small demo (my-basic-ajax-demo.zip, works with "mvn jetty:run") and after the second change of an inputfield a NullPointerException occurs.

and the StackTrace:
javax.servlet.ServletException
        at javax.faces.webapp.FacesServlet._handleStandardRequest(FacesServlet.java:456)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:182)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NullPointerException
        at org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreView(DefaultFaceletsStateManagementStrategy.java:174)
        at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:374)
        at org.apache.myfaces.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
        at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:925)
        at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:231)
        at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:106)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:129)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:85)
        at javax.faces.webapp.FacesServlet._handleStandardRequest(FacesServlet.java:421)

      was (Author: ddejmek):
    I tried this small demo (my-basic-ajax-demo.zip, works with "mvn jetty:run") and after the second change of an inputfield a NullPointerException occurs.
 
 

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch, my-basic-ajax-demo.zip
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773590#action_12773590 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Ok, I have committed the solution. It was a problem with server side state saving again, but now the demo run without problem.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch, my-basic-ajax-demo.zip
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774285#action_12774285 ]

Jakob Korherr commented on MYFACES-2323:
----------------------------------------

And 2. if f:ajax is on a page, it should be created automatically a component that register and render jsf.js javascript with target head. does NOT work again.

But at the moment <h:outputScript name="jsf.js" library="javax.faces" target="head"/> does not work either, so maybe it's a problem with h:outputScript.

Has anyone an idea?

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch, my-basic-ajax-demo.zip
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776625#action_12776625 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Committed fix for 2. if f:ajax is on a page, it should be created automatically a component that register and render jsf.js javascript with target head. does NOT work again.

The problem is first a bad check for a param and second we should generate an id to the h:outputScript added component, so UIViewRoot.addComponentResource could recognize it and add it to the tree.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch, fajax.patch, my-basic-ajax-demo.zip, myfaces-2323.xhtml
>
>


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


[jira] Commented: (MYFACES-2323) Implement <f:ajax> tag handler

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/MYFACES-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777148#action_12777148 ]

Leonardo Uribe commented on MYFACES-2323:
-----------------------------------------

Committed solution to solve problem nested components inside f:ajax tag. I did my own alternative from scratch based on jsf 2.0 spec section 10.4.1.1, some tests also committed and then I compared it with the other proposed solution to see if something was missing. I also solved one problem with id generation of the created h:outputScript by AjaxHandler, since we should take into account the component will be relocated to be a children of UIViewRoot.

Unfortunately, since there is no way to "attach" client behaviors from composite components inner children (there is no composite:clientBehavior tag but it should be and in fact it exists in ri, but it is silently ignored by the spec), I can't test if this part is working well but anyway one solution was proposed.

> Implement <f:ajax> tag handler
> ------------------------------
>
>                 Key: MYFACES-2323
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2323
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: clientBehaviorHolderRendersIdAndName.patch, fajax.patch, my-basic-ajax-demo.zip, myfaces-2323.xhtml
>
>


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