You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/05/05 01:42:02 UTC

[jira] Created: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Update autoscroll feature to JSF 2
----------------------------------

                 Key: TOMAHAWK-1504
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
             Project: MyFaces Tomahawk
          Issue Type: Improvement
          Components: JSF2
    Affects Versions: 1.1.9
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe




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


Re: [jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by Werner Punz <we...@gmail.com>.
+1 from me as well

Werner


Am 14.05.10 13:42, schrieb Martin Marinschek (JIRA):
>
>      [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867481#action_12867481 ]
>
> Martin Marinschek commented on TOMAHAWK-1504:
> ---------------------------------------------
>
> Hi Leonardo,
>
> cool stuff - like your suggestion.
>
> Question: t:autoScroll is a client-behaviour, and a normal tag, right? So I will just have to add it once to a page if I use Mojarra, right?
>
> nice!
>
> best regards,
>
> Martin
>
>> Update autoscroll feature to JSF 2
>> ----------------------------------
>>
>>                  Key: TOMAHAWK-1504
>>                  URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>>              Project: MyFaces Tomahawk
>>           Issue Type: Improvement
>>           Components: JSF2
>>     Affects Versions: 1.1.9
>>             Reporter: Leonardo Uribe
>>             Assignee: Leonardo Uribe
>>          Attachments: TOMAHAWK-1504-1.patch
>>
>>
>> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
>> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
>> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
>> - Since it requires render some javascript at the end of<body>  tag, it requires use DefaultAddResource or<t:documentBody>
>> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
>> First a short review about this feature. To make it work, it requires the following points:
>> - Render an<input type="hidden" name="autoScroll" />  that will contain the position on the page (x,y)
>> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
>> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
>> The idea include add the following code:
>> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
>> - Create a new component that just render the hidden field. It will be added as a component resource.
>> - Create a new component that render autoScroll script. It will be added as a component resource.
>> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
>> Now, the proposal will work in following scenarios like this:
>> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
>> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
>> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
>



[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867481#action_12867481 ] 

Martin Marinschek commented on TOMAHAWK-1504:
---------------------------------------------

Hi Leonardo,

cool stuff - like your suggestion.

Question: t:autoScroll is a client-behaviour, and a normal tag, right? So I will just have to add it once to a page if I use Mojarra, right?

nice!

best regards,

Martin

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Updated: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated TOMAHAWK-1504:
-------------------------------------

           Status: Resolved  (was: Patch Available)
    Fix Version/s: 1.1.10-SNAPSHOT
       Resolution: Fixed

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868088#action_12868088 ] 

Leonardo Uribe commented on TOMAHAWK-1504:
------------------------------------------

Hi Martin

Ok, now I understand you intention. It could be. In theory, we have to add an autoScroll client behavior on all UICommand instances that implements ClientBehaviorHolder interface. I have to think where we could put that code. In theory, we could add a view listener on PostAddToViewEvent to add it (I don't think so, because the problem about publishing conditions on PostAddToViewEvent, we don't know when we are creating the view or refreshing the build without rely on myfaces internals), or put some code on tomahawk ResourceViewHandlerWrapper.

with best regards,

Leonardo Uribe

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Reopened: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe reopened TOMAHAWK-1504:
--------------------------------------


I'll reopen this one to try to find an alternative to Martin's suggestion.

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867700#action_12867700 ] 

Leonardo Uribe commented on TOMAHAWK-1504:
------------------------------------------

I updated the name of the tag. now is t:autoScroll instead t:autoscroll, because it seems to be the original name (the hidden field has its name as "autoScroll")

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867555#action_12867555 ] 

Leonardo Uribe commented on TOMAHAWK-1504:
------------------------------------------

Hi Martin

Yes, t:autoScroll is a client behavior and for use it it is only necessary to add it once to a page per each command component you need. Example:

                <h:commandLink value="#{num}. Click me!" action="nothing">
                    <t:autoscroll/>
                </h:commandLink>

regards,

Leonardo Uribe

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867483#action_12867483 ] 

Jakob Korherr commented on TOMAHAWK-1504:
-----------------------------------------

Really great idea, Leonardo :) :)
No objections on my side!

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Updated: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated TOMAHAWK-1504:
-------------------------------------

    Status: Patch Available  (was: Open)

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Resolved: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved TOMAHAWK-1504.
--------------------------------------

    Resolution: Fixed

After multiple attemps and review some stuff in myfaces core, I added a new component called t:autoScrollPage. It attach a view listener for PostAddToViewEvents and a component listener to viewRoot, to make the view listener be restored each time. I think this is the cleanest solution for this issue.

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868070#action_12868070 ] 

Martin Marinschek commented on TOMAHAWK-1504:
---------------------------------------------

Hi Leonardo,

ok, well - with my comment I meant if it wouldn´t be practical to (instead of having one tag per component) have one component per page which enables this behaviour for all command components? Just like we do it in the view-handler of MyFaces? Does that sound reasonable?

best regards,

Martin

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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


[jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867247#action_12867247 ] 

Leonardo Uribe commented on TOMAHAWK-1504:
------------------------------------------

If no objections I'll commit the attached patch soon.

> Update autoscroll feature to JSF 2
> ----------------------------------
>
>                 Key: TOMAHAWK-1504
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1504
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: JSF2
>    Affects Versions: 1.1.9
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: TOMAHAWK-1504-1.patch
>
>
> In jsf 1.1. and 1.2, autoscroll behavior had the following problems:
> - It is myfaces specific feature, because requires add some code on renderers. In ri it will not work
> - It only works for h:commandXXX and t:commandXXX components, so if you use trinidad (override h:commandXXX renderers) it will not work.
> - Since it requires render some javascript at the end of <body> tag, it requires use DefaultAddResource or <t:documentBody>
> With jsf 2.0 we have the chance to get rid all this problems and make this feature work with other libraries.
> First a short review about this feature. To make it work, it requires the following points:
> - Render an <input type="hidden" name="autoScroll" /> that will contain the position on the page (x,y)
> - Render a function called getScrolling() ant the end of the page that calculate the value and optionally render the command that scroll.
> - Render the script on each link to call getScrolling() function and assign its value to the hidden field (using oamSetHiddenInput).
> The idea include add the following code:
> - Create a new client behavior tag called t:autoscroll that adds the script required on each "command" component.
> - Create a new component that just render the hidden field. It will be added as a component resource.
> - Create a new component that render autoScroll script. It will be added as a component resource.
> - Add some code on ResourceViewHandler, to add the two previous components to the component tree as transient each time the view is rendered, but only if org.apache.myfaces.AUTO_SCROLL web param is true or t:autoscroll is used on the current page.
> Now, the proposal will work in following scenarios like this:
> - org.apache.myfaces.AUTO_SCROLL is enabled, myfaces core is used, so all h:commandXXX and t:commandXXX works like in jsf 1.1 and jsf 1.2.
> - org.apache.myfaces.AUTO_SCROLL is disabled and myfaces core is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.
> - RI (Mojarra) is used, hidden field and script will be added only if t:autoscroll is used. By default, h:commandXXX and t:commandXXX will not have autoscroll script, so t:autoscroll is required to add this script.

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