Announcement Announcement Module
Collapse
No announcement yet.
Use anchor tags with a view-state Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use anchor tags with a view-state

    Hi all,

    I'm working on a SWF application at the moment.

    The main view-state is quite a long page, containing about 30 different subsections, each of which has a html anchor tag marking its position on the page.

    Each subsection then has an add/edit button that lets you add/edit the information in that subsection. Clicking this button causes a transition to another view-state, where the user can actually change the data. The editing needs to take place on another page, since the volume of data that can be entered for each subsection is massive, and I don't want it to appear on the main view-state as it may not always be relevant for the user.

    When they are finished editing the data, they click a finish button, returning them to the main view-state.

    However - if the user is editing the data for a subsection that is half way down my main-view state, I want to be able to return them to this point, using the anchor, rather than just to the very top of the main view-state page, as they will then have to scroll half way down the page to get back to where they were.

    Is anyone aware of any way to do this?

    Any help would be much appreciated!

    Cheers!

    Eoin

  • #2
    A good suggestion for a new feature. :-)

    Can you please create a new feature request in our JIRA system and reference this forum post? We'd likely need to introduce an anchor attribute on view-state or allow it to be encoded into the value of view attribute.

    Comment


    • #3
      Hi Keith,

      Thanks for your reply - I've created that new feature request.

      In the meantime - do you think there's any way that it can be done?

      I was trying to do something (hacky) like the following:


      Let's say this is the view-state that corresponds to the add/edit page for my subsection
      Code:
      <view-state id="subPage" view="SubPage">
          <transition on="mainPage" to="mainPage">
               <set attribute="anchor" value="'myanchor'" scope="flow" />
               <action bean="MyFlowActions" method="doStuff" />
           </transition>		
      </view-state>
      Then in the doStuff method of MyFlowActions, I was hoping I could manipulate the url manually somehow, to tack the #myanchor value onto the end of the url.

      I didn't get very far with this, and the more I think about it, the more it seems like it's probably a dumb idea...

      Thanks again

      Eoin

      Comment


      • #4
        any ideas yet?

        Hi!

        I was wondering if someone found a solution to this problem yet?

        thanks..

        Comment


        • #5
          Any ideas yet?

          Hello,

          I'm also would be very appreciate if somebody can help on this.

          --leroykendall

          Comment

          Working...
          X