" width="20%">:
<%=((dataslot.isRequired())?" *":"") %>
|
<%
if (dataslot.hasChoices())
{
ArrayList allchoices = dataslot.getChoices();
HashMap choiceLabels = dataslot.getChoiceLabels();
%>
" width="80%">
|
<%
} //end dataslot.hasChoices();
else if (dataslot.isDocument() || dataslot.isObject() || dataslot.isSet() || dataslot.isList())
{
%>
" width="80%"><%= dataslot.getValue().toString() %> |
<%= ((dataslot.isDocument())?"":"") %>
<%
} //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%>
|
<%
} //end dataslot.isABLLongChar()
else if (dataslot.isMultiLine())
{
%>
" width="80%">
|
<%
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()).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());
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())
{
%>
" width="80%">
|
<%
} //end datslot.isBoolean()
else if (dataslot.isString() || dataslot.isURL() || dataslot.isABLCharacter() || dataslot.getName().equals(PortalConstants.STARTTIME))
{
String dsValue = "";
if (dataslot.isABLCharacter())
{
Character charValue = (Character) dataslot.getValue();
dsValue = charValue.getValue();
dsValue = (dsValue == null) ? "" : AimUtil.getHtmlSafeString(dsValue);
}
else
dsValue = AimUtil.getHtmlSafeString(dataslot.getValue().toString());
%>
" width="80%">
class="InptTxt" name="<%= dataslot.getName() %>" value="<%= dsValue %>" <%= ((dataslot.isString())?"maxlength=\""+dataslot.getSize()+"\"":"") %> <%= (dataslot.getValidationType() != null) ? ("alt=\""+dataslot.getValidationType()+"\""):"" %> size="<%= ((dontUpdate && dsValue.length() > 40) ? String.valueOf(dsValue.length() + 3) : "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());
%>
" width="50%">
class="InptTxt" name="<%= dataslot.getName() %>" value="<%= finalValue %>" <%= (dataslot.getValidationType() != null) ? ("alt=\""+dataslot.getValidationType()+"\""):"" %> size="<%= ((dontUpdate && AimUtil.getHtmlSafeString(dataslot.getValue().toString()).length() > 40) ? String.valueOf(AimUtil.getHtmlSafeString(dataslot.getValue().toString()).length()+3) : "40")%>" />
|
<%
}// end dataslot.isLong() || dataslot.isDouble()
else if (dataslot.isDecimal())
{
Decimal decimal = (Decimal) dataslot.getValue();
int precision = decimal.getPrecision();
int scale = decimal.getScale();
String dsValue = PortalNumberFormatUtil.prepareLocalizedNumber(decimal.getValue(), bizManage.getLocale());
%>
" width="80%">
<%= DataUtil.self().getDecimalPresentation(ptname,dataslot,bizManage) %>
|
|
<%
}// end dataslot.isDecimal()
else if (dataslot.isABLDecimal())
{
String dsValue;
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.isDateTime() || dataslot.isABLDateTime())
{
String strDateTime = "";
if(dataslot.isABLDateTime()){
if(dataslot.getValue() != null && dataslot.getValue().toString() != ""){
com.progress.lang.DateTimeTZ ablDate = (com.progress.lang.DateTimeTZ) dataslot.getValue();
if (ablDate.getValue() != null)
strDateTime = bizManage.getDate(ablDate.getValue().getTime().getTime(),ptname,dataslot.getName());
}
}else {
String dsValue=dataslot.getValue().toString();
if (!PortalUtil.isEmpty(dsValue)) {
DateTime datetime = (DateTime) dataslot.getValue();
if (datetime != null) {
strDateTime = bizManage.getDate(datetime.getValue().getTime(),ptname,dataslot.getName());
}
}
}
%>
" width="80%">
|
<%
}// end dataslot.isDateTime()
else if (dataslot.isXML())
{
%>
" width="80%"><%= dataslot.getValue().toString() %>
|
<%
}// end dataslot.isXML()
else if (dataslot.isMap())
{
%>
" width="80%">
|
<%
}// end dataslot.isMap()
%>
<% } %>
<%-- This is the end of the dataslot table. --%>