Webtop 多行显示文件属性值
处理前
处理后
package
com.documentum.devprog.control;
import com.documentum.web.formext.config.IConfigElement;
import com.documentum.web.formext.control.docbase.DocbaseAttributeValue;
import com.documentum.web.formext.control.docbase.DocbaseAttributeValueTag;
import com.documentum.web.formext.control.docbase.DocbaseObject;
import java.io.IOException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
/** */ /**
* @author liaojiyong
* @date Aug 3, 2009
* @version 1.0
*/
public class SubjectAttributeValueTag extends DocbaseAttributeValueTag {
protected void renderSingleAttribute(String strFormattedValue, String strValue, boolean bReadonly, boolean bHasCompleteList, JspWriter out) throws IOException, JspTagException {
String strLines = "1";
DocbaseAttributeValue value = (DocbaseAttributeValue) getControl();
DocbaseObject obj = (DocbaseObject) getForm().getControl(value.getObject());
IConfigElement iConfigElement = obj.getConfigForAttribute(value.getAttribute(), "lines");
if (iConfigElement != null) {
strLines = (iConfigElement.getValue());
}
value.setLines(strLines);
super.renderSingleAttribute(strFormattedValue, strValue, bReadonly, bHasCompleteList, out);
}
}
import com.documentum.web.formext.config.IConfigElement;
import com.documentum.web.formext.control.docbase.DocbaseAttributeValue;
import com.documentum.web.formext.control.docbase.DocbaseAttributeValueTag;
import com.documentum.web.formext.control.docbase.DocbaseObject;
import java.io.IOException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
/** */ /**
* @author liaojiyong
* @date Aug 3, 2009
* @version 1.0
*/
public class SubjectAttributeValueTag extends DocbaseAttributeValueTag {
protected void renderSingleAttribute(String strFormattedValue, String strValue, boolean bReadonly, boolean bHasCompleteList, JspWriter out) throws IOException, JspTagException {
String strLines = "1";
DocbaseAttributeValue value = (DocbaseAttributeValue) getControl();
DocbaseObject obj = (DocbaseObject) getForm().getControl(value.getObject());
IConfigElement iConfigElement = obj.getConfigForAttribute(value.getAttribute(), "lines");
if (iConfigElement != null) {
strLines = (iConfigElement.getValue());
}
value.setLines(strLines);
super.renderSingleAttribute(strFormattedValue, strValue, bReadonly, bHasCompleteList, out);
}
}
<?
xml version="1.0" encoding="UTF-8" standalone="no"
?>
<!-- *********************************************************************** -->
<!-- Copyright (c) 2004-2008. EMC Corporation. All Rights Reserved. -->
<!-- *********************************************************************** -->
<!-- -->
<!-- Project Component Library -->
<!-- Module Attributes -->
<!-- File docbaseobjectconfiguration_dm_sysobject.xml -->
<!-- Description Attributes customization file -->
<!-- Created on August 4, 2004 -->
<!-- Tab width 3 -->
<!-- -->
<!-- *********************************************************************** -->
<!-- -->
<!-- VCS Maintained Data -->
<!-- -->
<!-- Revision $Revision: 15$ -->
<!-- Modified on $Date: 4/14/2008 7:56:41 PM$ -->
<!-- -->
<!-- *********************************************************************** -->
< config version ="1.0" >
< scope type ="dm_sysobject" >
< docbaseobjectconfiguration id ="attributes" >
< names >
<!-- apply to attribute -->
<!-- <attribute name='attribute_name'> -->
<!-- <valuehandler>class.which.implements.IDocbaseAttributeSetValueHandler</valuehandler> -->
<!-- <valueformatter>class.which.implements.IDocbaseAttributeValueFormatter</valueformatter> -->
<!-- <tagclass>class.which.extends.DocbaseAttributeTag</tagclass> -->
<!-- <labeltagclass>class.which.extends.DocbaseAttributeLabelTag</labeltagclass> -->
<!-- <valuetagclass>class.which.extends.DocbaseAttributeValueTag</valuetagclass> -->
<!-- <editcomponent>editComponentName</editcomponent> -->
<!-- <somecustomelement>values specific to tag implementation</somecustomelement> -->
<!-- </attribute> -->
<!-- Apply custom behavior to the 'a_storage_type' attribute -->
<!-- Apply custom behavior to the 'subject' attribute -->
< attribute name ='subject'>
<valuetagclass > com.documentum.devprog.control.SubjectAttributeValueTag </ valuetagclass >
< lines > 3 </ lines >
</ attribute >
< attribute name ="a_storage_type" >
< valuehandler > com.documentum.web.formext.control.docbase.DocbaseAttributeStorageTypeValueHandler </ valuehandler >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeStorageTypeValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'r_object_id' attribute -->
< attribute name ="r_object_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeObjectIdValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'i_chronicle_id' attribute -->
< attribute name ="i_chronicle_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeChronicleIdValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'r_policy_id' attribute -->
< attribute name ="r_policy_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributePolicyIdValueFormatter </ valueformatter >
< valuehandler > com.documentum.webcomponent.library.actions.lifecycle.DocbaseAttributePolicyIdValueHandler </ valuehandler >
< valuetagclass > com.documentum.webcomponent.library.actions.lifecycle.DocbaseAttributePolicyIdValueTag </ valuetagclass >
< editcomponent > selectlifecycle </ editcomponent >
< invocation >
< modalpopup >
< windowsize > large </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
<!-- Apply custom behavior to the 'r_version_label' attribute -->
< attribute name ="r_version_label" >
< valuehandler > com.documentum.web.formext.control.docbase.DocbaseAttributeVersionLabelSetValueHandler </ valuehandler >
< editcomponent > versionlabels </ editcomponent >
< invocation >
< modalpopup >
< windowsize > small </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
<!-- Apply custom behavior to the 'r_current_state' attribute -->
< attribute name ="r_current_state" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeLifecycleStateValueFormatter </ valueformatter >
< valuetagclass > com.documentum.web.formext.control.docbase.DocbaseAttributeLifecycleStateValueTag </ valuetagclass >
</ attribute >
<!-- Apply custom behavior to the 'r_resume_state' attribute -->
< attribute name ="r_resume_state" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeLifecycleStateValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'r_alias_set_id' attribute -->
< attribute name ="r_alias_set_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeAliasSetIdValueFormatter </ valueformatter >
< valuetagclass > com.documentum.web.formext.control.docbase.DocbaseAttributeAliasSetIdValueTag </ valuetagclass >
</ attribute >
<!-- Apply custom behavior to the 'owner_name' attribute -->
< attribute name ="owner_name" >
< editcomponent > selectuserorgroupattributevalue </ editcomponent >
< invocation >
< modalpopup >
< windowsize > large </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
<!-- Apply custom behavior to the 'object_name' attribute -->
< attribute name ="object_name" >
< valuetagclass > com.documentum.web.formext.control.docbase.RequiredDocbaseAttributeValueTag </ valuetagclass >
</ attribute >
</ names >
< types >
<!-- <attribute type='type_name (e.g., boolean, integer, string, id, time, double) or psuedo_type_name' -->
<!-- [repeatingonly='true/false'] -->
<!-- [singleonly='true/false']> -->
<!-- <valuehandler>class.which.implements.IDocbaseAttributeSetValueHandler</valuehandler> -->
<!-- <valueformatter>class.which.implements.IDocbaseAttributeValueFormatter</valueformatter> -->
<!-- <tagclass>class.which.extends.DocbaseAttributeTag</tagclass> -->
<!-- <labeltagclass>class.which.extends.DocbaseAttributeLabelTag</labeltagclass> -->
<!-- <valuetagclass>class.which.extends.DocbaseAttributeValueTag</valuetagclass> -->
<!-- <editcomponent>editComponentName</editcomponent> -->
<!-- <somecustomelement>values specific to tag implementation</somecustomelement> -->
<!-- </attribute> -->
< attribute type ="rich_text" repeatingonly ="false" singleonly ="false" >
<!-- <valuehandler>class.which.implements.RichTextDocbaseAttributeTag</valuehandler> -->
< tagclass > com.documentum.web.formext.control.docbase.RichTextDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.RichTextDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.RichTextDocbaseAttributeValueTag </ valuetagclass >
<!-- To turn off toolbar items, uncomment the attribute -->
<!-- <showfonts>false</showfonts> -->
<!-- <showcharformatting>false</showcharformatting> -->
<!-- <showsparaformatting>false</showsparaformatting> -->
<!-- <showclipboard>false</showclipboard> -->
<!-- <showimages>false</showimages> -->
<!-- <showspellchecker>false</showspellchecker> -->
<!-- <showlinks>false</showlinks> -->
</ attribute >
< attribute type ="show_topic" repeatingonly ="false" singleonly ="true" >
< tagclass > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeValueTag </ valuetagclass >
< valuehandler > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeValueHandler </ valuehandler >
< showtopic > false </ showtopic >
<!-- default setting for this attribute -->
</ attribute >
< attribute type ="mail_addr" repeatingonly ="false" singleonly ="false" >
< tagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAddrDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAddrDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAddrDocbaseAttributeValueTag </ valuetagclass >
</ attribute >
< attribute type ="mail_attachment" repeatingonly ="false" singleonly ="false" >
< tagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAttachDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAttachDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAttachDocbaseAttributeValueTag </ valuetagclass >
</ attribute >
<!-- Formatter for IDs -->
< attribute type ="id" repeatingonly ="false" singleonly ="true" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeIdValueFormatter </ valueformatter >
</ attribute >
<!-- Default invocation setting for all type if none is specified for specific type or specific attribute name -->
< attribute type ="*" repeatingonly ="false" singleonly ="false" >
< invocation >
< modalpopup >
< windowsize > small </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
</ types >
</ docbaseobjectconfiguration >
</ scope >
</ config >
<!-- *********************************************************************** -->
<!-- Copyright (c) 2004-2008. EMC Corporation. All Rights Reserved. -->
<!-- *********************************************************************** -->
<!-- -->
<!-- Project Component Library -->
<!-- Module Attributes -->
<!-- File docbaseobjectconfiguration_dm_sysobject.xml -->
<!-- Description Attributes customization file -->
<!-- Created on August 4, 2004 -->
<!-- Tab width 3 -->
<!-- -->
<!-- *********************************************************************** -->
<!-- -->
<!-- VCS Maintained Data -->
<!-- -->
<!-- Revision $Revision: 15$ -->
<!-- Modified on $Date: 4/14/2008 7:56:41 PM$ -->
<!-- -->
<!-- *********************************************************************** -->
< config version ="1.0" >
< scope type ="dm_sysobject" >
< docbaseobjectconfiguration id ="attributes" >
< names >
<!-- apply to attribute -->
<!-- <attribute name='attribute_name'> -->
<!-- <valuehandler>class.which.implements.IDocbaseAttributeSetValueHandler</valuehandler> -->
<!-- <valueformatter>class.which.implements.IDocbaseAttributeValueFormatter</valueformatter> -->
<!-- <tagclass>class.which.extends.DocbaseAttributeTag</tagclass> -->
<!-- <labeltagclass>class.which.extends.DocbaseAttributeLabelTag</labeltagclass> -->
<!-- <valuetagclass>class.which.extends.DocbaseAttributeValueTag</valuetagclass> -->
<!-- <editcomponent>editComponentName</editcomponent> -->
<!-- <somecustomelement>values specific to tag implementation</somecustomelement> -->
<!-- </attribute> -->
<!-- Apply custom behavior to the 'a_storage_type' attribute -->
<!-- Apply custom behavior to the 'subject' attribute -->
< attribute name ='subject'>
<valuetagclass > com.documentum.devprog.control.SubjectAttributeValueTag </ valuetagclass >
< lines > 3 </ lines >
</ attribute >
< attribute name ="a_storage_type" >
< valuehandler > com.documentum.web.formext.control.docbase.DocbaseAttributeStorageTypeValueHandler </ valuehandler >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeStorageTypeValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'r_object_id' attribute -->
< attribute name ="r_object_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeObjectIdValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'i_chronicle_id' attribute -->
< attribute name ="i_chronicle_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeChronicleIdValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'r_policy_id' attribute -->
< attribute name ="r_policy_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributePolicyIdValueFormatter </ valueformatter >
< valuehandler > com.documentum.webcomponent.library.actions.lifecycle.DocbaseAttributePolicyIdValueHandler </ valuehandler >
< valuetagclass > com.documentum.webcomponent.library.actions.lifecycle.DocbaseAttributePolicyIdValueTag </ valuetagclass >
< editcomponent > selectlifecycle </ editcomponent >
< invocation >
< modalpopup >
< windowsize > large </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
<!-- Apply custom behavior to the 'r_version_label' attribute -->
< attribute name ="r_version_label" >
< valuehandler > com.documentum.web.formext.control.docbase.DocbaseAttributeVersionLabelSetValueHandler </ valuehandler >
< editcomponent > versionlabels </ editcomponent >
< invocation >
< modalpopup >
< windowsize > small </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
<!-- Apply custom behavior to the 'r_current_state' attribute -->
< attribute name ="r_current_state" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeLifecycleStateValueFormatter </ valueformatter >
< valuetagclass > com.documentum.web.formext.control.docbase.DocbaseAttributeLifecycleStateValueTag </ valuetagclass >
</ attribute >
<!-- Apply custom behavior to the 'r_resume_state' attribute -->
< attribute name ="r_resume_state" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeLifecycleStateValueFormatter </ valueformatter >
</ attribute >
<!-- Apply custom behavior to the 'r_alias_set_id' attribute -->
< attribute name ="r_alias_set_id" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeAliasSetIdValueFormatter </ valueformatter >
< valuetagclass > com.documentum.web.formext.control.docbase.DocbaseAttributeAliasSetIdValueTag </ valuetagclass >
</ attribute >
<!-- Apply custom behavior to the 'owner_name' attribute -->
< attribute name ="owner_name" >
< editcomponent > selectuserorgroupattributevalue </ editcomponent >
< invocation >
< modalpopup >
< windowsize > large </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
<!-- Apply custom behavior to the 'object_name' attribute -->
< attribute name ="object_name" >
< valuetagclass > com.documentum.web.formext.control.docbase.RequiredDocbaseAttributeValueTag </ valuetagclass >
</ attribute >
</ names >
< types >
<!-- <attribute type='type_name (e.g., boolean, integer, string, id, time, double) or psuedo_type_name' -->
<!-- [repeatingonly='true/false'] -->
<!-- [singleonly='true/false']> -->
<!-- <valuehandler>class.which.implements.IDocbaseAttributeSetValueHandler</valuehandler> -->
<!-- <valueformatter>class.which.implements.IDocbaseAttributeValueFormatter</valueformatter> -->
<!-- <tagclass>class.which.extends.DocbaseAttributeTag</tagclass> -->
<!-- <labeltagclass>class.which.extends.DocbaseAttributeLabelTag</labeltagclass> -->
<!-- <valuetagclass>class.which.extends.DocbaseAttributeValueTag</valuetagclass> -->
<!-- <editcomponent>editComponentName</editcomponent> -->
<!-- <somecustomelement>values specific to tag implementation</somecustomelement> -->
<!-- </attribute> -->
< attribute type ="rich_text" repeatingonly ="false" singleonly ="false" >
<!-- <valuehandler>class.which.implements.RichTextDocbaseAttributeTag</valuehandler> -->
< tagclass > com.documentum.web.formext.control.docbase.RichTextDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.RichTextDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.RichTextDocbaseAttributeValueTag </ valuetagclass >
<!-- To turn off toolbar items, uncomment the attribute -->
<!-- <showfonts>false</showfonts> -->
<!-- <showcharformatting>false</showcharformatting> -->
<!-- <showsparaformatting>false</showsparaformatting> -->
<!-- <showclipboard>false</showclipboard> -->
<!-- <showimages>false</showimages> -->
<!-- <showspellchecker>false</showspellchecker> -->
<!-- <showlinks>false</showlinks> -->
</ attribute >
< attribute type ="show_topic" repeatingonly ="false" singleonly ="true" >
< tagclass > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeValueTag </ valuetagclass >
< valuehandler > com.documentum.web.formext.control.docbase.ShowTopicDocbaseAttributeValueHandler </ valuehandler >
< showtopic > false </ showtopic >
<!-- default setting for this attribute -->
</ attribute >
< attribute type ="mail_addr" repeatingonly ="false" singleonly ="false" >
< tagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAddrDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAddrDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAddrDocbaseAttributeValueTag </ valuetagclass >
</ attribute >
< attribute type ="mail_attachment" repeatingonly ="false" singleonly ="false" >
< tagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAttachDocbaseAttributeTag </ tagclass >
< labeltagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAttachDocbaseAttributeLabelTag </ labeltagclass >
< valuetagclass > com.documentum.web.formext.control.docbase.messagearchive.MessageArchiveAttachDocbaseAttributeValueTag </ valuetagclass >
</ attribute >
<!-- Formatter for IDs -->
< attribute type ="id" repeatingonly ="false" singleonly ="true" >
< valueformatter > com.documentum.web.formext.control.docbase.DocbaseAttributeIdValueFormatter </ valueformatter >
</ attribute >
<!-- Default invocation setting for all type if none is specified for specific type or specific attribute name -->
< attribute type ="*" repeatingonly ="false" singleonly ="false" >
< invocation >
< modalpopup >
< windowsize > small </ windowsize >
< refreshparentwindow > onok </ refreshparentwindow >
</ modalpopup >
</ invocation >
</ attribute >
</ types >
</ docbaseobjectconfiguration >
</ scope >
</ config >