Announcement Announcement Module
No announcement yet.
Spring Faces - sf:commandLink refresh issue Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Faces - sf:commandLink refresh issue

    Has anyone else seen this?

    If you refresh the page a <sf:commandLink/> component is rendered as a <h:commandButton/> component.

  • #2
    One of the features of the <sf:commandLink> is that its initial rendered output is a button that then gets progressively turned into a link through JavaScript. This is done so that the component will degrade gracefully (i.e., you will still be able to submit the form) in a less capable browser or if JavaScript is in any other way unavailable. (Turn off JavaScript while going through the sample app and note that everything still works without changing anything.)

    That said, the same enhancement should be applied on a refresh. Is the enhancement not executing correctly, or is it just that you are actually seeing it happen?


    • #3
      Hi Jeremy,

      On page load, the javascript is styling the button as a link as expected.

      On refresh this styling is lost, a button is displayed and on click the feature which worked as a link is now broken.

      Can we turn this degrade feature off and always rendered as a link? We have a custom jsf tree table and do not want links to be converted into buttons based on browser settings because we can control that.

      This happens in FF and IE6 (not tested 7).

      Also there are numerous pages errors after the refresh.
      Last edited by jamesclinton; May 12th, 2008, 09:10 AM.


      • #4

        There is no switch for the progressive rendering at the moment, but I will consider adding one.

        At the same time though, it would be nice to figure out why it is not working for you on a refresh. Is this always the case, or is it only on certain pages where the link is used in a certain way (i.e., nested inside your custom tree table)? Can you reproduce it in the sample app? If you are getting JavaScript errors on the refresh, it would be helpful to know what they are (any errors output from FireFox's Error Console would be good), as I'm sure this is what would be causing the enhancement to fail.


        • #5
          The rendering:

          1. Fails immediately outside of a dataTable (so without refresh) everytime.

          2. On the same page (in the same form) but within a dataTable it works everytime, but renders as a button on refresh (everytime) and also renders as a button if I use the back-button and when the page is re-entered from a flow transition (everytime).

          Same in FF and IE.

          This us a real show stopper for us, so if you were able to add this degrade switch we'd really appreciate it.
          Last edited by jamesclinton; May 12th, 2008, 09:33 AM.


          • #6

            I am willing to add the switch, but I would still like to determine why it is failing in the first place.

            If you could give me the JavaScript errors you are seeing, or even reproduce the problem in the booking sample, that would be most helpful.


            • #7
              Do you know if a switch was ever added for this?

              I experience a similar issue, however on refresh the buttons do eventually render back to the links but this is sometimes slow and the page jumps all over the place while its busy thinking about it.

              Could I override the progressiveLink css to stop this perhaps?

              (Using FF 3.5.8 on Ubuntu)


              • #8
                'Flashing buttons'

                No progress on this then ? I reported this a while ago as well since it flashing buttons on the render cycle for command links is not a good look ?
                Wonder if Springsource plan to deprecate Spring Faces ? (with the current Grails vs Roo push) ?