cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <t.katelb...@systheo.com>
Subject Re: Flow : Accessing Repeater Rows value in Flow
Date Wed, 04 Aug 2004 08:05:56 GMT
You say right, something must be wrong :)

************************************
Here's My Form definition:
************************************
  <!--***********House uploads**************** -->
        <fd:repeater id="houseuploads" initial-size="1">
            <fd:widgets>

                <fd:output id="idhouseupload">
                    <fd:datatype base="long"/>
                </fd:output>

                <fd:booleanfield id="select">
                    <fd:label>Select</fd:label>
                </fd:booleanfield>

                <fd:upload id="path">
                    <fd:label>
                        <i18n:text key="yourpicture">Your
picture(optional,png, jpg, or gif)</i18n:text>
                    </fd:label>
                    <fd:help>
                        <i18n:text key="yourpicture.help">This picture will
be presented on your house presentation</i18n:text>
                    </fd:help>
                    <fd:hint>
                        <i18n:text key="yourpicture.help"/>
                    </fd:hint>
                </fd:upload>

                <fd:field id="houseuploaddesc">
                    <fd:label>
                        <i18n:text key="desc">Description</i18n:text>
                    </fd:label>
                    <fd:datatype base="string"/>

                </fd:field>
            </fd:widgets>
        </fd:repeater>

        <!-- buttons to add an element in the bed repeater -->
        <fd:repeater-action id="addhouseupload" action-command="add-row"
repeater="houseuploads">
            <fd:label><i18n:text key="addpicture">Add a
Picture</i18n:text></fd:label>
        </fd:repeater-action>

        <fd:repeater-action id="removehouseupload"
action-command="delete-rows"
            repeater="houseuploads" select="select">
            <fd:label><i18n:text key="delpicture">Remove selected
pictures</i18n:text> </fd:label>
        </fd:repeater-action>

*********************************
Here' the Flow:
**********************************
var formDef = "forms/searchform_model.xml";
var form = new Form(formDef);
    
var wid = form.getWidget();
                        
cocoon.log.error("houseuploads widget
definition :"+wid.houseuploads.getRow(0).getChild("houseuploaddesc").value); 
//returns its content 

cocoon.log.error("houseuploads widget definition :
"+wid.houseuploads.getRow(0).getChild("path").value); //this returns null

   cocoon.log.error("houseuploads Size : "+wid.houseuploads.size);//returns
undefined

Thanks loads !!
Tibor





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message