Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 91537 invoked from network); 14 May 2010 22:13:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 May 2010 22:13:04 -0000 Received: (qmail 38887 invoked by uid 500); 14 May 2010 22:13:03 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 38817 invoked by uid 500); 14 May 2010 22:13:03 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 38810 invoked by uid 99); 14 May 2010 22:13:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 22:13:03 +0000 X-ASF-Spam-Status: No, hits=-1572.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 22:13:02 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4EMCgwQ029606 for ; Fri, 14 May 2010 22:12:42 GMT Message-ID: <24555957.55301273875162459.JavaMail.jira@thor> Date: Fri, 14 May 2010 18:12:42 -0400 (EDT) From: "Leonardo Uribe (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Commented: (TOMAHAWK-1504) Update autoscroll feature to JSF 2 In-Reply-To: <6402744.6401273016522881.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 tag, it requires use DefaultAddResource or > 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 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.