Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ValuesManager and MultiFileItem

$
0
0
SmartClient Version: v10.0p_2015-08-28/Pro Deployment (built 2015-08-28)

Hi I have a dynamic form with a MultiFileItem in it.

It has worked fine until now, but when I tried to move the MultiFileItem to a separate form and connect the 2 forms with a ValuesManager it stopped working.

By stopped working I mean that it doesn't upload files. It behaves like the master record is being newly created even though it is not (I call ValuesManager.fetchData()), and when I call ValuesManager.saveData() it doesn't upload the files then either.

Do I need to do something special when using a MultiFileItem in a ValuesManager?

MultiFileItem:
Code:

MultiFileItem files = new MultiFileItem("file", "File Attachments");
files.setWidth(fieldWidth);
files.setAttribute("dataSource", "scrum_backlog_userStoryFiles");
files.setTitleOrientation(orientation);
files.setIconVAlign(VerticalAlignment.TOP);
files.setColSpan(numberOfCols / 2);
files.setEndRow(true);

MultiFileItem's DataSource:
Code:

<DataSource 
    ID="scrum_backlog_userStoryFiles"
    serverConstructor="it.forecast.server.servlets.scrum.userStories.UserStoryFilesServlet">
    <fields>
        <field name="fileId" type="sequence" primaryKey="true" hidden="true"/>
        <field name="masterRecordId" type="integer" foreignKey="scrum_backlog_userStoryDetails.id" hidden="true"/>
        <field name="file" type="binary" />
      </fields>
</DataSource>

ValuesManager's DataSource:
Code:

<DataSource 
        ID="scrum_backlog_userStoryDetails"
        serverConstructor="it.forecast.server.servlets.scrum.userStories.UserStoryDetailsServlet">
        <fields>
                <field name="id"                      type="sequence"      hidden="true"                                primaryKey="true"        />
                <field name="title"                  type="text"          title="Title"                                length="255"        required="true"        />
                <field name="acceptanceCriteria"      type="text"        title="Acceptance Criteria"        length="100000"                />
                <field name="estimate"                type="integer"      title="Estimated Points"                length="9"                        >
                        <validators>
                                <validator type="integerRange" min="0" />
                        </validators>
                </field>
                <field name="completionDate"          type="date"          title="Completion Date"                dateFormatter="toEuropeanShortDate"        />
                <field name="epic"                    type="text"          title="Epic"                                        length="255"                />
        </fields>
</DataSource>

Let me know if you need more info from me.

Viewing all articles
Browse latest Browse all 4756

Trending Articles