IzPack
  1. IzPack
  2. IZPACK-697

UserInputPanel does not changes the binding's dynamicvariable

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: Installer
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When user change a field in UserInputPanel which binds to an existing dynamic variable with a default value, the user inputs does not dynamically change the var.

      To produce this, debug thru UserInputPanel's validator

        Activity

        Hide
        Tim Anderson added a comment -

        Can you attach a minimalist install.xml and userInputSpec.xml that can be used to reproduce the behaviour?
        It will make it easier to diagnose and develop a test case.

        Show
        Tim Anderson added a comment - Can you attach a minimalist install.xml and userInputSpec.xml that can be used to reproduce the behaviour? It will make it easier to diagnose and develop a test case.
        Hide
        CM added a comment -

        I'm experiencing(with beta11 build locally) the same thing only when I'm accessing dynamic variable(DV) "DV_JBOSS_MASTER_ADDRESS" in my java class called by process panel, but the DV gets correctly replaced with the modified value when called <parsable/> node over the file on which I've putted the DV(in my case a BAT file).

        My snippet code:
        install.xml
        <installation version="1.0">
        ...
        <variables>
        ...
        <variable name="V_DEFAULT_JBOSS_MASTER_ADDRESS" value="localhost" />
        ...
        </variables>
        <dynamicvariables>
        ...
        <variable name="DV_JBOSS_MASTER_ADDRESS" value="$

        {VI_MASTER_ADDRESS}

        " condition="C_NODE" />
        <variable name="DV_JBOSS_MASTER_ADDRESS" value="$

        {V_DEFAULT_JBOSS_MASTER_ADDRESS}" condition="!C_NODE" />
        ...
        </dynamicvariables>
        ...
        </installation>

        userInputSpec.xml
        <userInput>
        ...
        <panel id="P_userinput_master">
        <field type="text" variable="VI_MASTER_ADDRESS">
        <spec txt="CRE Master Address:" id="input.dg.cre.master.address" size="20" set="${V_DEFAULT_JBOSS_MASTER_ADDRESS}

        " />
        </field>
        </panel>
        ...
        </userInput>

        Show
        CM added a comment - I'm experiencing( with beta11 build locally ) the same thing only when I'm accessing dynamic variable(DV) "DV_JBOSS_MASTER_ADDRESS" in my java class called by process panel, but the DV gets correctly replaced with the modified value when called <parsable/> node over the file on which I've putted the DV(in my case a BAT file). My snippet code: install.xml <installation version="1.0"> ... <variables> ... <variable name="V_DEFAULT_JBOSS_MASTER_ADDRESS" value="localhost" /> ... </variables> <dynamicvariables> ... <variable name="DV_JBOSS_MASTER_ADDRESS" value="$ {VI_MASTER_ADDRESS} " condition="C_NODE" /> <variable name="DV_JBOSS_MASTER_ADDRESS" value="$ {V_DEFAULT_JBOSS_MASTER_ADDRESS}" condition="!C_NODE" /> ... </dynamicvariables> ... </installation> userInputSpec.xml <userInput> ... <panel id="P_userinput_master"> <field type="text" variable="VI_MASTER_ADDRESS"> <spec txt="CRE Master Address:" id="input.dg.cre.master.address" size="20" set="${V_DEFAULT_JBOSS_MASTER_ADDRESS} " /> </field> </panel> ... </userInput>
        Hide
        Tim Anderson added a comment -

        I can't reproduce this locally with the latest 5.0.0-beta11-SNAPSHOT.
        One thing to be aware of is that dynamic variables are only updated when navigating to the next or previous panel.

        Show
        Tim Anderson added a comment - I can't reproduce this locally with the latest 5.0.0-beta11-SNAPSHOT. One thing to be aware of is that dynamic variables are only updated when navigating to the next or previous panel.
        Hide
        Rene Krell added a comment -

        I can't reproduce this problem here with the current 5.0.0-beta11-SNAPSHOT, neither.

        As Tim already wrote, as long as the given pabnel (in your case "P_userinput_master") is active, the variable can't be resolved, because it can't be assigned in you usecase. Therefore, in that moment the value of DV_JBOSS_MASTER_ADDRESS is $

        {VI_MASTER_ADDRESS}

        (unresolved) according to the specification of resolving variables in IzPack.

        As soon as you change to the next panel, VI_MASTER_ADDRESS gets assigned and DV_JBOSS_MASTER_ADDRESS receives the resolved value.

        This does definitely work with the current implementation.

        Show
        Rene Krell added a comment - I can't reproduce this problem here with the current 5.0.0-beta11-SNAPSHOT, neither. As Tim already wrote, as long as the given pabnel (in your case "P_userinput_master") is active, the variable can't be resolved, because it can't be assigned in you usecase. Therefore, in that moment the value of DV_JBOSS_MASTER_ADDRESS is $ {VI_MASTER_ADDRESS} (unresolved) according to the specification of resolving variables in IzPack. As soon as you change to the next panel, VI_MASTER_ADDRESS gets assigned and DV_JBOSS_MASTER_ADDRESS receives the resolved value. This does definitely work with the current implementation.
        Hide
        Rene Krell added a comment -

        Hint: Please launch the installer with -DTRACE=true and watch the variable and condition value transitions along with switching between the panels.

        Show
        Rene Krell added a comment - Hint: Please launch the installer with -DTRACE=true and watch the variable and condition value transitions along with switching between the panels.
        Hide
        CM added a comment -

        I had to downgrade izpack version to the ones mentioned below, being able to fulfill my task of building the installer for my project.

        <izpack.maven-plugin.version>1.0-alpha-5</izpack.maven-plugin.version>
        <izpack.standalone-compiler.version>4.3.2</izpack.standalone-compiler.version>

        So, I'm not able at the moment to change all my configuration and retest with snapshot beta 11.

        As Dan mentioned at the beginning, the value for input panel doesn't get updated when adding a validator or a process panel get executed, after the value is filled and next button is pressed(debug in Validator/ProcessExecutor and see that the initial value is set to the dynamic variable).
        Define a Validator for the input panel and check if the dynamic variable(initially set to a default value) gets updated with the one from input, which I'm expected to be updated accordingly with the one filled in input, in order to be able do my validation. Am I approaching it wrong?

        Show
        CM added a comment - I had to downgrade izpack version to the ones mentioned below, being able to fulfill my task of building the installer for my project. <izpack.maven-plugin.version>1.0-alpha-5</izpack.maven-plugin.version> <izpack.standalone-compiler.version>4.3.2</izpack.standalone-compiler.version> So, I'm not able at the moment to change all my configuration and retest with snapshot beta 11. As Dan mentioned at the beginning, the value for input panel doesn't get updated when adding a validator or a process panel get executed, after the value is filled and next button is pressed(debug in Validator/ProcessExecutor and see that the initial value is set to the dynamic variable). Define a Validator for the input panel and check if the dynamic variable(initially set to a default value) gets updated with the one from input, which I'm expected to be updated accordingly with the one filled in input, in order to be able do my validation. Am I approaching it wrong?

          People

          • Assignee:
            Rene Krell
            Reporter:
            Dan Tran
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: