8 Replies Latest reply on Mar 5, 2009 12:11 PM by sailing8u

    Keyboard shortcuts

    sztank

      Hello,

      Is it possible to assign a keyboard shortcuts to some RichFaces components?
      (this is one of the requirements of my client - I can't find anything about it in RichFaces docs).

        • 1. Re: Keyboard shortcuts

          there is no such feature out-of-the-box yet.
          Could you specify what kind of requirement from client you have. Is this about taking control without mouse or fact access to particular components, such as menu?

          • 2. Re: Keyboard shortcuts
            sztank

            Hi,
            Its about fast access to particular components, the most important is:
            toolBar Items,
            switching between tabs in the TabPanel.

            Is adding such functionality an easy or rather hard taks?

            • 3. Re: Keyboard shortcuts
              mrohad

              Srgey ,
              my clients would love to go up and down in the table rows using the arrow keys...

              • 4. Re: Keyboard shortcuts

                rich:scrollableDataTable has this feature.

                rich:dataTable has no "selected row" feature out-of-the-box . So, we cannot speak about navigation while we have no starting point.

                I know some people implement the selection on the level of their application and do the navigation there also.

                • 5. Re: Keyboard shortcuts

                  Hey Sergey,

                  I also have the requirement to navigate through the table with the arrow keys and then select the row by using the enter key. Is there any out of the box support in Richfaces right now? If not can you give advice how to custom build that feature?

                  Thanks in advance.

                  Cheers

                  • 6. Re: Keyboard shortcuts
                    pa_pete

                    I agree that a keyboard shortcut to switch between the tabs of rich:tabpanel would be a great feature!

                    Until then does anyone have a solution for a client side implementation of this? I can do it by setting the selectedTab attribute and reRendering but this is very laggy compared to the moust click of changing a tab. Is there a way to call what the moust click calls from JS or something like that?

                    Thanks

                    • 7. Re: Keyboard shortcuts
                      sailing8u

                      Modify TabHeaderRendererBase.java - method writeLabel(FacesContext..)

                      Comment below line
                      //writer.writeText(label,null);
                      Add this line
                      writer.write(" " + label+" ");

                      This worked for me!

                      Sai

                      • 8. Re: Keyboard shortcuts
                        sailing8u

                        Modify TabHeaderRendererBase.java - method writeLabel(FacesContext..)

                        Comment below line
                        //writer.writeText(label,null);

                        Add this line
                        writer.write("a href='#' style='text-decoration:none; color: black; display:block; font-weight: normal' onclick='return false;'> + label+ "/a");

                        Please note, replace first character "a" with proper anchor tag similarly close the anchor tag properly.

                        Thanks!
                        Sai