" width="35%">
<%= dataslot.getLabel() %>
<% if(dataslot.isRequired()){ %> * <% } %>
|
<%
if (dataslot.hasChoices())
{
ArrayList allchoices = dataslot.getChoices();
HashMap choiceLabels = dataslot.getChoiceLabels();
%>
">
|
<%
} //end dataslot.hasChoices();
else if (dataslot.isDocument() || dataslot.isObject() || dataslot.isSet())
{
if (dataslot.isDocument()) {
dataslot.setUpdatable(isDataslotEditable && dataslot.updatable());
} else {
dataslot.setUpdatable(isDataslotEditable);
}
%>
" ><%= dataslot.getValue().toString() %>
<%
if(dataslot.isDocument()) {
%>
<%
}
%>
|
<%= ((dataslot.isDocument())?"":"") %>
<%
} //end dataslot.isDocument() || dataslot.isObject() || dataslot.isSet() || dataslot.isList()//end dataslot.isDocument() || dataslot.isObject() || dataslot.isSet() || dataslot.isList()
else if (dataslot.isABLLongChar())
{
String dsValue = "";
LongChar charValue = null;
if (dataslot.getValue() instanceof LongChar) {
charValue = (LongChar) dataslot.getValue();
dsValue = charValue.getValue();
}
else
dsValue = (null == dataslot.getValue()) ? "" : dataslot.getValue().toString();
if (dsValue != null) {
final String tempVal = dsValue;
dsValue = PortalUtil.getShortString(tempVal);
}
else
dsValue = "";
%>
" width="80%">
<%= dsValue%>
&PIID=<%=collabDetails.get("piid")%>&dsName=<%=dataslot.getName()%>&dontUpdate=<%=(taskAccessType == 0 ||(!isCollaborator)||isReadOnly)%>','popusergroupsearch','scrollbars=yes,resizable=yes,width=900,height=600')"/>
|
<%
} //end dataslot.isABLLongChar()
else if (dataslot.isMultiLine())
{
%>
" >
|
<%
textAreaCheck.append("var textarea").append(i).append(" = document.getElementById('ta").append(i).append("');\n");
textAreaCheck.append("if (textarea").append(i).append(".value.length > ").append(dataslot.getSize()-1).append(")\n");
textAreaCheck.append("{\n");
textAreaCheck.append("\talert('").append(bizManage.getResourceString("textAreaAlert1")).append(" ").append(dataslot.getLabel());
textAreaCheck.append(" ").append(bizManage.getResourceString("textAreaAlert2")).append(" ").append(dataslot.getSize()-1);
textAreaCheck.append(" ").append(bizManage.getResourceString("textAreaAlert3")).append("');\n");
textAreaCheck.append("\treturn false;\n");
textAreaCheck.append("}\n");
} //end dataslot.isMultiLine()
else if (dataslot.isBoolean() || dataslot.isABLLogical())
{
%>
">
|
<%
} //end datslot.isBoolean()
else if (dataslot.isString() || dataslot.isURL() || dataslot.isABLCharacter() || dataslot.isABLLongChar())
{
String inputType = "text";
if(dataslot.isPassword()){
inputType = "password";
}
String dsValue = "";
if ((dataslot.isABLCharacter() || dataslot.isABLLongChar()) && dataslot.getValue() instanceof Character)
{
Character charValue = (Character) dataslot.getValue();
dsValue = charValue.getValue();
dsValue = (dsValue == null) ? "" : AimUtil.getHtmlSafeString(dsValue);
}
else
dsValue = AimUtil.getHtmlSafeString(dataslot.getValue().toString());
%>
">
class="InptTxt" name="<%= dataslot.getName() %>" value="<%= dsValue %>" <%= ((dataslot.isString())?"maxlength=\""+dataslot.getSize()+"\"":"") %> <%= (dataslot.getValidationType() != null) ? ("alt=\""+dataslot.getValidationType()+"\""):"" %> size="40" />
|
<%
}// end dataslot.isString() || dataslot.isURL
else if (dataslot.isLong() || dataslot.isDouble() || dataslot.isABLInteger() || dataslot.isABLInt64())
{
String type = "text";
String finalValue = "";
Number nValue = null;
try{
if(dataslot.isLong())
nValue = Long.parseLong(dataslot.getValue().toString());
else if(dataslot.isDouble())
nValue = Double.parseDouble(dataslot.getValue().toString());
else if(dataslot.isABLInteger()){
com.progress.lang.Integer intt = (com.progress.lang.Integer)dataslot.getValue();
if(intt.getValue() != null){
nValue = Integer.parseInt(dataslot.getValue().toString());
}
}
else if(dataslot.isABLInt64()){
com.progress.lang.Int64 int64 = (com.progress.lang.Int64)dataslot.getValue();
if(int64.getValue() != null){
nValue = Long.parseLong(dataslot.getValue().toString());
}
}
}catch(Exception ex){}
if( ! ( nValue == null && (dataslot.isABLInteger() || dataslot.isABLInt64())) )
finalValue = PortalNumberFormatUtil.prepareLocalizedNumber(nValue, bizManage.getLocale());
%>
">
class="InptTxt" name="<%= dataslot.getName() %>" value="<%= finalValue %>" <%= ((dataslot.isString())?"maxlength=\""+dataslot.getSize()+"\"":"") %> <%= (dataslot.getValidationType() != null) ? ("alt=\""+dataslot.getValidationType()+"\""):"" %> size="40" />
|
<%
}// end dataslot.isLong() || dataslot.isDouble()
else if (dataslot.isABLDecimal())
{
String dsValue;
Locale locale = bizManage.getLocale();
java.math.BigDecimal bigdecimal = (java.math.BigDecimal) (((com.progress.lang.Decimal)(dataslot.getValue())).getValue());
if(bigdecimal != null)
dsValue = PortalNumberFormatUtil.prepareLocalizedNumber(bigdecimal, bizManage.getLocale());
else
dsValue = "";
%>
" width="50%">
|
<%
}// end dataslot.isABLDecimal()
else if (dataslot.isDecimal())
{
Decimal decimal = (Decimal) dataslot.getValue();
String overallValue = PortalNumberFormatUtil.prepareLocalizedNumber(decimal.getValue(), bizManage.getLocale());
%>
">
|
<%
}// end dataslot.isDecimal()
else if (dataslot.isDateTime() || dataslot.isABLDateTime())
{
String datetimeValue = "";
if(dataslot.isABLDateTime()){
com.progress.lang.DateTimeTZ dateTimeTZ = (com.progress.lang.DateTimeTZ) dataslot.getValue();
java.util.GregorianCalendar gc = (java.util.GregorianCalendar) dateTimeTZ.getValue();
datetimeValue = gc == null ? "" : bizManage.getDate(gc.getTime().getTime(), ptName, dataslot.getName());
}else{
Object anyDateObject = dataslot.getValue();
if (anyDateObject instanceof com.progress.lang.Int64) {
com.progress.lang.Int64 sysDsDate =
(com.progress.lang.Int64) anyDateObject;
if (sysDsDate.getValue() != null) {
Long longVal = sysDsDate.getValue();
datetimeValue = bizManage.getDate(longVal, ptName, dataslot.getName());
}
}
else if (anyDateObject instanceof DateTime) {
DateTime datetime = (DateTime) anyDateObject;
datetimeValue = ( (datetime == null) ? "":
( (datetime.getValue() == null) ? "" :
bizManage.getDate(datetime.getValue().getTime(), ptName, dataslot.getName())));
}
}
dateConvert.append("\tdocument.dataslot.").append(dataslot.getName());
dateConvert.append(".value = date2Long(document.dataslot.").append(dataslot.getName());
dateConvert.append(".value);\n");
dateFix.append("\tlong2Date(document.dataslot.").append(dataslot.getName()).append(");\n");
%>
" width="50%">
|
<%
}// end dataslot.isDateTime()
else if (dataslot.isXML())
{
dataslot.setUpdatable(isDataslotEditable);
%>
">
<%= (String)dataslot.getValue() %>
|
<%
}// end dataslot.isXML()
else if (dataslot.isMap())
{
%>
">
|
<%
} else if (dataslot.isList()){
Vector v = (Vector) dataslot.getValue();
if(v == null){
v = new Vector();
}
Iterator it = v.iterator ();
%>
">
|
<%
}// end dataslot.isMap()
%>
<% } %>
<% } %>
<%-- This is the end of the dataslot table. --%>
<%-- Instruction field for collaborator (Non Editable) --%>