Hi,

I have 2 actions in my FinalPageActions. I only want to 2nd one to be allowed if the first one was selected to execute. How can I do that?

Thanks,

Greg

asked 08 Aug '13, 14:54

GregHorton's gravatar image

GregHorton
20667
accept rate: 0%


It you are referring to dynamically disable (visually) the state on the checkboxes it is not possible. I you simply want to avoid executing the second action if the first is not selected, you could use:

<finalPageActionList>
    <actionGroup>
        <progressText>First action Wraper</progressText>
        <actionList>
            <setInstallerVariable>
                <name>first_action_executed</name>
                <value>1</value>
            </setInstallerVariable>
            <showInfo>
                <text>I'm the first action  and I'm executing!</text>
            </showInfo>
        </actionList>
    </actionGroup>
    <actionGroup>
        <explanation>(only executed if you also enable the first one)</explanation>
        <progressText>Second action Wraer</progressText>
        <actionList>
            <showInfo>
                <text>I'm the second action  and I'm executing!</text>
                <ruleList>
                    <isTrue>
                        <value>${first_action_executed}</value>
                    </isTrue>
                </ruleList>
            </showInfo>
        </actionList>
    </actionGroup>
</finalPageActionList>
link

answered 09 Aug '13, 07:44

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

OK that sounds good. Right now in my finalActionPageList I only have two runProgram blocks. I tried to embed a setInstallerVariable inside of one of these but that was not allowed. It looks from the above like I can create two actionGroup blocks, and have the runProgram and setInstallerVariable separately within the first one? So my runProgram would be in the same places as your showInfo?

Thanks

(09 Aug '13, 08:58) GregHorton

Correct. You could also replace the <showInfo> actions with <actionGroup>s if you need to make conditional a set of actions.

(09 Aug '13, 09:15) juanjo ♦♦

Yes, this does work. Thanks!

(09 Aug '13, 12:35) GregHorton
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4
×3

Asked: 08 Aug '13, 14:54

Seen: 2,308 times

Last updated: 09 Aug '13, 12:35