Results 1 to 4 of 4

Thread: SWF 2.0 beginners question

  1. #1

    Default SWF 2.0 beginners question

    Hi all
    I am working on an application based on SWF2.0 and JSP and Javascript and Spring i18n.

    Its a Questionare(like GRE Exam) where each page has NEXT /PREV /SAVE & EXIT buttons and Headers(images and some mesages) and each question (well most of the times) based on user's answer might take to different question.

    In headers - i have something like
    Question No x.

    Somehow i couldnt figure how can i pass or calcualte Ques num dynamically.
    With NEXT , it should increase and PREv it should decrease.
    I dont want to pass Quesno var from flow files.

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

    Default

    Hello

    I dont understand very nice your request

    I dont want to pass Quesno var from flow files.
    Why not?

    Somehow i couldnt figure how can i pass or calcualte Ques num dynamically. With NEXT , it should increase and PREv it should decrease. I dont want to pass Quesno var from flow files.
    Perhaps Ajax could be useful, but I think could be more complex, I want understand your answer for my question to get a better idea
    - 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

  3. #3

    Default About passing Question no

    About passing QuestionNo as parameter from flow defintion to JSP
    I dont want to do this is
    1. hard coding the Question no and rendering in JSP.
    2. There are lot many questions like 20-30 and i will hae to create 30 variables though it is safe way and wont have miscalculation chances.

    ------------------------
    My page is like this -


    Question no 1
    Are you US Citizen ?
    Radio Yes.
    Radio No

    Then NEXT PREV SAVE & EXIT

    -----------------

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

    Default

    Hello

    2. There are lot many questions like 20-30 and i will hae to create 30 variables though it is safe way and wont have miscalculation chances.
    I see, and why not create or consider something like this

    Code:
    public class Exam{
    
      ....
      private List<Question> questions;
    
    }
    Therefore when you start the flow process you can create the Class Exam and pre populate a desired list of questions, and you only have one var and not 30 variables instead

    and each question (well most of the times) based on user's answer might take to different question.
    You could consider create the Exam class with the List with just only one Question, therefore each time you "NEXT" you can add other question to the list according with the answer

    HTH
    - 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

Tags for this Thread

Posting Permissions

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