Help with config.xhtml for FlatMix

30 views
Skip to first unread message

Shanti Subramanyam (gmail)

unread,
Jan 3, 2012, 7:03:57 PM1/3/12
to faban...@googlegroups.com
I see from the code in com.sun.faban.harness.engine.FlatMix.configure() that modifying this mix in run.xml is supported.
However, I am not clear on how exactly to setup the config.xhtml to get the form to support it.

Here are the relevant entries for a driver with 2 operations:
              <xforms:bind id='bind-runConfig-driverConfig-operationMix' xforms:nodeset='fd:operationMix'>
                        <xforms:bind id='bind-runConfig-driverConfig-operationMix-name' xforms:nodeset='fd:name'>
                         </xforms:bind>
                       <xforms:bind id='bind-runConfig-driverConfig-operationMix-r' xforms:nodeset='fd:r>
                        </xforms:bind>
                    </xforms:bind>
                    <xforms:bind id='bind-runConfig-driverConfig-operationMix_1' xforms:nodeset='fd:operationMix'>
                        <xforms:bind id='bind-runConfig-driverConfig-operationMix_1-name' xforms:nodeset='fd:name'>
                        </xforms:bind>
                        <xforms:bind id='bind-runConfig-driverConfig-operationMix_1-r' xforms:nodeset='fd:r'>
                        </xforms:bind>
               </xforms:bind>

  The above is in fact auto-generated. What I'm having trouble with is the input elements below. What happens is that the form displays only the values for the 1st operation repeated again for the 2nd operation i.e. it is ignoring the 2nd <operationMix> entry in the run.xml. 
What am I doing wrong?

         <xforms:group id='group-operationMix'>
                <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/operationMix'/>
                <xforms:input id='input-runConfig-driverConfig-operationMix-name'
                              xforms:bind='bind-runConfig-driverConfig-operationMix-name'>
                    <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/opname'/>
                </xforms:input>
              <xforms:input id='input-runConfig-driverConfig-operationMix-r'
                              xforms:bind='bind-runConfig-driverConfig-operationMix-r'>
                    <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/r'/>
                </xforms:input>
                <xforms:input id='input-runConfig-driverConfig-operationMix_1-name'
                              xforms:bind='bind-runConfig-driverConfig-operationMix_1-name'>
                    <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/opname'/>
                </xforms:input>
                <xforms:input id='input-runConfig-driverConfig-operationMix_1-r'
                              xforms:bind='bind-runConfig-driverConfig-operationMix_1-r'>
                    <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/r'/>
                </xforms:input>

Shanti Subramanyam (gmail)

unread,
Jan 30, 2012, 2:08:18 PM1/30/12
to faban...@googlegroups.com
I figured this out. The problem was the incorrect generation of the bind variables by the xforms auto generator. We need to manually create both the bindings and the input elements in config.xhtml. I'm including a sample from my working workload below:

This goes in the driverConfig section:
<xforms:bind id='bind-runConfig-driverConfig-mix-mix_0'
                                 xforms:nodeset='fd:operationMix[fd:name="GetAccountTree"]/fd:r'>
                        <xforms:bind id='bind-runConfig-driverConfig-mix-mix_0-name' xforms:nodeset='fd:name'>
                        </xforms:bind>
                        <xforms:bind id='bind-runConfig-driverConfig-mix-mix_0-r' xforms:nodeset='fd:r'>
                        </xforms:bind>
                    </xforms:bind>
                    <xforms:bind id='bind-runConfig-driverConfig-mix-mix_1'
                                 xforms:nodeset='fd:operationMix[fd:name="GetLockState"]/fd:r'>
                        <xforms:bind id='bind-runConfig-driverConfig-mix-mix_1-name' xforms:nodeset='fd:name'>
                        </xforms:bind>
                        <xforms:bind id='bind-runConfig-driverConfig-mix-mix_1-r' xforms:nodeset='fd:r'>
                        </xforms:bind>
                    </xforms:bind>

This goes in the input section (you need to add the relevant labels):

<xforms:group id='group-operationMix'>
                <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/mix'/>
                <xforms:input id='input-runConfig-driverConfig-mix-mix_0'
                              xforms:bind='bind-runConfig-driverConfig-mix-mix_0'>
                    <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/getAccountTree'/>
                </xforms:input><xforms:input id='input-runConfig-driverConfig-mix-mix_1'
                              xforms:bind='bind-runConfig-driverConfig-mix-mix_1'>
                    <xforms:label xforms:model='benchmark-labels' xforms:ref='/labels/getLockState'/>
                </xforms:input>
</xforms:group>


Shanti
Reply all
Reply to author
Forward
0 new messages