Skip jsp page of import component
AlexeyPr
Member
Dear developers!
My import in Taskspace customized a little bit:
<component id="importcontainer" extends="importcontainer:webcomponent/config/library/contenttransfer/importcontent/importcontainer_component.xml">
...
</component>
Is there any way in Taskspace to skip <start> page while doing Import after selecting files in <fileselection> page of importcontainer?
Default values of object_name and r_object_type fields which are created will be enough.
Tagged:
0
Comments
-
Примерно так можно.
определение действия:
<action id="silentimport">
<desc>Imports an object from the local file system to the repository. The user must have a contributor role. The permit value folder_link_permit performs a check for write permissions on the folder when folder security is enabled.</desc>
<params>
<param name="objectId" required="true"/>
<param name="objectName" required="false"/>
<param name="ownerName" required="false"/>
<param name="docbaseType" required="false"/>
<param name="baseDocbaseType" required="false"/>
<param name="filePath" required="false"/>
<param name="parentPath" required="false"/>
<param name="isDirectory" required="false"/>
<param name="format" required="false"/>
<param name="componentArgs" required="false"/>
<param name="component" required="false"/>
</params>
<execution class="com.documentum.web.formext.action.LaunchComponent">
<component>import</component>
<container>silentimportcontainer</container>
</execution>
<invocation>
<modalpopup>
<windowsize>medium</windowsize>
<refreshparentwindow>onok</refreshparentwindow>
</modalpopup>
</invocation>
</action>Определение контейнера:
<component id="silentimportcontainer" extends="importcontainer: application='webcomponent'">
<class>SilentImportContainer</class>
<ucfrequired>
<events>
<event name="onOk" enabled="true"/>
<event name="onRender" enabled="true"/>
</events>
</ucfrequired>
<propagatepreviouspagevalues>true</propagatepreviouspagevalues>
</component>Код контейнера:
public class SilentImportContainer extends UcfImportContainer {
private boolean _commitWasTried;
public SilentImportContainer() {
super();
}
@Override
public void onRender() {
super.onRender();
if (isCommitWasTried()) {
return;
}
String[] paths = getInitArgs().getValues("filePath");
if (paths == null || paths.length == 0) {
return;
}
tryCommitChanges();
}
@Override
protected void tryCommitChanges() {
try {
invokeService();
} catch (ContentTransferException e) {
throw new WrapperRuntimeException(e);
} finally {
setCommitWasTried(true);
}
}
protected final boolean isCommitWasTried() {
return _commitWasTried;
}
protected final void setCommitWasTried(boolean commitWasTried) {
_commitWasTried = commitWasTried;
}
}0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 151 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories