Hi,


well I can, now, access to the object in class, struct or union in my
      flowscript (see previous thread).



but then, the shame is that it does not display the form and I have a
      "nullpointer exception" error instead.

In my defintion file I have :

******************************
  <...>
  <fd:widgets>

    <fd:union id="start" default="" case="widget-id">
      <fd:datatype base="string"/>
      <fd:widgets>
        <fd:new id="widgetClass"/>
      </fd:widgets>
    </fd:union>

    <fd:class id="widgetClass">
      <fd:widgets>
        <fd:repeater id="inList" >
          <fd:widgets>
            <fd:union id="union" case="widget-id">
              <fd:datatype base="string"/>
              <fd:widgets>
                <fd:struct id="simpleList">
                  <fd:widgets>
                    <fd:multivaluefield id="list">

<....>



In fill the field thanks to the followwing flowscript :

********************************************************
.......
    var myRepeater = form.lookupWidget("start").lookupWidget("inList");
    var row = myRepeater.addRow();
    var myUnion = row.lookupWidget("union");
    var myDesiredStruct = myUnion.lookupWidget("simpleList");
    var myList = myDesiredStruct.lookupWidget("list");
    myList.setSelectionList( c, "listId", "label" );  //c is an ArrayList (collection).

....



then, finally here is the *template file  which get me into troubles *;

*************************************************************************
<...>
   <ft:union id="start">
        <ft:case id="widgetClass">                     // if I put this block in 
comments, the form is not display but I do not have any exception
          <ft:new id="widgetClass"/>
        </ft:case>
   </ft:union>

      <ft:class id="widgetClass">
        <ft:repeater-widget id="inList">
          <ft:union id="union">

            <ft:case id="simpleList">
              <ft:struct id="simpleList">
                <ft:widget id="list">
                  <fi:styling list-type="checkbox"/>
                </ft:widget>
              </ft:struct>

<...>



Anyway, it appears that I can fill any field of any structure belonging to
      my union id="union" thanks to the lookupwidget function. So, in this
      case how doesthe union make the selection to know which structure is
      to be displayed ?





Thanks in advance for any help,

Stephane


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to