net.anotheria.asg.generator.view.jsp.TablePageJspGenerator Maven / Gradle / Ivy
The newest version!
package net.anotheria.asg.generator.view.jsp;
import java.util.List;
import net.anotheria.asg.generator.GeneratedJSPFile;
import net.anotheria.asg.generator.meta.MetaDocument;
import net.anotheria.asg.generator.meta.MetaProperty;
import net.anotheria.asg.generator.meta.MetaTableProperty;
import net.anotheria.asg.generator.view.CMSMappingsConfiguratorGenerator;
import net.anotheria.asg.generator.view.action.ModuleBeanGenerator;
import net.anotheria.asg.generator.view.meta.MetaModuleSection;
import net.anotheria.util.StringUtils;
/**
* Generates the jsps for the edit view.
*
* @author another
* @version $Id: $Id
*/
public class TablePageJspGenerator extends AbstractJSPGenerator {
/**
* generate.
*
* @param section a {@link net.anotheria.asg.generator.view.meta.MetaModuleSection} object.
* @param doc a {@link net.anotheria.asg.generator.meta.MetaDocument} object.
* @param table a {@link net.anotheria.asg.generator.meta.MetaTableProperty} object.
* @return a {@link net.anotheria.asg.generator.GeneratedJSPFile} object.
*/
public GeneratedJSPFile generate(MetaModuleSection section, MetaDocument doc, MetaTableProperty table){
GeneratedJSPFile jsp = new GeneratedJSPFile();
startNewJob(jsp);
jsp.setName(getContainerPageName(doc, table));
resetIdent();
List columns = table.getColumns();
String formName = CMSMappingsConfiguratorGenerator.getContainerEntryFormName(doc, table);
append(getBaseJSPHeader());
appendString("");
appendString("");
increaseIdent();
appendString("");
increaseIdent();
appendString("Edit "+doc.getName()+StringUtils.capitalize(table.getName())+" ");
generatePragmas();
appendString("");
decreaseIdent();
appendString("");
appendString("");
increaseIdent();
appendString("");
increaseIdent();
appendString("");
appendIncreasedString("Pos ");
for (int i=0; i"+StringUtils.capitalize(table.extractSubName(p))+"");
}
appendIncreasedString(" ");
appendString(" ");
appendString("");
increaseIdent();
appendString("\">");
increaseIdent();
appendString(" ");
for (int i=0; i ");
}
String parameter = "pId= ";
parameter += "&pPosition= ";
appendString(""+getDeleteImage("delete row")+" ");
decreaseIdent();
appendString(" ");
decreaseIdent();
appendString(" ");
decreaseIdent();
appendString("
");
appendString("
");
decreaseIdent();
appendString("");
increaseIdent();
//TODO removing of "html:" may cause some problems...
//appendString("");
appendString(" ");
appendString("");
appendString("");
decreaseIdent();
appendString("");
appendString("");
append(getBaseJSPFooter());
return jsp;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy