// Campi da visualizzare del bean
int idx = 1;
for (int i = 0; i < showAttributes.size(); i++)
{
ShowAttribute attribute = showAttributes.get(i);
if (!attribute.isKey())
{
rows += "<rich:column";
// /** Gestione allineamento colonne in funzione del tipo di dato **/
//
// if (attribute.getType().contains("Double") || attribute.getType().contains("Integer") || attribute.getType().contains("Long"))
// {
// rows += " align=\"right\" ";
// }
//
// if (attribute.getType().contains("String"))
// {
// rows += " align=\"left\" ";
// }
//
// if (attribute.getType().contains("Date") || attribute.getType().contains("Boolean"))
// {
// rows += " align=\"center\" ";
// }
//
rows += ">\r\n";
if (!attribute.belongsToRelationship())
{
// Attributi del bean
rows += "\t<f:facet name=\"header\">\r\n";
rows += "\t\t<h:panelGroup style=\"white-space: nowrap;\">\r\n";
rows += "\t\t\t<h:outputText value=\"#{msgs.list_" + beanName + attribute.SeamLabel() + "}\" />\r\n";
rows += "\t\t\t<a4j:region>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "A}\" image=\"../img/asc.gif\" rendered=\"#{order!=" + (idx) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "A}\" image=\"../img/asc_selected.gif\" rendered=\"#{order==" + (idx) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "D}\" image=\"../img/desc.gif\" rendered=\"#{order!=" + (idx + 1) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "D}\" image=\"../img/desc_selected.gif\" rendered=\"#{order==" + (idx + 1) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:status><f:facet name=\"start\"><h:graphicImage value=\"../img/spinner.gif\"/></f:facet></a4j:status>\r\n";
rows += "\t\t\t</a4j:region>\r\n";
rows += "\t\t</h:panelGroup>\r\n";
rows += "\t</f:facet>\r\n";
if (attribute.getIconValues().size() == 0)
{
if (!attribute.isTrans())
{
rows += "\t<h:outputText value=\"#{" + Utils.makeFirstLetterLowerCase(beanName) + attribute.SeamField() + "}\"";
if (attribute.getImplementationType() == AttributeImplementationType.FORMATTEDTEXTAREA)
rows += " escape=\"false\" ";
rows += " >\r\n";
}
else
{
if (attribute.getTransientParameters().equals(""))
{
rows += "\t<h:outputText value=\"#{" + Utils.makeFirstLetterLowerCase(beanName) + attribute.SeamField() + "}\" >\r\n";
}
else
{
rows += "\t<h:outputText value=\"#{" + Utils.makeFirstLetterLowerCase(beanName) + "." + Utils.makeGet(attribute.getName()) + "(" + attribute.getTransientParameters() + ")}\" >\r\n";
}
}
if (attribute.getType().equals("java.util.Date") && !attribute.isListFormatOff())
{
rows += "\t\t<f:convertDateTime pattern=\"#{msgs.Application_DateFormat}\" />\r\n";
}
if (attribute.getType().equals("java.lang.Double") && !attribute.isListFormatOff())
{
rows += "\t\t<f:converter converterId=\"DoubleConverter\" />\r\n";
}
if (attribute.getType().equals("java.lang.Long") && !attribute.isListFormatOff())
{
rows += "\t\t<f:converter converterId=\"LongConverter\" />\r\n";
}
if (attribute.getType().equals("java.lang.Integer") && !attribute.isListFormatOff())
{
rows += "\t\t<f:converter converterId=\"IntegerConverter\" />\r\n";
}
rows += "\t</h:outputText>\r\n";
}
else
{
Vector<String> values = attribute.getIconValues();
for (int k = 0; k < values.size(); k++)
{
rows += "\t<h:graphicImage url=\"../img/" + attribute.getIcons().get(k) + "\" rendered=\"#{" + Utils.makeFirstLetterLowerCase(beanName) + attribute.SeamField() + "==" + values.get(k) + "}\" />\r\n";
}
}
idx += 2;
rows += "</rich:column>\r\n\r\n";
}
else
{
// Attributi dei bean collegati da relazioni
if (attribute.getRelationship().isToMany())
{
// rows += "<rich:column>\r\n";
rows += "\t<f:facet name=\"header\" style=\"white-space: nowrap;\">\r\n";
rows += "\t\t\t<h:outputText value=\"#{msgs.list_" + beanName;
rows += "_" + attribute.getRelationships().get(0).getName();
//rows += attribute.SeamLabel() + "}\" styleClass = \"noWrap\" />\r\n";
rows += attribute.SeamLabel() + "}\" />\r\n";
rows += "\t</f:facet>\r\n";
// Celle senza bordi
rows += "\t<rich:dataTable verticalGridVisible=\"false\" horizontalGridVisible=\"true\" var=\"" + Utils.makeMethod2Field(attribute.getRelationship().getName()) + "\" value=\"#{" + Utils.makeFirstLetterLowerCase(beanName) + "." + Utils.makeMethod2Field(attribute.getRelationship().getName()) + "}\" >\r\n";
rows += "\t\t\t<rich:column";
// if (attribute.getType().contains("Double") || attribute.getType().contains("Integer") || attribute.getType().contains("Long"))
// {
// rows += " align=\"right\" ";
// }
//
// if (attribute.getType().contains("String"))
// {
// rows += " align=\"left\" ";
// }
//
// if (attribute.getType().contains("Date") || attribute.getType().contains("Boolean"))
// {
// rows += " align=\"center\" ";
// }
// Celle senza bordi
//rows += ">\r\n";
rows += " style=\"background-color: transparent; border-left-style: none; border-right-style: none;\" >\r\n";
rows += "\t\t\t<h:outputText value=\"#{" + Utils.makeMethod2Field(attribute.getRelationship().getName()) + attribute.SeamField() + "}\" >\r\n";
if (attribute.getType().equals("java.util.Date"))
{
rows += "\t\t<f:convertDateTime pattern=\"#{msgs.Application_DateFormat}\" />\r\n";
}
if (attribute.getType().equals("java.lang.Double") && !attribute.isListFormatOff())
{
rows += "\t\t\t\t<f:converter converterId=\"DoubleConverter\" />\r\n";
}
if (attribute.getType().equals("java.lang.Long") && !attribute.isListFormatOff())
{
rows += "\t\t\t\t<f:converter converterId=\"LongConverter\" />\r\n";
}
if (attribute.getType().equals("java.lang.Integer") && !attribute.isListFormatOff())
{
rows += "\t\t\t\t<f:converter converterId=\"IntegerConverter\" />\r\n";
}
rows += "\t\t\t</h:outputText>\r\n";
rows += "\t\t</rich:column>\r\n";
rows += "\t</rich:dataTable>\r\n";
rows += "</rich:column>\r\n\r\n";
}
else
{
rows += "\t<f:facet name=\"header\">\r\n";
rows += "\t\t<h:panelGroup style=\"white-space: nowrap;\">\r\n";
rows += "\t\t\t<h:outputText value=\"#{msgs.list_" + beanName;
rows += "_" + attribute.getRelationships().get(0).getName();
rows += attribute.SeamLabel() + "}\" />\r\n";
rows += "\t\t\t<a4j:region>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "A}\" image=\"../img/asc.gif\" rendered=\"#{order!=" + (idx) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "A}\" image=\"../img/asc_selected.gif\" rendered=\"#{order==" + (idx) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "D}\" image=\"../img/desc.gif\" rendered=\"#{order!=" + (idx + 1) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:commandButton action=\"#{" + beanName + "Manager.orderBy" + (i + 1) + "D}\" image=\"../img/desc_selected.gif\" rendered=\"#{order==" + (idx + 1) + "}\" ajaxSingle=\"true\" reRender=\"" + Utils.makeFirstLetterLowerCase(beanName) + "\"/>\r\n";
rows += "\t\t\t<a4j:status><f:facet name=\"start\"><h:graphicImage value=\"../img/spinner.gif\"/></f:facet></a4j:status>\r\n";
rows += "\t\t\t</a4j:region>\r\n";
rows += "\t\t</h:panelGroup>\r\n";
rows += "\t</f:facet>\r\n";
rows += "\t<h:outputText value=\"#{" + Utils.makeFirstLetterLowerCase(beanName);
for (int k = 0; k < attribute.getRelationships().size(); k++)
rows += "." + Utils.makeMethod2Field(attribute.getRelationships().get(k).getName());
rows += "." + attribute.getName() + "}\" >\r\n";
if (attribute.getType().equals("java.util.Date") && !attribute.isListFormatOff())
{
rows += "\t\t<f:convertDateTime pattern=\"#{msgs.Application_DateFormat}\" />\r\n";
}
if (attribute.getType().equals("java.lang.Double") && !attribute.isListFormatOff())
{
rows += "\t\t<f:converter converterId=\"DoubleConverter\" />\r\n";
}
if (attribute.getType().equals("java.lang.Long") && !attribute.isListFormatOff())
{
rows += "\t\t<f:converter converterId=\"LongConverter\" />\r\n";
}
if (attribute.getType().equals("java.lang.Integer") && !attribute.isListFormatOff())
{
rows += "\t\t<f:converter converterId=\"IntegerConverter\" />\r\n";
}
rows += "\t</h:outputText>\r\n";