Results 1 to 7 of 7

Thread: how i can handle this: user clicks many times in a link

  1. #1
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Exclamation how i can handle this: user clicks many times in a link

    Hello guys

    i have a flow process where in some jsp/state, to forward to other state the user must do click in some link, the problem is that for test purpose we use a simple machine like server
    the user see a delay in the request process , so it proceed to make more clicks (thinking that it would be make the request more fast)
    , so i recieve an exception i cant remember

    how i can handle this?

    thanks in advanced
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  2. #2
    Join Date
    May 2006
    Location
    Rotterdam
    Posts
    58

    Default

    Howabout disabling the link after click?

  3. #3
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hi

    Howabout disabling the link after click?
    i cant, the link came from a menu for the app

    i prefer handle the exception
    the exception i cant remember, coz, some friend delete the log file

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  4. #4
    Join Date
    May 2005
    Location
    California, US
    Posts
    735

    Default

    This is the general solution with Spring, an exception resolver. If a Spring Web Flow exception NoSuchFlowExcecutionException is thrown it displays the jsp flowException.jsp in my WEB-INF/views/jsp/error directory:
    Code:
        <beans:bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
            <beans:property name="exceptionMappings">
                <beans:props>
                    <beans:prop key="org.springframework.webflow.execution.repository.NoSuchFlowExecutionException">
                        error/flowException
                    </beans:prop>
                </beans:props>
            </beans:property>
        </beans:bean>
    Make sure the full class name is correct for the exception you're getting.

  5. #5
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello lumpynose

    thanks for the reply

    your suggestion seems nice, but i have a doubt,
    it would be thrown why ny flow in my app, so
    if i go to the jsp error, i need a way back to the previous view-state in some flow
    i dont know if when the exception NoSuchFlowExecutionException when is caught
    the flow is terminated
    here
    http://static.springframework.org/sp...Exception.html
    only i see

    Thrown when the flow execution with the persistent identifier provided could not be found. This could occur if the execution has been removed from the repository and a client still has a handle to the key.
    thanks in advanced
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  6. #6
    Join Date
    May 2005
    Location
    California, US
    Posts
    735

    Default

    Yes, the exception way is not as nice as one might like.

  7. #7

    Default

    Hi dr_pompeii,

    As far as I know swf is designed to handle the double submit, when a state is reached and start its treatment it's locked and a new flow execution key is computed to make sure that any "double request" (holding the hold key) is not elligble for going on the flow.

    So could you me more exact on the exception you get when double click occurs.
    mic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •