Search in sources :

Example 1 with PrinterDefinitionFinderOutRowDto

use of org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutRowDto in project jaffa-framework by jaffa-projects.

the class PrinterDefinitionFinderTx method buildDto.

// .//GEN-END:_buildCriteria_3_be
// .//GEN-BEGIN:_buildDto_1_be
private PrinterDefinitionFinderOutDto buildDto(UOW uow, Collection results, PrinterDefinitionFinderInDto input) throws UOWException {
    PrinterDefinitionFinderOutDto output = new PrinterDefinitionFinderOutDto();
    for (Iterator i = results.iterator(); i.hasNext(); ) {
        PrinterDefinitionFinderOutRowDto row = new PrinterDefinitionFinderOutRowDto();
        PrinterDefinition printerDefinition = (PrinterDefinition) i.next();
        // .//GEN-END:_buildDto_1_be
        // Add custom code before all the setters //GEN-FIRST:_buildDto_1
        // .//GEN-LAST:_buildDto_1
        // .//GEN-BEGIN:_buildDto_PrinterId_1_be
        row.setPrinterId(printerDefinition.getPrinterId());
        // .//GEN-END:_buildDto_PrinterId_1_be
        // .//GEN-BEGIN:_buildDto_Description_1_be
        row.setDescription(printerDefinition.getDescription());
        // .//GEN-END:_buildDto_Description_1_be
        // .//GEN-BEGIN:_buildDto_SiteCode_1_be
        row.setSiteCode(printerDefinition.getSiteCode());
        // .//GEN-END:_buildDto_SiteCode_1_be
        // .//GEN-BEGIN:_buildDto_LocationCode_1_be
        row.setLocationCode(printerDefinition.getLocationCode());
        // .//GEN-END:_buildDto_LocationCode_1_be
        // .//GEN-BEGIN:_buildDto_Remote_1_be
        row.setRemote(printerDefinition.getRemote());
        // .//GEN-END:_buildDto_Remote_1_be
        // .//GEN-BEGIN:_buildDto_RealPrinterName_1_be
        row.setRealPrinterName(printerDefinition.getRealPrinterName());
        // .//GEN-END:_buildDto_RealPrinterName_1_be
        // .//GEN-BEGIN:_buildDto_OutputType_1_be
        row.setOutputType(printerDefinition.getOutputType());
        // .//GEN-END:_buildDto_OutputType_1_be
        // .//GEN-BEGIN:_buildDto_ScaleToPageSize_1_be
        row.setScaleToPageSize(printerDefinition.getScaleToPageSize());
        // .//GEN-END:_buildDto_ScaleToPageSize_1_be
        // Add custom code to pass values to the dto //GEN-FIRST:_buildDto_2
        // .//GEN-LAST:_buildDto_2
        // .//GEN-BEGIN:_buildDto_3_be
        output.addRows(row);
    }
    return output;
}
Also used : PrinterDefinition(org.jaffa.modules.printing.domain.PrinterDefinition) PrinterDefinitionFinderOutDto(org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutDto) PrinterDefinitionFinderOutRowDto(org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutRowDto)

Example 2 with PrinterDefinitionFinderOutRowDto

use of org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutRowDto in project jaffa-framework by jaffa-projects.

the class PrinterDefinitionFinderForm method populateRows.

// .//GEN-END:_doValidate_2_be
// .//GEN-BEGIN:_populateRows_1_be
/**
 * This will populate the input GridModel with the data in the finderOutDto of the Component.
 * @param rows The GridModel object to populate.
 */
public void populateRows(GridModel rows) {
    rows.clearRows();
    PrinterDefinitionFinderOutDto outputDto = (PrinterDefinitionFinderOutDto) ((PrinterDefinitionFinderComponent) getComponent()).getFinderOutDto();
    if (outputDto != null) {
        GridModelRow row;
        for (int i = 0; i < outputDto.getRowsCount(); i++) {
            PrinterDefinitionFinderOutRowDto rowDto = outputDto.getRows(i);
            row = rows.newRow();
            row.addElement("printerId", rowDto.getPrinterId());
            row.addElement("description", rowDto.getDescription());
            row.addElement("siteCode", rowDto.getSiteCode());
            row.addElement("locationCode", rowDto.getLocationCode());
            row.addElement("remote", new CheckBoxModel((rowDto.getRemote() != null ? rowDto.getRemote() : Boolean.FALSE)));
            row.addElement("realPrinterName", rowDto.getRealPrinterName());
            row.addElement("outputType", rowDto.getOutputType());
            row.addElement("scaleToPageSize", rowDto.getScaleToPageSize());
        // .//GEN-END:_populateRows_1_be
        // Add custom code for the row //GEN-FIRST:_populateRows_1
        // .//GEN-LAST:_populateRows_1
        // .//GEN-BEGIN:_populateRows_2_be
        }
    }
}
Also used : PrinterDefinitionFinderOutDto(org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutDto) PrinterDefinitionFinderOutRowDto(org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutRowDto)

Aggregations

PrinterDefinitionFinderOutDto (org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutDto)2 PrinterDefinitionFinderOutRowDto (org.jaffa.modules.printing.components.printerdefinitionfinder.dto.PrinterDefinitionFinderOutRowDto)2 PrinterDefinition (org.jaffa.modules.printing.domain.PrinterDefinition)1