[JBoss JIRA] (RF-13392) TreeSelectionChangeEvent always triggered during Apply Request Phase
by Andreas Hahne (JIRA)
[ https://issues.jboss.org/browse/RF-13392?page=com.atlassian.jira.plugin.s... ]
Andreas Hahne updated RF-13392:
-------------------------------
Attachment: tree.zip
Attached a simple Maven project demonstrating the effect.
> TreeSelectionChangeEvent always triggered during Apply Request Phase
> --------------------------------------------------------------------
>
> Key: RF-13392
> URL: https://issues.jboss.org/browse/RF-13392
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tree
> Affects Versions: 4.3.3
> Reporter: Andreas Hahne
> Labels: richfaces, selectionChangeListener, tree
> Attachments: tree.zip
>
>
> When selecting a {{rich:treeNode}}, the corresponding {{selectionChangeListener}} is triggered during Apply Request Phase, no matter if the immediate attribute is set to true or false.
> This leads to a weird behaviour in our application where an output panel is filled with the data selected in the tree. Both components are located in the same {{h:form}} element (in contrast to the showcase on the RF homepage). While the value of the {{h:outputText}} component is updated correctly, the one in the {{h:inputText}} is not because it is overwritten by the old value during Update Model Phase. If the change was processed during Invoke Application Phase this would not occur most likely.
--
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
11 years
[JBoss JIRA] (RF-13251) FocusManager to support complex components like rich:autocomplete
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13251?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13251:
---------------------------------
Immo, could you please give it one more try and see whether {{focusManager.focus("autocomplete")}} works or not?
> FocusManager to support complex components like rich:autocomplete
> -----------------------------------------------------------------
>
> Key: RF-13251
> URL: https://issues.jboss.org/browse/RF-13251
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-misc
> Affects Versions: 4.3.4
> Reporter: Immo Benjes
> Assignee: Lukáš Fryč
> Priority: Minor
> Labels: waiting_on_user
>
> Currently the FocusManager in Richfaces only works on 'simple' UI components like h:inputText or h:selectOneMenu but not on more complex components like rich:autocomplete.
> It would be good if FocusManager could support complex components or 'real' Ids as generated for that page.
> The use case for the support on autocomplete is like this:
> User has to enter multiple 'entities'. A rich:autocomplete is used to select the entity and add it to a list. After each ajax submit the focus gets lost and the user has to manually set the focus back to the autocomplete input field.
--
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
11 years
[JBoss JIRA] (RF-13251) FocusManager to support complex components like rich:autocomplete
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13251?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13251 at 11/28/13 5:18 AM:
-----------------------------------------------------------
Hey Immo,
you shouldn't try to put focus on input itself, but rather use the component. Focus component itself will determine what to focus inside the target component.
Here is the alghoritm:
1. determine {{focusCandidates}} (that's what FocusManager, focus preserve or others do)
2. look for {{:tabbable}} elements under candidates
3. select first {{:tabbable}} candidate element
If we have similar DOM:
{code}
<div id="autocomplete">
<input id="autocompleteInput" />
</div>
{code}
you have focus candidate {{autocomplete}} (known on server as a client ID) (step 1),
and you build list of actual candidate elements as {{[ 'autocompleteInput' ]}} (step 2),
and use the first of them: {{autocompleteInput}} (step 3).
See the implementation here:
https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
----
In other words, use 'autocomplete' as a focus ID.
You can access RichFaces client-side log to see what's happening.
was (Author: lfryc):
Hey Immo,
you shouldn't try to put focus on input itself, but rather use the component. Focus component itself will determine what to focus inside the component.
Here is the alghoritm:
1. determine {{focusCandidates}} (that's what FocusManager, focus preserve or others do)
2. look for {{:tabbable}} elements under candidates
3. select first {{:tabbable}} candidate element
If we have similar DOM:
{code}
<div id="autocomplete">
<input id="autocompleteInput" />
</div>
{code}
you have focus candidate {{autocomplete}} (known on server as a client ID) (step 1),
and you build list of actual candidate elements as {{[ 'autocompleteInput' ]}} (step 2),
and use the first of them: {{autocompleteInput}} (step 3).
See the implementation here:
https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
----
In other words, use 'autocomplete' as a focus ID.
You can access RichFaces client-side log to see what's happening.
> FocusManager to support complex components like rich:autocomplete
> -----------------------------------------------------------------
>
> Key: RF-13251
> URL: https://issues.jboss.org/browse/RF-13251
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-misc
> Affects Versions: 4.3.4
> Reporter: Immo Benjes
> Assignee: Lukáš Fryč
> Priority: Minor
> Labels: waiting_on_user
>
> Currently the FocusManager in Richfaces only works on 'simple' UI components like h:inputText or h:selectOneMenu but not on more complex components like rich:autocomplete.
> It would be good if FocusManager could support complex components or 'real' Ids as generated for that page.
> The use case for the support on autocomplete is like this:
> User has to enter multiple 'entities'. A rich:autocomplete is used to select the entity and add it to a list. After each ajax submit the focus gets lost and the user has to manually set the focus back to the autocomplete input field.
--
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
11 years
[JBoss JIRA] (RF-13251) FocusManager to support complex components like rich:autocomplete
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13251?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13251:
---------------------------------
Hey Immo,
you shouldn't try to put focus on input itself, but rather use the component. Focus component itself will determine what to focus inside the component.
Here is the alghoritm:
1. determine {{focusCandidates}} (that's what FocusManager, focus preserve or others do)
2. look for {{:tabbable}} elements under candidates
3. select first {{:tabbable}} candidate element
If we have similar DOM:
{code}
<div id="autocomplete">
<input id="autocompleteInput" />
</div>
{code}
you have focus candidate {{autocomplete}} (known on server as a client ID) (step 1),
and you build list of actual candidate elements as {{[ 'autocompleteInput' ]}} (step 2),
and use the first of them: {{autocompleteInput}} (step 3).
See the implementation here:
https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
----
In other words, use 'autocomplete' as a focus ID.
You can access RichFaces client-side log to see what's happening.
> FocusManager to support complex components like rich:autocomplete
> -----------------------------------------------------------------
>
> Key: RF-13251
> URL: https://issues.jboss.org/browse/RF-13251
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-misc
> Affects Versions: 4.3.4
> Reporter: Immo Benjes
> Assignee: Lukáš Fryč
> Priority: Minor
> Labels: waiting_on_user
>
> Currently the FocusManager in Richfaces only works on 'simple' UI components like h:inputText or h:selectOneMenu but not on more complex components like rich:autocomplete.
> It would be good if FocusManager could support complex components or 'real' Ids as generated for that page.
> The use case for the support on autocomplete is like this:
> User has to enter multiple 'entities'. A rich:autocomplete is used to select the entity and add it to a list. After each ajax submit the focus gets lost and the user has to manually set the focus back to the autocomplete input field.
--
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
11 years
[JBoss JIRA] (RF-13251) FocusManager to support complex components like rich:autocomplete
by Immo Benjes (JIRA)
[ https://issues.jboss.org/browse/RF-13251?page=com.atlassian.jira.plugin.s... ]
Immo Benjes commented on RF-13251:
----------------------------------
Hi Lukáš,
If you have a autocomplete component with the id="autocomplete" the actual generated code does not have an input field with the id="autocomplete". It has some subIds. The preserve focus might work but if you want to assign the focus with the focusManager it does not work. I have tried using focusManager.focus("autocomplete") (does not work) and focusManager.focus("autocomplete_input") (or similar can't remember the subID the actual input field has) but this doesn't work either.
> FocusManager to support complex components like rich:autocomplete
> -----------------------------------------------------------------
>
> Key: RF-13251
> URL: https://issues.jboss.org/browse/RF-13251
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-misc
> Affects Versions: 4.3.4
> Reporter: Immo Benjes
> Assignee: Lukáš Fryč
> Priority: Minor
> Labels: waiting_on_user
>
> Currently the FocusManager in Richfaces only works on 'simple' UI components like h:inputText or h:selectOneMenu but not on more complex components like rich:autocomplete.
> It would be good if FocusManager could support complex components or 'real' Ids as generated for that page.
> The use case for the support on autocomplete is like this:
> User has to enter multiple 'entities'. A rich:autocomplete is used to select the entity and add it to a list. After each ajax submit the focus gets lost and the user has to manually set the focus back to the autocomplete input field.
--
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
11 years