Antwort: RE : Antwort: [izpack-users] Disable/Enable or Select/Deselect packs based on pack selection

Martina.Albrecht at curiavant.de Martina.Albrecht at curiavant.de
Tue Mar 7 13:02:38 CET 2006


The list of selected packs is in the InstallData object (idata). I do
something like:

        Iterator it = idata.selectedPacks.iterator();
        boolean dbflag = false;

        while (it.hasNext()) {
            Pack pack = (Pack) it.next();
            if (pack.group != null && pack.group.equals(groupname)) {
                  if (dbflag) {
                        // several packs in group databases have been
selected
                  }
                  else {
                  // the first pack in group databases has been found

                        dbflag = true;
                  }
            }
        }
        if (!dbflag)  {
            // no database has been selected
        }

The problem is that you have to interate over the whole list and you have
to cope with a predefined groupname.

Martina



|---------+----------------------------->
|         |           Christophe        |
|         |           ROCHEFOLLE        |
|         |           <CROCHEFO at metaware|
|         |           .tm.fr>           |
|         |           Gesendet von:     |
|         |           izpack-users-admin|
|         |           @berlios.de       |
|         |                             |
|         |                             |
|         |           07.03.2006 12:06  |
|         |           Bitte antworten an|
|         |           izpack-users      |
|         |                             |
|---------+----------------------------->
  >-------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                               |
  |       An:       "'izpack-users at berlios.de'" <izpack-users at berlios.de>                                                         |
  |       Kopie:                                                                                                                  |
  |       Thema:    RE : Antwort: [izpack-users] Disable/Enable or Select/Deselect pa       cks based on pack selection           |
  >-------------------------------------------------------------------------------------------------------------------------------|




OK, I see, but how do you ' go through the selected packs
and check that only one pack for group "databases" is selected" ?

Thanks a lot for your answer,
Kriss


-----Message d'origine-----
De : Martina.Albrecht at curiavant.de [mailto:Martina.Albrecht at curiavant.de]
Envoyé : mardi 7 mars 2006 12:00
À : izpack-users at berlios.de
Objet : Antwort: [izpack-users] Disable/Enable or Select/Deselect packs
based on pack selection


Hello,

my idea (same problem) was to use the group attribute for the packs and
when the PacksPanel is validated, you could go through the selected packs
and check that only one pack for group "databases" is selected. It works,
but I'm not really pleased with that solution.

Martina



|---------+----------------------------->
|         |           Christophe        |
|         |           ROCHEFOLLE        |
|         |           <CROCHEFO at metaware|
|         |           .tm.fr>           |
|         |           Gesendet von:     |
|         |           izpack-users-admin|
|         |           @berlios.de       |
|         |                             |
|         |                             |
|         |           07.03.2006 11:08  |
|         |           Bitte antworten an|
|         |           izpack-users      |
|         |                             |
|---------+----------------------------->

>
---------------------------------------------------------------------------
----------------------------------------------------|
  |
|
  |       An:       "'izpack-users at berlios.de'" <izpack-users at berlios.de>
|
  |       Kopie:
|
  |       Thema:    [izpack-users] Disable/Enable or Select/Deselect packs
based on   pack selection                              |

>
---------------------------------------------------------------------------
----------------------------------------------------|




Hello,

Sorry if this question seems to be asked hundred times, but even after
looking at the mailing archives, and see this subject I didn't find the
answer.

How can I have several packs that are exclusive ?

Here is my example. I want to install (using silent install) MySQL 5 or
PostgreSQL 8.1 or use an existing one.


So I create 4 packs :
             - Install MySQL 5
             - Install PostgreSQL 8.1
             - Use an existing MySQL database
             - Use an existing PostgreSQL database

How can I say that the user can just pick one of those packs ?

Thanks in advance,
Kriss
_______________________________________________
izpack-users mailing list
izpack-users at lists.berlios.de
http://lists.berlios.de/mailman/listinfo/izpack-users





_______________________________________________
izpack-users mailing list
izpack-users at lists.berlios.de
http://lists.berlios.de/mailman/listinfo/izpack-users

_______________________________________________
izpack-users mailing list
izpack-users at lists.berlios.de
http://lists.berlios.de/mailman/listinfo/izpack-users








More information about the izpack-users mailing list