"><%= dataslot.getLabel() %>:
<% if(dataslot.isRequired()){ %> * <% } %> |
<%
if (dataslot.hasChoices())
{
ArrayList allchoices = dataslot.getChoices();
HashMap choiceLabels = dataslot.getChoiceLabels();
%>
" width="50%">
|
<%
} //end dataslot.hasChoices();
else if (dataslot.isDocument() || dataslot.isObject() || dataslot.isSet() || dataslot.isMap() || dataslot.isList())
{
%>
" width="50%"><%= dataslot.getValue().toString() %>
<%
if(dataslot.isDocument()) {
%>
<%
}
%>
|
<%= ((dataslot.isDocument())?"":"") %>
<%
} //end dataslot.isDocument() || dataslot.isObject() || dataslot.isSet() || dataslot.isMap() || dataslot.isList()
else if (dataslot.isMultiLine())
{
%>
" width="50%">
|
<%
} //end dataslot.isMultiLine()
else if (dataslot.isBoolean() || dataslot.isABLLogical())
{
%>
" width="50%">
|
<%
} //end dataslot.isBoolean()
else if (dataslot.isString() || dataslot.isURL() || dataslot.isABLCharacter() || dataslot.isABLLongChar())
{
String type = "text";
if(dataslot.isPassword()){
type = "password";
}
String dsValue = "";
if (dataslot.isABLCharacter() || dataslot.isABLLongChar())
{
Character charValue = (Character) dataslot.getValue();
dsValue = charValue.getValue();
dsValue = (dsValue == null) ? "" : AimUtil.getHtmlSafeString(dsValue);
}
else
dsValue = AimUtil.getHtmlSafeString(dataslot.getValue().toString());
%>
" width="50%">
class="InptTxt" name="<%= dataslot.getName() %>" value="<%= dsValue %>" <%= ((dataslot.isString())?"maxlength=\""+dataslot.getSize()+"\"":"") %> 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()+"\"":"") %> size="40" <%= (dataslot.getValidationType() != null) ? ("alt=\""+dataslot.getValidationType()+"\""):"" %>/>
|
<%
} //end dataslot.isLong() || dataslot.isDouble()
else if (dataslot.isDecimal())
{
Locale locale = bizManage.getLocale();
Decimal decimal = (Decimal) dataslot.getValue();
String dsValue = PortalNumberFormatUtil.prepareLocalizedNumber(decimal.getValue(), locale);
%>
" width="50%">
<%= DataUtil.self().getDecimalPresentation(dataslot.getName(), decimal.getPrecision(), decimal.getScale(), dsValue, dataslot.isRequired(), dontUpdate, dataslot.getLabel(), locale) %>
|
|
<%
} //end dataslot.isDecimal()
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.isDateTime() || dataslot.isABLDateTime())
{
String strDateTime = "";
if(dataslot.isABLDateTime()){
java.util.GregorianCalendar gc = (java.util.GregorianCalendar) (((com.progress.lang.DateTimeTZ)(dataslot.getValue())).getValue());
if(gc != null)
strDateTime = (gc == null || gc.getTime().toString().length() == 0 )? "" : bizManage.getDate(gc.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());
}
}
}
String dateFmt = DateTimeUtils.getJSCalendarDateFormat(ptname, dataslot.getName(), bizManage.getLocale(), bizManage.getName());
dateConvert.append("\tdocument.getElementById('").append(dataslot.getName());
dateConvert.append("').value = sbm.date2Long(document.getElementById('").append(dataslot.getName());
dateConvert.append("').value,'").append(dateFmt).append("');\n");
dateFix.append("\tlong2Date(document.getElementById('").append(dataslot.getName()).append("');\n");
%>
" width="50%">
|
<%
} //end dataslot.isDateTime()
else if (dataslot.isXML())
{
%>
<%= ((dataslot.isXML())?"":"") %>
" width="50%">
<%= dataslot.getValue().toString() %>
|
<% } %>
<% } %>