Pretty straight forward question. Does selecting a component group, at runtime, by the user or through a component selection action, select all components and/or component groups that this group contains in its component list? I apologize as I do believe this was not quite answered in section 5.7 of the documentation or it seemed unclear to me. The select action on a group seems to enable selection for sub-components, but not select them. I do not have a test for this, but I was hoping that someone can spare me the trouble.

Three more questions related to this.

Is there a way to select all components in the project's component list, for instance in a full installation scenario?

Should the default for a component group be <selected>0</selected>, where it contains components that should not be selected by default?

What happens in the following scenario? Is componentA installed? Is componentB installed and everything else in the sub-group? Is this more than three questions?

...
<allowComponentSelection>0</allowComponentSelection>
...
<componentGroup>
    ...
    <selected>1</selected>
    ...
    <componentList>
        <component>
           <name>componentA</name>
           ...
           <selected>0</selected>
           ...
        </component>
        <componentGroup>
            <name>foo</name>
            ...
            <selected>0</selected>
            ...
            <componentList>
                <component>
                    <name>componentB</name>
                    ...
                    <selected>1</selected>
                    ...
                </component>
            </componentList>
        </componentGroup>
    </componentList>
</componentGroup>

asked 08 Dec '11, 13:56

DevHopeful_2012's gravatar image

DevHopeful_2012
176131521
accept rate: 9%

I am pretty sure that componentA is not installed, which makes me wonder how I can select an entire componentGroup or componentList without having to explicitly add all the names of every component in my selection action. I ask this because my design does not know the defaults of sub-components (nor would I think that it should), but, as I said, I have a full installation scenario where all components need to be selected.

(08 Dec '11, 14:09) DevHopeful_2012

Earlier today I found the following to be true about your main question:

When the subcomponent is set to selected and not editable


<selected>1</selected>
<canBeEdited>0</canBeEdited>

then its actual setting will be the same as the parent. So, without any additional logic involved, if I selected a top level component that had 3 subcomponents with the above settings they would all be selected. If I deselect the top level component all child components become deselected. If instead the canBeEdited flag is true for any of the children then the child can be selected/deselected independently of the parent. And I'll state the obvious that if you set the selected flag to false then by default the child will not be selected.

link

answered 08 Dec '11, 15:17

clinuz's gravatar image

clinuz
62113
accept rate: 50%

Thanks. That makes perfect sense and behaves as I would have expected.

But, I guess I am still looking for a workaround to select an entire component group, regardless of what a sub-components' default selected value is. I am just hoping for some other API that I haven't found to selectAllComponents.

Remembering to explicitly select the component in the proper places, based on installation type, seems to be very brittle. In fact, I know that I will forget and introduce bugs in the future, when I add components to the installer.

selectAllComponents...Hey, I can dream can't I. :)

(08 Dec '11, 15:34) DevHopeful_2012

Well I'm very new to BitRock and I not only understand the question but also the general frustration surrounding the presumed solution (to your exact circumstance).

The selected property of a component is by default selected (true) so you don't have to remember to explicitly set it to have it included in the group selection default. In fact, this makes it relatively easy since the only time you would need to remember is for exceptions - e.g. when they should NOT be selected by default.

Then, you use a test early to determine if the group should be selected/deselected and voila. Not too bad.

(08 Dec '11, 15:41) clinuz

Very true. Good point.

Again, I would just like the UI logic to be pretty static and only have to make modifications to individual components and groups. With a complicated suite of products/tools that ship in one giant installer and the requirement for a full, custom, and typical installation types, having a select all or make all visible functionality would be extremely helpful. But, I can wait.

(09 Dec '11, 02:23) DevHopeful_2012

@ "Well I'm very new to BitRock and I not only understand the question but also the general frustration surrounding the presumed solution (to your exact circumstance)."

I have to say that BitRock is pretty awesome overall, from a development perspective. I was lucky enough to get the componentGroup functionality on my first iteration. I could go on and on about other cool features that are enhancements from our old installer. Add the fact that these features are supported on all of our supported platforms and that is quite a feat. Of course, there will always be room for improvements. :)

(09 Dec '11, 02:26) DevHopeful_2012

@ "But, I guess I am still looking for a workaround to select an entire component group, regardless of what a sub-components' default selected value is. I am just hoping for some other API that I haven't found to selectAllComponents."

You can use componentSelection action to select/deselect multiple components easily.

Also, we have added option of specifying that selection/deselection should be recursive to our bug tracking system.

(09 Dec '11, 03:45) wojciechka ♦♦

Thanks for considering the recursive selection/deselection behavior, as it seems to be the more intuitive behavior. Perfect wording and I look forward to seeing the behavior soon.

(09 Dec '11, 03:51) DevHopeful_2012

is option for recursive selection/deselection actual?

(04 Mar '16, 04:11) kirill
showing 5 of 7 show all
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:

×39
×13
×10

Asked: 08 Dec '11, 13:56

Seen: 2,944 times

Last updated: 04 Mar '16, 04:11