Tapestry
  1. Tapestry
  2. TAPESTRY-400

LinkSubmit and Rollover should be able to play together.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0, 3.0.5
    • Fix Version/s: 4.1.3
    • Component/s: Framework
    • Labels:
      None

      Description

      Rollover works with ILinkComponents like DirectLink to provide, well, rollover image functionality.

      In the project I'm working there is a requirement to use LinkSubmit with rollover images. But, Rollover expects an ILinkComponent and LinkSubmit is a IFormComponent and not an ILinkComponent.

      I have a kludge to make this work but it is suboptimal and not sure if the powers that be here will allow me to share. The kludge is to create my own LinkSubmit with a modified copy of Tapestry's LinkSubmit source. The modification entails making LinkSubmit also implement ILinkComponent. Anyways, there is probably a better way to do it .

      Not sure when I can come back and resolve it so I'm adding this issue to prevent it being forgotten.

        Activity

        Hide
        Nick Westgate added a comment -

        I decided to implement this recently, too, and will release it soon in a new version of LinkSubmitOrSpan on Tassel.

        Tapestry's runtime enhancement of abstract methods makes it difficult to mix this functionality by composition. Since implementing IFormComponent is simpler than implementing ILinkComponent, I created a new AbstractFormLinkComponent class derived from AbstractLinkComponent, copying and pasting the few simple methods necessary. This meant just a few small changes were required to LinkSubmit.

        This is still ugly, but works. It would be great if the component framework divided up the internal component rendering process in a way that made rolling new components easier. I plan to look into that soon, though my java experience is limited (1 year, vs 8+ years of C++).

        Show
        Nick Westgate added a comment - I decided to implement this recently, too, and will release it soon in a new version of LinkSubmitOrSpan on Tassel. Tapestry's runtime enhancement of abstract methods makes it difficult to mix this functionality by composition. Since implementing IFormComponent is simpler than implementing ILinkComponent, I created a new AbstractFormLinkComponent class derived from AbstractLinkComponent, copying and pasting the few simple methods necessary. This meant just a few small changes were required to LinkSubmit. This is still ugly, but works. It would be great if the component framework divided up the internal component rendering process in a way that made rolling new components easier. I plan to look into that soon, though my java experience is limited (1 year, vs 8+ years of C++).
        Hide
        Henri Dupre added a comment -

        I have a bunch of ugly components for opening popups at the same time than you click on a LinkSubmit or DirectLink.
        This is really ugly because it requires to "copy" the whole code and make some additions.
        However I have no idea how to solve it nicely now. The links should provide in the future an interface for adding functionality.

        Show
        Henri Dupre added a comment - I have a bunch of ugly components for opening popups at the same time than you click on a LinkSubmit or DirectLink. This is really ugly because it requires to "copy" the whole code and make some additions. However I have no idea how to solve it nicely now. The links should provide in the future an interface for adding functionality.
        Hide
        Nick Westgate added a comment -

        Ok, the version of LinkSubmitOrSpan which can wrap Rollover is on Tassel:
        http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SLinkSubmitOrSpan

        If anyone interested enough cares to eyeball it, I'd appreciate any feedback.

        Now I understand the renderer for ILinkComponent classes, it seems that one could have been written
        for LinkSubmit (and another to cater for Henri's needs as above). It's hard to see why that wasn't done
        without going through the process of writing one myself, so I'll try to get around to it sometime.

        Show
        Nick Westgate added a comment - Ok, the version of LinkSubmitOrSpan which can wrap Rollover is on Tassel: http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SLinkSubmitOrSpan If anyone interested enough cares to eyeball it, I'd appreciate any feedback. Now I understand the renderer for ILinkComponent classes, it seems that one could have been written for LinkSubmit (and another to cater for Henri's needs as above). It's hard to see why that wasn't done without going through the process of writing one myself, so I'll try to get around to it sometime.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Geoff Longman
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development