0 Replies Latest reply on Nov 4, 2012 10:34 PM by tunghuynh

    Assigning a hotkey that mimicks link click

    tunghuynh Newbie

      I have an idea which I would like to know if it's possible to achieve using JSF 2.0 and Richfaces 4.

       

      I want to create a hotkey that is mimicks the action of clicking on a link.

       

      The code below hopefully illustrates this idea, it's not a working piece of code.

       

      <rich:dataTable>

          

                <rich:column>

                                              <f:facet name="header">

                                                        <h:outputText value="CNI No." />

                                              </f:facet>

                                              <a4j:commandLink  id='link-#{iterator.index+1}' oncomplete="#{rich:component('popup')}.show()" execute="@this"/>

                         <rich:hotkey onmousedown="${link-#{iterator.index+1}.click()"  />

                          </rich:column>

      <rich:dataTable>

       

      I can't seem to get it to work. Any suggestions?

       

      thanks,