Announcement Announcement Module
Collapse
No announcement yet.
SWF 2.0 beginners question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      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

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

      Comment


      • #4
        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

        Comment

        Working...
        X