[richfaces-issues] [JBoss JIRA] (RF-13063) RichFacesInputNumberSlider setValueByDragging

Juraj Húska (JIRA) jira-events at lists.jboss.org
Fri Dec 6 10:52:06 EST 2013


    [ https://issues.jboss.org/browse/RF-13063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929226#comment-12929226 ] 

Juraj Húska commented on RF-13063:
----------------------------------

Verified also in 5.0.0.Alpha2.

Just a note: in 5.Alpha2 you can access the method as: {{mySlider.advanced().dragHandleToPointInTrace(55)}}, or just use {{mySlider.slideToValue(double)}}.

Closing.
                
> RichFacesInputNumberSlider setValueByDragging
> ---------------------------------------------
>
>                 Key: RF-13063
>                 URL: https://issues.jboss.org/browse/RF-13063
>             Project: RichFaces
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: qe
>    Affects Versions: 4.3.2
>            Reporter: Bernard Labno
>            Assignee: Jiří Štefek
>            Priority: Minor
>             Fix For: 4.3.4, 5.0.0.Alpha2
>
>
> In richfaces-qa/page-fragments there is RichFacesInputNumberSlider fragment. It would be great to be able to test setting value as percentage of width implemented as dragging the handle.
> One can do it like that:
> {code}
> ((JavascriptExecutor) GrapheneContext.getProxy()).executeScript("arguments[0].scrollIntoView(true);", weightSlider.getNumberSlider().getRoot());
>         waitGui();
>         final int width = weightSlider.getNumberSlider().getWidth();
>         final int where = (int) (width * percentage);
>         final WebElement handle = weightSlider.getNumberSlider().getHandleElement();
>         final Action action = new Actions(GrapheneContext.getProxy()).clickAndHold(handle)
>             .moveToElement(weightSlider.getNumberSlider().getRoot(), where, 0)
>             .release(handle)
>             .build();
> {code}
> It is very important to bring component into view before dragging.
> If you do not do that and component is very far to the right (you need to scroll to the right to see it) then calculations are wrong.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list