Page number instead of number of entries

Hello
I have a requirement for changing the number of entries in KM to page numbers.
So I need to change:
1-10 11-20 21-24
to
1 2 3
I found a thread on sdn about this requirement, but there wasn't much information. It just said to write your own Collection Renderer.
I was able to add something between the breadcrumb (showing the map you are on the moment) and page numbers. So I still don't know where the 'page numbers' are added?
Is there anyone with experience? Or ideas?
Thanks!
Christof
The decompiled Collection Renderer:
package be.kindengezin.wcm.rendering.collection.cm;
// FrontEnd Plus GUI for JAD
// DeCompiled : CollectionListRenderer.class
import com.sap.tc.logging.Location;
import com.sap.tc.logging.LogController;
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.enum.CellHAlign;
import com.sapportals.htmlb.enum.CellVAlign;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.rendering.IPageContext;
import com.sapportals.wcm.WcmException;
import com.sapportals.wcm.control.util.EmptyComponent;
import com.sapportals.wcm.control.util.FolderSettings;
import com.sapportals.wcm.control.util.property.*;
import com.sapportals.wcm.rendering.base.*;
import com.sapportals.wcm.rendering.collection.LightCollectionRenderer;
//import com.sapportals.wcm.rendering.collection.cm.PropertyColumnRenderer;
//import com.sapportals.wcm.rendering.collection.cm.PropertyHeaderRenderer;
import com.sapportals.wcm.rendering.readymades.EmptyCollectionInfo;
import com.sapportals.wcm.rendering.resource.IResourceRenderer;
import com.sapportals.wcm.rendering.util.HtmlRendererUtil;
import com.sapportals.wcm.repository.*;
import com.sapportals.wcm.repository.service.IRepositoryServiceFactory;
import com.sapportals.wcm.repository.service.layout.IDebugContainer;
import com.sapportals.wcm.repository.service.layout.customizing.*;
import com.sapportals.wcm.service.propertyconfig.*;
import com.sapportals.wcm.util.logging.LoggingFormatter;
import com.sapportals.wcm.util.profiler.IProfiler;
import com.sapportals.wcm.util.profiler.Profiler;
import com.sapportals.wdf.WdfException;
import java.util.*;
import to.work.PropertyColumnRenderer;
import to.work.PropertyHeaderRenderer;
// Referenced classes of package com.sapportals.wcm.rendering.collection.cm:
//                 PropertyHeaderRenderer, PropertyColumnRenderer
public class CollectionListRenderer extends LightCollectionRenderer
     protected class HeaderItem
          private int rowSpan;
          private int colSpan;
          private IMetaName labelMetaName;
          private IPropertyColumn column;
          private boolean processed;
          public void setRowSpan(int row)
               rowSpan = row;
          public int getRowSpan()
               return rowSpan;
          public void setColSpan(int col)
               colSpan = col;
          public int getColSpan()
               return colSpan;
          public void setLabelMetaName(IMetaName column)
               labelMetaName = column;
          public IMetaName getLabelMetaName()
               return labelMetaName;
          public void setPropertyColumn(IPropertyColumn column)
               this.column = column;
          public IPropertyColumn getPropertyColumn()
               return column;
          public String toString()
               return "Item:  RowSpan=" + rowSpan + "; ColSpan=" + colSpan + "; PropertyColumn=" + getLabelMetaName();
          public HeaderItem()
               rowSpan = 0;
               colSpan = 0;
               labelMetaName = null;
               column = null;
               processed = false;
          public HeaderItem(int rowSpan, int colSpan, IMetaName metaName, IPropertyColumn column)
               this.rowSpan = 0;
               this.colSpan = 0;
               labelMetaName = null;
               this.column = null;
               processed = false;
               this.rowSpan = rowSpan;
               this.colSpan = colSpan;
               labelMetaName = metaName;
               this.column = column;
     private static final String PROFILER_PATH_UI_RENDER = "/KM/FLEXUI/RENDER/UI";
     private static final String PROFILER_PATH_UI_RENDER_ROW = "/KM/FLEXUI/RENDER/UI/ROW ";
     private static final String PROFILER_PATH_UI_RENDER_GETPROPS = "/KM/FLEXUI/RENDER/UI/GETPROPS";
     private static IProfiler s_profiler = Profiler.getInstance();
     private static Location log;
     private static int PAGER_LINKS_DEFAULT = 5;
     private static final CellVAlign VERTICAL_ALIGN;
     private int MaxNumberOfRows;
     private int noOfColumns;
     private static IPropertyName DEFAULT_PROP_NAMES[];
     private IPropertyPosition propertiesPositions[];
     private static final String NEXT_LINE_START_COLUMN = "col";
     private static final String NEXT_LINE_METANAME = "metaName";
     private static final String NEXT_LINE_METANAME_MODIFIERS = "metaNameModifiers";
     private boolean debug;
     private boolean isManualOrdered;
     public CollectionListRenderer()
          MaxNumberOfRows = 10;
          noOfColumns = 0;
          debug = false;
          isManualOrdered = false;
          initParameterSettings();
          set508enabled(true);
     private void initParameterSettings()
          IParameterName supportedParameters[] = {
               ICollectionRendererParameterNameConst.BREADCRUMBSTYLE, ICollectionRendererParameterNameConst.BREADCRUMBVISIBILITYSTYLE, ICollectionRendererParameterNameConst.SHOWFOLDERTITLE, ICollectionRendererParameterNameConst.SHOWFILESSTYLE, ICollectionRendererParameterNameConst.SORT_ENABLED, ICollectionRendererParameterNameConst.LINKSSTYLE, ICollectionRendererParameterNameConst.SHOWFOLDERSSTYLE, ICollectionRendererParameterNameConst.SHOW_HIDDEN, ICollectionRendererParameterNameConst.COLUMNS, IResourceRendererParameterNameConst.ICONSTYLE,
               ICollectionRendererParameterNameConst.ROWS, ICollectionRendererParameterNameConst.ROWSPACING, ICollectionRendererParameterNameConst.COLUMNSPACING, ICollectionRendererParameterNameConst.MASSACTIONSTYLE, ICollectionRendererParameterNameConst.UI_GROUP_MASS, IResourceRendererParameterNameConst.ITEMACTIONSTYLE, ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, ICollectionRendererParameterNameConst.ROWBACKGROUNDSTYLE, ICollectionRendererParameterNameConst.PROPERTYCOLUMNS, ICollectionRendererParameterNameConst.BACKGROUNDIMAGEPATH,
               ICollectionRendererParameterNameConst.BACKGROUNDIMAGESTYLE, ICollectionRendererParameterNameConst.SORT_PROPERTY, ICollectionRendererParameterNameConst.COMPONENTS, ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, ICollectionRendererParameterNameConst.SORT_ORDER, ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE, ICollectionRendererParameterNameConst.UI_GROUP_COLLECTION, ICollectionRendererParameterNameConst.RESOURCE_LIST_FILTER, ICollectionRendererParameterNameConst.RESIZEHEIGHTSTYLE, ICollectionRendererParameterNameConst.RESIZEWIDHTSTYLE,
               ICollectionRendererParameterNameConst.FILTEREXTENSION, ICollectionRendererParameterNameConst.FILTERMIMETYPE, ICollectionRendererParameterNameConst.FILTERRESOURCETYPE, IResourceRendererParameterNameConst.UI_GROUP_RESOURCE, ICollectionRendererParameterNameConst.PAGER_LINK_COUNT, ICollectionRendererParameterNameConst.EMPTY_COLLECTION_FILE, ICollectionRendererParameterNameConst.EMPTY_COLLECTION_KEY, ICollectionRendererParameterNameConst.EMPTY_COLLECTION_STYLE
          setSupportedParameters(supportedParameters);
          IParameters parameters = getParameters();
          parameters.setParameter(ICollectionRendererParameterNameConst.BREADCRUMBSTYLE, "horizontal");
          parameters.setParameter(ICollectionRendererParameterNameConst.BREADCRUMBVISIBILITYSTYLE, "standard");
          parameters.setParameter(ICollectionRendererParameterNameConst.SHOWFILESSTYLE, "all");
          parameters.setParameter(ICollectionRendererParameterNameConst.LINKSSTYLE, "all");
          parameters.setParameter(ICollectionRendererParameterNameConst.SHOWFOLDERSSTYLE, "all");
          parameters.setParameter(ICollectionRendererParameterNameConst.MASSACTIONSTYLE, "off");
          parameters.setParameter(IResourceRendererParameterNameConst.ITEMACTIONSTYLE, "hover");
          parameters.setParameter(ICollectionRendererParameterNameConst.SHOWFOLDERTITLE, false);
          parameters.setParameter(ICollectionRendererParameterNameConst.GRIDORDERSTYLE, "columnmajor");
          parameters.setParameter(ICollectionRendererParameterNameConst.ROWS, MaxNumberOfRows);
          parameters.setParameter(ICollectionRendererParameterNameConst.ROWSPACING, 0);
          parameters.setParameter(ICollectionRendererParameterNameConst.SORT_ENABLED, true);
          parameters.setParameter(ICollectionRendererParameterNameConst.COLUMNSPACING, 0);
          parameters.setParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "off");
          parameters.setParameter(ICollectionRendererParameterNameConst.ROWBACKGROUNDSTYLE, "TRANSPARENT");
          parameters.setParameter(ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE, "hover");
          parameters.setParameter(ICollectionRendererParameterNameConst.PROPERTYCOLUMNS, "rnd:icon(noTitle/noColumnSpacing),rnd:displayname(contentLink)");
          parameters.setParameter(ICollectionRendererParameterNameConst.RESOURCE_LIST_FILTER, "default");
          parameters.setParameter(ICollectionRendererParameterNameConst.SHOW_HIDDEN, false);
          parameters.setParameter(ICollectionRendererParameterNameConst.RESIZEHEIGHTSTYLE, "compact");
          parameters.setParameter(ICollectionRendererParameterNameConst.RESIZEWIDHTSTYLE, "compact");
          parameters.setParameter(ICollectionRendererParameterNameConst.PAGER_LINK_COUNT, PAGER_LINKS_DEFAULT);
          parameters.setParameter(ICollectionRendererParameterNameConst.EMPTY_COLLECTION_STYLE, "off");
     public int renderListHeader(FormLayout grid, int row)
          throws WcmException
          if(isExactlyValue(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "off"))
               return row;
          IPropertyPosition position = null;
          IPropertyColumn iterColumns[] = getColumnsList();
          boolean existsResource = getResourceList().size() != 0;
          String propertyHeaderColumnStyle = getParameters().getParameter(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "Table Title Color");
          String headerClassStyle = HtmlRendererUtil.getHeaderClassStyle(propertyHeaderColumnStyle);
          if(headerClassStyle == null)
               headerClassStyle = "";
          FormLayoutCell cell = null;
          if(existsResource)
               cell = grid.addComponent(row, 1, new HTMLFragment(""));
               cell.setStyle(headerClassStyle);
          int rowSpan = 0;
          int columnSpan = 0;
          int line = 1;
          int lineNew = 0;
          int column = 1;
          if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
               column++;
          int startRow = row;
          boolean rowHasTitle = false;
          propertiesPositions = new IPropertyPosition[iterColumns.length];
          PropertyHeaderRenderer sortHeader = new PropertyHeaderRenderer(getProxy(), this, getBundleHandler(), getChildCountMetaName(getParentCollection()), isManualOrdered, getIRS().getSortDefintion(), getResourceContext().getLocale());
          IMetaName metaName = null;
          for(int i = 0; i < iterColumns.length && existsResource; i++)
               if(iterColumns<i> != null)
                    rowSpan = 0;
                    columnSpan = 0;
                    position = PropertyColumnFactory.getInstance().getPosition(iterColumns<i>);
                    if(position != null)
                         lineNew = position.getRow();
                         if(line != lineNew)
                              column = position.getColumn();
                              if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
                                   column++;
                              line = lineNew;
                              if(rowHasTitle)
                                   row++;
                                   rowHasTitle = false;
                         rowSpan = position.getSpanRow();
                         columnSpan = position.getSpanColumn();
                    propertiesPositions<i> = PropertyColumnFactory.getInstance().getPropertyPosition(row, rowSpan, column, columnSpan);
                    boolean is508Required = false;
                    try
                         is508Required = getProxy().getDynamicPage().getPageContext().requiresSection508Rendering();
                    catch(Exception ex)
                         log.errorT("Could not retrieve 508 mode for proxy <" + getProxy() + ">: " + LoggingFormatter.extractCallstack(ex));
                    metaName = PropertyHeaderRenderer.getMetaNameForTitle(iterColumns<i>, is508Required);
                    if(metaName != null)
                         rowHasTitle = true;
                    if(!getParameters().getParameter(ICollectionRendererParameterNameConst.SORT_ENABLED, true))
                         sortHeader.setSortEnabledParameter(false);
                    if(metaName != null)
                         if(columnSpan != 0)
                              cell = grid.addComponent(row, 1, sortHeader.createSortLink(metaName));
                              cell.setColspan(columnSpan);
                         } else
                              cell = grid.addComponent(row, column, sortHeader.createSortLink(metaName));
                         String padding[] = HtmlRendererUtil.getPropertyPaddingValues(iterColumns<i>, metaName);
                         cell.setHorizontalAlignment(PropertyColumnFactory.getInstance().getHAlign(iterColumns<i>));
                         cell.setVerticalAlignment(PropertyColumnFactory.getInstance().getVAlign(iterColumns<i>));
                         if(padding != null)
                              cell.setPaddingTop(padding[0]);
                              cell.setPaddingRight(padding[1]);
                              cell.setPaddingBottom(padding[2]);
                              cell.setPaddingLeft(padding[3]);
                    column++;
                    if(columnSpan != 0)
                         column += columnSpan;
                    if(!iterColumns<i>.contains("noColumnSpacing") && column < noOfColumns)
                         cell = grid.addComponent(row, column, EmptyComponent.render());
                         if(!"0".equals(getColumnSpacing()))
                              cell.setWidth(getColumnSpacing());
                         cell.setVerticalAlignment(VERTICAL_ALIGN);
                         column++;
          if(!rowHasTitle)
               row--;
          setClassStyleForm(headerClassStyle, grid, startRow, row, noOfColumns);
          return ++row;
     public int renderListFooter(FormLayout grid, int row)
          throws WcmException
          boolean existsResource = getResourceList().size() != 0;
          if(!isExactlyValue(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "off"))
               String propertyHeaderColumnStyle = getParameters().getParameter(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "Table Title Color");
               String headerClassStyle = HtmlRendererUtil.getHeaderClassStyle(propertyHeaderColumnStyle);
               if(headerClassStyle == null)
                    headerClassStyle = "";
               FormLayoutCell cell = null;
          return row;
     public ILayoutObject getNewInstance()
          return initNewInstance(new CollectionListRenderer());
     private String getChildCountMetaName(IResource res)
          throws WcmException
          if(res == null)
               return null;
          IResourceRenderer resourceRenderer = getRenderer(res);
          String par = resourceRenderer.getParameters().getParameter(IResourceRendererParameterNameConst.SHOWCHILDCOUNTSTYLE);
          if(par == null)
               return null;
          String resultMetaNameID = null;
          if(par.equals("folders/files"))
               resultMetaNameID = "rnd:childcount_both";
          else
          if(par.equals("sum"))
               resultMetaNameID = "rnd:childcount_sum";
          else
          if(par.equals("only files"))
               resultMetaNameID = "rnd:childcount_files";
          else
          if(par.equals("only folders"))
               resultMetaNameID = "rnd:childcount_folders";
          if(resultMetaNameID != null)
               IMetaName metaName = getPropertyConfigurationService().getMetaModel().searchById(resultMetaNameID);
               if(metaName != null)
                    return getEncodedSortProperty(metaName);
          return null;
     private String getEncodedSortProperty(IMetaName metaName)
          if(metaName.getComposedOfMetaNames() != null)
               IMetaNameList metaList = metaName.getComposedOfMetaNames();
               if(metaList.contains(metaName))
                    return metaName.getId();
               if(metaList.size() == 1)
                    IMetaName composedMetaName = metaList.get(0);
                    return composedMetaName.getId();
               } else
                    return metaName.getId();
          } else
               return metaName.getId();
     public static Vector getIMetaNameTypeText(IPropertyColumn propertyColumn, int col)
          Hashtable metaNameHash = null;
          Vector metaNameVector = null;
          IMetaName currentMetaName = null;
          IPropertyWithModifiersList propertyWithModifiers = propertyColumn.getPropertyWithModifier();
          for(int i = 0; i < propertyWithModifiers.size(); i++)
               currentMetaName = propertyWithModifiers.get(i).getMetaName();
               if(currentMetaName != null && "Text".equals(currentMetaName.getType()) && propertyWithModifiers.size() != 1)
                    metaNameHash = new Hashtable();
                    metaNameHash.put("metaName", currentMetaName);
                    metaNameHash.put("col", Integer.toString(col));
                    if(propertyWithModifiers.get(i).getConfigModifierList() != null)
                         metaNameHash.put("metaNameModifiers", propertyWithModifiers.get(i));
                    if(metaNameVector == null)
                         metaNameVector = new Vector();
                    metaNameVector.add(metaNameHash);
          return metaNameVector;
     private static boolean[] isNextLineColumnNeeded(IPropertyColumn propertyColumns[])
          boolean result[] = new boolean[propertyColumns.length];
          IMetaName currentMetaName = null;
          for(int j = 0; j < propertyColumns.length; j++)
               IPropertyColumn propertyColumn = propertyColumns[j];
               result[j] = false;
               IPropertyWithModifiersList propertyWithModifiers = propertyColumn.getPropertyWithModifier();
               for(int i = 0; i < propertyWithModifiers.size(); i++)
                    currentMetaName = propertyWithModifiers.get(i).getMetaName();
                    if(currentMetaName != null && "Text".equals(currentMetaName.getType()) && propertyWithModifiers.size() != 1)
                         if(log.beDebug())
                              log.debugT("Found meta name <" + currentMetaName + "> in property column <" + propertyColumn + "> that defines we need a new line column");
                         result[j] = true;
          return result;
     private IPropertyConfigurationService getPropertyConfigurationService()
          throws WcmException
          return (IPropertyConfigurationService)ResourceFactory.getInstance().getServiceFactory().getService("PropertyConfigurationService");
     public final void setColumnsList(IPropertyColumn list[])
          throws WcmException
          getIRS().setPropertyColumns(list);
     public IPropertyColumn[] getColumnsList()
          throws WcmException
          return getIRS().getPropertyColumns();
     private IPropertyColumn[] createCollectionColumns()
          String columnsString = getParameters().getParameter(ICollectionRendererParameterNameConst.PROPERTYCOLUMNS, "rnd:icon(noTitle/noColumnSpacing),rnd:displayname(contentLink)");
          return PropertyColumnFactory.getInstance().parseProperty(columnsString);
     public Component renderUI()
          throws WcmException
          s_profiler.start("/KM/FLEXUI/RENDER/UI", com.sapportals.wcm.util.profiler.IProfiler.Level.MEDIUM);
          try
               if(getProxy().isDebugEnabled())
                    writeDebugInformation();
               setColumnsList(createCollectionColumns());
               FormLayout grid = new FormLayout();
               grid.setMargin("0", "0", "0", "0");
               grid.setWidth("");               
               FormLayoutCell cell = null;
               grid.setDebugMode(debug);
               int row = 1;
               grid.addComponent(++row, 1, new TextView("CH-BOVENALL"));
               if(!isVisible())
                    FormLayout formlayout = grid;
                    return formlayout;
               if(getParameter(ICollectionRendererParameterNameConst.SHOWFOLDERTITLE, false))
                    cell = grid.addComponent(row, 1, renderFolderTitle());
                    cell.setColspan(10);
                    cell.setPaddingTop("2");
                    cell.setPaddingBottom("3");
                    row++;
               IResourceList resourcelist = getResourceList();
               if(!getParameters().isExactlyValue(ICollectionRendererParameterNameConst.EMPTY_COLLECTION_STYLE, "off") && resourcelist != null && resourcelist.size() == 0)
                    cell = grid.addComponent(row, 1, new EmptyCollectionInfo(getProxy(), getParameters()));
                    cell.setColspan(10);
                    cell.setHorizontalAlignment(CellHAlign.LEFT);
                    row++;
               noOfColumns = PropertyColumnFactory.getNoOfColumn(getColumnsList(), MaxNumberOfRows);
               int column = 1;
               if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
                    column++;
                    noOfColumns++;
               if(getParentCollection() != null)
                    FolderSettings currFolderSettings = new FolderSettings(getParentCollection());
                    isManualOrdered = currFolderSettings.getOrderedFlag();
               row = renderListHeader(grid, row);
               boolean widthStrech = getParameters().getParameter(ICollectionRendererParameterNameConst.RESIZEWIDHTSTYLE, "compact").equals("stretch");
               boolean heightStrech = getParameters().getParameter(ICollectionRendererParameterNameConst.RESIZEHEIGHTSTYLE, "compact").equals("stretch");
               int maxnumberOfElements = getStartRow() + getParameters().getParameter(ICollectionRendererParameterNameConst.ROWS, MaxNumberOfRows);
               if(maxnumberOfElements > resourcelist.size())
                    maxnumberOfElements = resourcelist.size();
               int rowHeightPercent = 0;
               if(heightStrech && maxnumberOfElements != 0)
                    rowHeightPercent = 100 / maxnumberOfElements;
               IResourceList renderlist = resourcelist.subList(getStartRow(), maxnumberOfElements);
               IResourceListIterator iter = renderlist.listIterator();
               IResource res = null;
               boolean lightStyleClass = true;
               String classStyle = "";
               boolean alternatingMode = isExactlyValue(ICollectionRendererParameterNameConst.ROWBACKGROUNDSTYLE, "ALTERNATING");
               boolean lineSeparatedMode = isExactlyValue(ICollectionRendererParameterNameConst.ROWBACKGROUNDSTYLE, "LINE_SEPARATED");
               if(alternatingMode || lineSeparatedMode)
                    grid.addComponent(row, 1, HtmlRendererUtil.importStyles());
                    row++;
               if(getColumnsList() != null)
                    IPropertyNameList propertynamelist = PropertyColumnFactory.getInstance().getPropertyNameList(getColumnsList());
                    for(int i = 0; i < DEFAULT_PROP_NAMES.length; i++)
                         if(DEFAULT_PROP_NAMES<i> != null)
                              propertynamelist.add(DEFAULT_PROP_NAMES<i>);
                    s_profiler.start("/KM/FLEXUI/RENDER/UI/GETPROPS", com.sapportals.wcm.util.profiler.IProfiler.Level.MEDIUM);
                    try
                         getProxy().getAmalgamation().readProperties(renderlist, propertynamelist);
                    finally
                         s_profiler.stop("/KM/FLEXUI/RENDER/UI/GETPROPS");
                    IPropertyPosition positions[] = getPositionArray(getColumnsList());
                    boolean nextColumns[] = isNextLineColumnNeeded(getColumnsList());
                    boolean selectionActive = !getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off");
                    List paddings = getPaddingList(getColumnsList(), selectionActive);
                    while(iter.hasNext())
                         res = iter.next();
                         if(alternatingMode)
                              classStyle = "urCellBgPlain";
                              if(!lightStyleClass)
                                   classStyle = "urSTbvCellAlt";
                         row = renderFormRow(grid, row, 1, res, classStyle, rowHeightPercent, propertynamelist, positions, nextColumns, paddings);
                         if(lineSeparatedMode && iter.hasNext())
                              cell = grid.addComponent(row, 1, HtmlRendererUtil.renderLineSeparator("urCellBgPlain", 1));
                              cell.setColspan(noOfColumns);
                              row++;
                         lightStyleClass = !lightStyleClass;
               row = renderListFooter(grid, row);
               if(widthStrech)
                    grid.setWidth("100%");
               FormLayout formlayout1 = grid;
               IParameters parameters = getParameters();
               formlayout1.addComponent(++row, 1, new TextView("CH-BOVEN "+parameters.getParameter(IParameterName.PAGER_LINK_COUNT).toString()));
               return formlayout1;
          catch(Exception ex)
               throw new WcmException(ex);
          finally
               s_profiler.stop("/KM/FLEXUI/RENDER/UI");
     private static List getPaddingList(IPropertyColumn columnsList[], boolean selectionActive)
          List result = new ArrayList();
          for(int i = 0; i < columnsList.length; i++)
               String padding[] = null;
               try
                    padding = PropertyColumnRenderer.getPropertyColumnArrayPadding(columnsList<i>, selectionActive);
               catch(WdfException e)
                    log.errorT("Could not parse padding for column <" + columnsList<i> + "> " + LoggingFormatter.beautify(e));
                    padding = (new String[] {
                         "0", "0", "0", "0"
               result.add(padding);
          return result;
     private static IPropertyPosition[] getPositionArray(IPropertyColumn columns[])
          IPropertyPosition result[] = new IPropertyPosition[columns.length];
          for(int i = 0; i < columns.length; i++)
               result<i> = PropertyColumnFactory.getInstance().getPosition(columns<i>);
          if(log.beDebug())
               log.debugT("Calculated property position array <" + result + "> for property column array <" + columns + ">");
          return result;
     private int renderFormRow(FormLayout grid, int row, int column, IResource res, String classStyle, int rowHeightPercent, IPropertyNameList propertynamelist,
               IPropertyPosition positions[], boolean nextColumns[], List paddings)
          throws WcmException
          s_profiler.start("/KM/FLEXUI/RENDER/UI/ROW ", com.sapportals.wcm.util.profiler.IProfiler.Level.MEDIUM);
          try
               boolean emptyRow = true;
               try
                    Vector nextLine = new Vector();
                    Vector nextLineColumn = new Vector();
                    Hashtable nextLineElement = new Hashtable();
                    FormLayoutCell cell = null;
                    int nextLineCol = 0;
                    int line = 1;
                    int startRow = row;
                    boolean selectionActive = false;
                    IPropertyPosition position = null;
                    IResourceRenderer renderer = getRenderer(res);
                    renderer.setPropertyNameList(propertynamelist);
                    String padding[] = null;
                    Component comp = new HTMLFragment(" ");
                    if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
                         comp = renderItemSelectionMode(res);
                         cell = grid.addComponent(row, column, comp);
                         cell.setVerticalAlignment(VERTICAL_ALIGN);
                         cell.setPaddingRight("2");
                         cell.setPaddingLeft("3");
                         selectionActive = true;
                         column++;
                    int columnSpan = 0;
                    int rowSpan = 0;
                    IMetaName metaName = null;
                    for(int i = 0; i < getColumnsList().length; i++)
                         try
                              columnSpan = 0;
                              position = positions<i>;
                              if(position != null)
                                   int lineNew = position.getRow();
                                   if(line != lineNew)
                                        column = position.getColumn();
                                        if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
                                             column++;
                                        line = lineNew;
                                        if(!emptyRow)
                                             row++;
                                        emptyRow = true;
                                   columnSpan = position.getSpanColumn();
                                   rowSpan = position.getSpanRow();
                              comp = PropertyColumnRenderer.renderPropertyColumn(renderer, res, getColumnsList()<i>, false, getProxy());
                              emptyRow = emptyRow && (comp == null || (comp instanceof EmptyComponent));
                              if(comp != null)
                                   if(columnSpan != 0)
                                        cell = grid.addComponent(row, column, comp);
                                        cell.setColspan(columnSpan);
                                   } else
                                        cell = grid.addComponent(row, column, comp);
                                   if(rowSpan != 0)
                                        cell.setRowspan(rowSpan);
                                   cell.setVerticalAlignment(PropertyColumnFactory.getInstance().getVAlign(getColumnsList()<i>));
                                   cell.setHorizontalAlignment(PropertyColumnFactory.getInstance().getHAlign(getColumnsList()<i>));
                                   padding = (String[])paddings.get(i);
                                   if(padding != null)
                                        cell.setPaddingTop(padding[0]);
                                        cell.setPaddingRight(padding[1]);
                                        cell.setPaddingBottom(padding[2]);
                                        cell.setPaddingLeft(padding[3]);
                                   selectionActive = false;
                              if(nextColumns<i>)
                                   nextLineColumn = getIMetaNameTypeText(getColumnsList()<i>, column);
                                   nextLine.addAll(nextLineColumn);
                              column++;
                         catch(WcmException wcmEx)
                              log.debugT("Could not rendere row for resource <" + res + "> & columns <" + getColumnsList()<i> + ">" + LoggingFormatter.extractCallstack(wcmEx));
                              if(columnSpan != 0)
                                   cell = grid.addComponent(row, column, EmptyComponent.render());
                                   cell.setColspan(columnSpan);
                              } else
                                   cell = grid.addComponent(row, column, EmptyComponent.render());
                              column++;
                         if(columnSpan != 0)
                              column += columnSpan;
                         if(!getColumnsList()<i>.contains("noColumnSpacing") && column < noOfColumns)
                              cell = grid.addComponent(row, column, EmptyComponent.render());
                              if(!"0".equals(getColumnSpacing()))
                                   cell.setWidth(getColumnSpacing());
                              column++;
                    boolean emptyComponent = true;
                    for(int k = 0; k < nextLine.size(); k++)
                         nextLineElement = (Hashtable)nextLine.elementAt(k);
                         if(nextLineElement != null)
                              IPropertyWithModifiers currProp = (IPropertyWithModifiers)nextLineElement.get("metaNameModifiers");
                              nextLineCol = Integer.parseInt((String)nextLineElement.get("col"));
                              metaName = (IMetaName)nextLineElement.get("metaName");
                              renderer.getParameters().setParameter(IResourceRendererParameterNameConst.PROPERTY_MODIFIERS, PropertyColumnFactory.getInstance().getModifierString(currProp.getModifierList()));
                              comp = PropertyColumnRenderer.renderMetaProperty(renderer, metaName, false, true);
                              emptyComponent = false;
                              if(comp != null && (comp instanceof EmptyComponent))
                                   emptyComponent = true;
                              if(!emptyComponent)
                                   if(!emptyRow)
                                        row++;
                                   cell = grid.addComponent(row, nextLineCol, comp);
                                   cell.setColspan(column);
                                   emptyRow = false;
                    int rowSpace = 0;
                    try
                         rowSpace = Integer.parseInt(getRowSpacing());
                    catch(NumberFormatException nfEx)
                         log.debugT("Could not get an Integer from <" + getRowSpacing() + ">; " + LoggingFormatter.extractCallstack(nfEx));
                         rowSpace = 0;
                    int endRow = row;
                    if(emptyRow)
                         endRow = row - 1;
                    if(rowSpace != 0)
                         String paddingStyle = String.valueOf(rowSpace);
                         if(startRow != endRow)
                              setHeightPercentageForm(rowHeightPercent, paddingStyle, 1, grid, startRow, noOfColumns);
                              setHeightPercentageForm(rowHeightPercent, paddingStyle, 1, grid, endRow, noOfColumns);
                         } else
                              setHeightPercentageForm(rowHeightPercent, paddingStyle, 0, grid, endRow, noOfColumns);
                    if(!"".equals(classStyle))
                         setClassStyleForm(classStyle, grid, startRow, row, noOfColumns);
               catch(Exception e)
                    throw new WcmException(e);
               if(!emptyRow)
                    row++;
          finally
               s_profiler.stop("/KM/FLEXUI/RENDER/UI/ROW ");
          return row;
     private void setHeightPercentageForm(int rowHeightPercent, String padding, int paddingStyle, FormLayout grid, int row, int col)
          FormLayoutCell cell = null;
          FormLayoutRow rows = grid.getRow(row);
          for(int j = 1; j <= col; j++)
               cell = rows.getCell(j);
               if(cell != null)
                    if(rowHeightPercent != 0)
                         cell.setWidth(""";height="" + String.valueOf(rowHeightPercent) + "%"");
                    if(paddingStyle == 1)
                         cell.setPaddingTop(padding);
                    else
                    if(paddingStyle == -1)
                         cell.setPaddingBottom(padding);
                    } else
                         cell.setPaddingTop(padding);
                         cell.setPaddingBottom(padding);
     private void setClassStyleForm(String classStyle, FormLayout grid, int startRow, int endRow, int col)
          FormLayoutCell cell = null;
          FormLayoutRow currentRow = null;
          int rowSpan = 0;
          int noCol = col;
          boolean hasRowSpan = false;
          for(int i = startRow; i <= endRow; i++)
               currentRow = grid.getRow(i);
               if(currentRow != null)
                    if(hasRowSpan)
                         noCol = col - 1;
                         hasRowSpan = --rowSpan > 0;
                    } else
                         noCol = col;
                    for(int j = 1; j <= noCol; j++)
                         cell = currentRow.getCell(j);
                         if(cell != null && cell.getRowspan() > 1)
                              hasRowSpan = true;
                              rowSpan = cell.getRowspan() - 1;
                         if(cell != null)
                              cell.setStyle(classStyle);
                         } else
                              cell = grid.addComponent(i, j, EmptyComponent.render());
                              cell.setStyle(classStyle);
     public HeaderItem[][] genetateMatrixHeader()
          throws WcmException
          if(isExactlyValue(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "off"))
               return null;
          IPropertyPosition position = null;
          IPropertyColumn iterColumns[] = getColumnsList();
          boolean existsResource = getResourceList().size() != 0;
          if(!existsResource)
               return null;
          HeaderItem headerMatrix[][] = new HeaderItem[10][20];
          int currentRow = 0;
          int currentColumn = 0;
          int currentRowSpan = 0;
          int currentColumnSpan = 0;
          int nextCol = 0;
          int maxRow = 0;
          int maxCol = 0;
          boolean is508Required = false;
          try
               is508Required = getProxy().getDynamicPage().getPageContext().requiresSection508Rendering();
          catch(Exception ex)
               log.errorT("Could not retrieve 508 mode for proxy <" + getProxy() + ">: " + LoggingFormatter.extractCallstack(ex));
          IMetaName metaName = null;
          for(int i = 0; i < iterColumns.length && existsResource; i++)
               if(iterColumns<i> != null)
                    position = PropertyColumnFactory.getInstance().getPosition(iterColumns<i>);
                    if(position != null)
                         if(currentRow != position.getRow() - 1)
                              nextCol = 0;
                         currentRow = position.getRow() - 1;
                         currentColumn = (position.getColumn() - 1) + nextCol;
                         currentRowSpan = position.getSpanRow();
                         currentColumnSpan = position.getSpanColumn();
                    } else
                         currentRowSpan = 0;
                         currentColumnSpan = 0;
               metaName = PropertyHeaderRenderer.getMetaNameForTitle(iterColumns<i>, is508Required);
               if(metaName != null)
                    headerMatrix[currentRow][currentColumn] = new HeaderItem(currentRowSpan, currentColumnSpan, metaName, iterColumns<i>);
                    nextCol = 1;
                    maxRow = maxRow <= currentRow ? currentRow : maxRow;
                    maxCol = maxCol <= currentColumn ? currentColumn : maxCol;
               currentColumn++;
               if(currentColumnSpan != 0)
                    currentColumn += currentColumnSpan;
               if(!iterColumns<i>.contains("noColumnSpacing"))
                    currentColumn++;
          maxRow++;
          maxCol++;
          if(maxRow > 0 || maxCol > 0)
               HeaderItem resultMatrix[][] = new HeaderItem[maxRow][maxCol];
               for(int i = 0; i < maxRow; i++)
                    for(int k = 0; k < maxCol; k++)
                         resultMatrix<i>[k] = headerMatrix<i>[k];
               return resultMatrix;
          } else
               return null;
     public int renderListHeader1(FormLayout grid, int row)
          throws WcmException
          if(isExactlyValue(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "off"))
               return row;
          HeaderItem header[][] = genetateMatrixHeader();
          if(header == null)
               return row;
          String propertyHeaderColumnStyle = getParameters().getParameter(ICollectionRendererParameterNameConst.PROPERTY_COLUMN_HEADER_STYLE, "Table Title Color");
          String headerClassStyle = HtmlRendererUtil.getHeaderClassStyle(propertyHeaderColumnStyle);
          if(headerClassStyle == null)
               headerClassStyle = "";
          FormLayoutCell cell = null;
          int columnSpan = 0;
          int column = 1;
          if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
               column++;
          int startRow = row;
          HeaderItem headerItem = null;
          PropertyHeaderRenderer sortHeader = new PropertyHeaderRenderer(getProxy(), this, getBundleHandler(), getChildCountMetaName(getParentCollection()), isManualOrdered, getIRS().getSortDefintion(), getResourceContext().getLocale());
          IMetaName metaName = null;
          int colHeader = 0;
          for(int i = 0; i < header.length; i++)
               row += i;
               if(!getParameters().getParameter(ICollectionRendererParameterNameConst.ITEMSELECTIONMODE, "multiple").equals("off"))
                    colHeader = 1;
               else
                    colHeader = 0;
               for(int k = 0; k < header[0].length; k++)
                    headerItem = header<i>[k];
                    if(headerItem != null)
                         boolean is508Required = false;
                         try
                              is508Required = getProxy().getDynamicPage().getPageContext().requiresSection508Rendering();
                         catch(Exception ex)
                              log.errorT("Could not retrieve 508 mode for proxy <" + getProxy() + ">: " + LoggingFormatter.extractCallstack(ex));
                         metaName = headerItem.getLabelMetaName();
                         if(headerItem.getColSpan() != 0)
                              cell = grid.addComponent(row, k + colHeader + 1, sortHeader.createSortLink(metaName));
                              cell.setColspan(headerItem.getColSpan());
                         } else
                              cell = grid.addComponent(row, k + colHeader + 1, sortHeader.createSortLink(metaName));
                         String padding[] = HtmlRendererUtil.getPropertyPaddingValues(headerItem.getPropertyColumn(), metaName);
                         cell.setHorizontalAlignment(PropertyColumnFacto

Hello
My problem is the following on the moment:
In debug, I get the message the pager can't be created.
Could not create command with alias KenGPager and classname be.kindengezin.wcm.rendering.component.cm.Pager:java.lang.ClassNotFoundException: be.kindengezin.wcm.rendering.component.cm.Pager
     at com.sapportals.wcm.crt.CrtClassLoaderRegistry.findClass(CrtClassLoaderRegistry.java:176)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
     at com.sapportals.wcm.rendering.collection.ComponentFactory.createComponent(ComponentFactory.java:447)
     at com.sapportals.wcm.rendering.collection.ComponentFactory.initialize(ComponentFactory.java:489)
     at com.sapportals.wcm.rendering.collection.ComponentFactory.configEvent(ComponentFactory.java:553)
     at com.sapportals.config.event.ConfigEventService.dispatchEvent(ConfigEventService.java:227)
     at com.sapportals.config.event.ConfigEventService.configEvent(ConfigEventService.java:112)
     at com.sapportals.config.event.ConfigEventDispatcher.callConfigListeners(ConfigEventDispatcher.java:308)
     at com.sapportals.config.event.ConfigEventDispatcher.flushEvents(ConfigEventDispatcher.java:251)
     at com.sapportals.config.event.ConfigEventDispatcher.run(ConfigEventDispatcher.java:110)
My java files start as following:
package be.kindengezin.wcm.rendering.component.cm;
import com.sap.tc.logging.Location;
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.enum.TextViewDesign;
import com.sapportals.htmlb.event.Event;
import com.sapportals.wcm.WcmException;
import com.sapportals.wcm.control.util.PropertyRendererString;
import com.sapportals.wcm.rendering.base.*;
import com.sapportals.wcm.rendering.collection.*;
import com.sapportals.wcm.rendering.util.EmptyHtmlFragment;
import com.sapportals.wcm.rendering.util.PagerData;
import com.sapportals.wcm.repository.*;
import com.sapportals.wcm.repository.service.IRepositoryServiceFactory;
import com.sapportals.wcm.repository.service.layout.customizing.IParameterName;
import com.sapportals.wcm.service.propertyconfig.*;
import com.sapportals.wcm.util.logging.LoggingFormatter;
import com.sapportals.wcm.util.name.IName;
import com.sapportals.wcm.util.resource.ResourceBundles;
import com.sapportals.wcm.util.uri.RID;
import java.util.*;
// Referenced classes of package com.sapportals.wcm.rendering.component.cm:
//                 LightComponent, PagerComponent, PagerInterval
public class Pager extends LightComponent
Edited by: Christof Houben on Oct 6, 2008 3:44 PM

Similar Messages

  • Text too close to page number in TOC

    Most of the time I can take care of unattractive line breaks in the TOC by putting in non-breaking spaces in a paragraph.
    However, I sometimes have a situation where the text of a TOC entry is too close to the page number on the right. The text is so close to the page number that in some cases no leader dots show, or only one or two leader dots show.
    The entry and its page number fit on a single line, so putting in non-breaking spaces won't solve the problem. I could put in a soft return (Shift-Enter) in the TOC entry to force a line break, but it isn't efficient because I have to put in the soft return manually each time the TOC is updated.
    If anyone has a tip on how to handle this problem efficiently, I'd love to know about it.

    Van
    That is absolutely brilliant. It also seems to prevent multi-line TOC entries from encroaching on the page number area in general.
    For ages I thought the only way around this ugly problem would be to wait 200 years for Adobe to give us four different indent options (first line left, left, right, and last line right) instead of the three that we currently have. (Last line right doesn't exist.)
    I'll just add one more suggestion that might make your line breaks and page number positions in the TOC 100% automatic instead of merely 98%.
    (It doesn't sound like much of an improvement, but if you've ever had to manually adjust the TOCs for 50 manuals every time you regenerated them, then you'll know where I'm coming from.)
    If you have any TOC paragraph specifications that use more than one tab, for handling section or chapter numbers at the front of the paragraph for example, then you'll notice that if a TOC entry wraps to two or more lines then the page number will no longer be printed at its intended tab stop, but will use one of the earlier tab stops instead (because in the new line there are no longer any previous tab characters to fill the earlier tab stops).
    The cure for this is to go to the TOC specification flow on the Reference pages, and in the problematic paragraph format add an extra tab character in front of the <$pagenum> building block.Then...
    If the TOC entry only covers one line, the extra tab character will be ignored.
    If the TOC entry covers two or more lines, the extra tab character will be used to fill up the previous stop so the page number settles at its intended tab stop.
    If you have TOC specifications that rely on more than two tab positions, just add more tab characters in front of the <$pagenum> building block (and regenerate) until the page number (in multi-line entries) lands at the correct tab stop.
    Thank goodness FM uses absolute tabs and not relative ones.

  • I have a question about extracting pages.  When I do the function, adobe saves the individual files as " file name space page number ", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I a

    I have a question about extracting pages.  When I do the function, adobe saves the individual files as "<file name><space><page number>", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I am using excel to concatenate some data to dynamically build a hyperlink to these extraced files.  It casues me problems, however, for the space to be the the file name.  Is there any way to change the default behavoir of this function to perhaps use a dash or underscore instead of a space?

    No, you can't change the default naming scheme. You can do it yourself if you extract the pages using a script instead of using the built-in command.

  • Cross References Will Not Display Page Number

    Got some documents created in InDesign CS3 (MAC). When bringing them into CS4 (Windows) and trying to create a paragraph cross-reference the page numbers will not display. All the other text in the cross reference ("paragraph", the word "page", etc.) displays correctly. Even the cross reference under the "hyperlinks" toolbar shows nothing (instead of the usual # indicating a page number).
    However If I copy some of the same pages into a new document and create a cross reference in it the page number displays correctly. But since it's over 300 pages I really would hate to have to do that!
    Any ideas?

    Is it maybe because CS3 does not include the cross references function (not a feature until CS4)?
    That's a real problem if we use an outside source to create a lot of our documents and they're working in a previous version.

  • Hiding Image field based on the page number in Adobe Form- Script

    Hi Folks,
    I have a problem with the print form that I am working on. I need to insert an image of lines (OMR) based on the page numbers. For the OMR part, the first page will always have 4 lines as a image, the middle pages will have 3 lines as a image and the last page will have two lines as a image.
    I have uploaded these 3 images a BMPs in SE78 and I am using Xstring of these images in the form. I have two master pages. First master page is for the first page and the second master page is for the remaining pages. The first master page will always have the 4 line image. I created a positioned subform in the master page2, in that subform, I have 2 hidden numeric fields, as the run time properties one for the current page number, other one for the total number of pages. I placed those two images(one for the three line image and the other one for the two line image) exactly on the same location positioned dimensions wise. 
    I have written the java script for these two image fields to show based on the page numbering. But, somehow, it is not working. Can anybody please let me know where I am doing wrong. I am posting my java script here.
    for the three line image:
    var cp = data.PageSet.MasterPage2.OMR.cpage.rawValue;
    var np = data.PageSet.MasterPage2.OMR.npages.rawValue;
    //if(data.#pageSet[0].MasterPage2.OMR.cpage.rawvalue == data.#pageSet[0].MasterPage2.OMR.npages.rawvalue){
    for (j=0; j<xfa.layout.pageCount(); j++){
      if(cp == np){
        xfa.resolveNode("data.PageSet.MasterPage2[" + j + "]").OMR.OMR2.presence = "hidden";
      else{
        xfa.resolveNode("data.pageSet.MasterPage2[" + j + "]").OMR.OMR2.presence = "visible";
    For the two line image:
    var cp = data.PageSet.MasterPage2.OMR.cpage.rawValue;
    var np = data.PageSet.MasterPage2.OMR.npages.rawValue;
    for (j=0; j<xfa.layout.pageCount(); j++){
      if(cp == np){
        xfa.resolveNode("data.PageSet.MasterPage2[" + j + "]").OMR.OMR3.presence = "hidden";
      else{
        xfa.resolveNode("data.pageSet.MasterPage2[" + j + "]").OMR.OMR3.presence = "visible";
    Please give me a direction as this is kind of hurry.
    Thanks,
    Srinivas.
    Edited by: srinivas kari on Jun 9, 2010 2:03 AM

    HI Otto,
    Thanks for the response. You are right, I am struck with this image. My problem was to keep the OMR marking on each page based on the page number. It is like a lines with 10mmX10mm dimension at the top right corner for the sorter machine to know the number of pages to put in the envelope. The logic for this is, on the first page, it has 4 lines each 3mm apart. On the middle pages it has 3 lines . On the last page it has 2 lines. When the sorter machine picks these, it looks at the first page with 4 lines, it will count as a first page, it will continue through the 3 line pages as the middle pages until it reaches the 2 line to know it as the last page. This is all happens in the master pages. I have two master pages , one for the first page and the second one for the remaining pages.
    At first I did not know how to To achieve this, I created 3 images. one with 4 lines, another ones with 3 lines and 2 lines. The 4 lines image was on the first master page. The 3 lines and 2 lines images were on the second master page at the same place as the image fields positioned. Thats where I was trying this scripting. I was trying to capture the current page and number of pages. Based on these, I was trying to place them.
    Is there any other way to achieve this instead of using the images? I thought of sy-uline. but some in the forum told that its not going to work. Even if I use the sy-uline, I have to do some script to achieve this I believe.
    Any inputs on this.. Please give the direction.
    Thanks,
    Srinivas.

  • Hiding Image filed based on the page number in Adobe Forms - scripting

    Hi Folks,
    I have a problem with the print form that I am working on. I need to insert an image of lines (OMR) based on the page numbers. For the OMR part, the first page will always have 4 lines as a image, the middle pages will have 3 lines as a image and the last page will have two lines as a image.
    I have uploaded these 3 images a BMPs in SE78 and I am using Xstring of these images in the form. I have two master pages. The first master page will always have the 4 line image. I created a positioned subform in the master page2, in that subform, I have 2 hidden numeric fields, as the run time properties one for the current page number, other one for the total number of pages. I placed those two images(one for the three line image and the other one for the two line image) exactly on the same location positioned dimensions wise.
    I have written the java script for these two image fields to show based on the page numbering. But, somehow, it is not working. Can anybody please let me know where I am doing wrong. I am posting my java script here.
    for the three line image:
    var cp = data.PageSet.MasterPage2.OMR.cpage.rawValue;
    var np = data.PageSet.MasterPage2.OMR.npages.rawValue;
    //if(data.#pageSet[0].MasterPage2.OMR.cpage.rawvalue == data.#pageSet[0].MasterPage2.OMR.npages.rawvalue){
    for (j=0; j<xfa.layout.pageCount(); j++){
    if(cp == np){
    xfa.resolveNode("data.PageSet.MasterPage2 [" + j + "]").OMR.OMR2.presence = "hidden";
    else{
    xfa.resolveNode("data.pageSet.MasterPage2 [" + j + "]").OMR.OMR2.presence = "visible";
    For the two line image:
    var cp = data.PageSet.MasterPage2.OMR.cpage.rawValue;
    var np = data.PageSet.MasterPage2.OMR.npages.rawValue;
    for (j=0; j<xfa.layout.pageCount(); j++){
    if(cp == np){
    xfa.resolveNode("data.PageSet.MasterPage2 [" + j + "]").OMR.OMR3.presence = "hidden"; // there is some problem while //posting it is like MasterPage2[" + j + "]")
    else{
    xfa.resolveNode("data.pageSet.MasterPage2 [" + j + "]").OMR.OMR3.presence = "visible";
    Please give me a direction as this is kind of hurry.
    Thanks,
    Srinivas.
    Edited by: srinivas kari on Jun 9, 2010 12:04 AM

    HI Otto,
    Thanks for the response. You are right, I am struck with this image. My problem was to keep the OMR marking on each page based on the page number. It is like a lines with 10mmX10mm dimension at the top right corner for the sorter machine to know the number of pages to put in the envelope. The logic for this is, on the first page, it has 4 lines each 3mm apart. On the middle pages it has 3 lines . On the last page it has 2 lines. When the sorter machine picks these, it looks at the first page with 4 lines, it will count as a first page, it will continue through the 3 line pages as the middle pages until it reaches the 2 line to know it as the last page. This is all happens in the master pages. I have two master pages , one for the first page and the second one for the remaining pages.
    At first I did not know how to To achieve this, I created 3 images. one with 4 lines, another ones with 3 lines and 2 lines. The 4 lines image was on the first master page. The 3 lines and 2 lines images were on the second master page at the same place as the image fields positioned. Thats where I was trying this scripting. I was trying to capture the current page and number of pages. Based on these, I was trying to place them.
    Is there any other way to achieve this instead of using the images? I thought of sy-uline. but some in the forum told that its not going to work. Even if I use the sy-uline, I have to do some script to achieve this I believe.
    Any inputs on this.. Please give the direction.
    Thanks,
    Srinivas.

  • How to insert company logo and page number on every page except the first page?

    Hi, I am creating a newspaper and I've inserted the page number and company name on every page using the master page (you know the basic method).
    Problem is I don't want the page number or the logo to appear on the first page, how can I do this?
    Or will I have to copy and paste it on each page instead...? I'd rather not.
    I'd appreciate any help I can get.
    P.S. I'm using CS5 and obviously I'm talking about InDesign.

    Make another master and apply it to the first page.
    Take care, Mike

  • XSL-FO for Standard Purchase Order, doesn't print page number

    Hi,
    I worked on XSL-FO code to custom the PDF output for Standard PO. Everything works great: I added company logo (in a different position of the standard commented code <!-- Too easy just to uncomment... :-)--> ), i created new attribute sets to highlight some elements on the print, I added a footer with company details and document type and number (instead of placing this in the header, the costumer didn't like it where it was..)
    OK. BUT: the page number at the bottom on the right isn't printed anymore. For example: if the PO page is n.1 of 2 pages, it comes only '12' and not Page 1 of 2. So i tought not to use the original template (tihs one)
    <!-- Template for displaying the page numbers -->
    <!-- bug#3836856: Template for displaying the page numbers at right bottom of the page -->
    <xsl:template name="pageNumber">
         <xsl:variable name="po_page">
         <xsl:value-of select="$BOILER_PLATE_MESSAGES_OBJ[MESSAGE='PO_FO_PAGE'][1]/TEXT"/>
         </xsl:variable>
         <!-- Get the String before the PAGE_NUM token -->
         <xsl:variable name="string_before_page_num">
         <!-- <xsl:value-of select="substring-before($po_page,'&amp;PAGE_NUM')"/>-->
         <xsl:value-of select="substring-before($po_page,'Pag.;PAGE_NUM')"/>
         </xsl:variable>
         <!-- Get the String after the PAGE_NUM token -->
         <xsl:variable name="string_after_page_num">
         <!-- <xsl:value-of select="substring-after($po_page,'&amp;PAGE_NUM')"/>-->
         <xsl:value-of select="substring-after($po_page,'/ ;PAGE_NUM')"/>
         </xsl:variable> ......
    but inseriting a select just where I want the page num to be displayed (see code)
    <fo:block xsl:use-attribute-sets="test_style" >
    <xsl:value-of select="$BOILER_PLATE_MESSAGES_OBJ[MESSAGE='PO_FO_PAGE'][1]/TEXT"/>
                                                      </fo:block>
    but this gave me as result 'Page &PAGE_NUM of &END_PAGE'.
    Where did I do wrong?? It's like the PO_FO_PAGE message is not dinamically insered in the PDF. Hope I've been clear enough and somene can help me. Thaks in advance, Michele

    Hi Michele:
    I can check out for you how to print page number in XSL-FO (There is an O'Reilly) book, but I think I help you better by recommending a different strategy - Don't write XSL-FO stylesheets. While Purchasing does not support RTF templates you can still write RTF templates and convert them to FO using the XML Publisher Template Builder for Word.
    Download the matching Template Builder for Word (5.0) or XML Publisher Desktop 5.5 (includes the Template Builder) patch and then Create your template as an RTF template.
    You can then EXPORT the template as XSL-FO stylesheet and upload as to Purchasing AS LONG AS THE VERSION OF THE DESKTOP and E-Businees Suite XML Publisher MATCH.
    If you still want to write XSL stylesheet, you can just use the Template Builder to generate you the code and paste the code (e.g. for page numbers) into your stylesheet.
    By the way - Purchasing will support RTF templates in future versions...
    Hope that helps,
    Klaus

  • Page Numbers Starting on Second Page as Page Number 1

    I'm writing essays for my AP World History class and I need a cover page that doesn't have a page number as the first page of the document. Then my essays will go in order from the second page, but the page numbers need to start as 1. I have already clicked "First page is different" in the inspector under Section, but it starts the page numbering at 2 instead of the needed one. Any ideas on how to do this?
    Thanks

    Have you tried setting the starting page number to zero? Then the next page should be #1.
    Or you can add a section break & start the numbering of the new section at 1.

  • Page number of linked textframe in indesign document

    Hi,
      My indesign document has linked pages 1 - 10 (ie., linked textframes).  I want to take page number of selected text from 5th page., which textframe is linked textframe of 1st page.  When i use the following code for findpage, its returning the page no 1 instead of 5. 
    Kindly reply for me...
    var page = findPage(app.selection[0]);    // selection is a word/para
    function findPage(theObj)
        var thePage = theObj;
        if (thePage.hasOwnProperty("baseline"))
            thePage = thePage.parentTextFrames[0];
        while (thePage.constructor.name != "Page")
            var whatIsIt = thePage.constructor.name;
            switch (whatIsIt)
                case "Story" :
                    thePage = thePage.textFrames[-1].parent;
                    break;
                case  "Character" :
                    thePage = thePage.parentTextFrames[0];
                    break;
                case "Cell" :
                    if ( thePage.insertionPoints[0].parentTextFrames[0] == null)
                        // contents of cell is overset
                        thePage = tryHarderForCell(thePage);
                        if (thePage == null) return null;
                        break;
                    else
                        thePage = thePage.insertionPoints[0].parentTextFrames[0];
                        break;
                case "Application" :
                return null;
            thePage = thePage.parent;
        return thePage ;

    Hi,
      Thank u... Its working...

  • Text flows create a delay when an overflow creates a new page, preventing you from reading the page number, giving error

    Hi all!
    I am creating a script to generate automatically a photo catalog; the idea is to prepare a master document with a text frame in the master spread with auto flowing, then insert images with their caption by the script, letting the system create automatically the subsequent pages when necessary by an unique flow of text.
    My catalog is divided in sections, each represented by a different master spread; so I have to know in which page I am working when the script put there an image, just to link the current page to the proper master spread.
    To simplify everything I have resumed the core of my script here, using text instead of images:
    /* load a master document, only containing an empty text frame in the master spread, connected to the main text flow */
    var doc = app.open(new File("~/Desktop/mySampleDoc.indd"));
    /* I work on the story, thinking that whenever the textframe of the first page will be full, another text frame will be created in the next page (automatically created) */
    var story = doc.pages[0].textFrames[0].parentStory;
    /* now I put some lines of text into the story, expecting the creation of a new page when the first one will be full */
    for (var i = 0; i < 100; i++) {
       /* this is next line: */
        story.insertionPoints[-1].contents = "this is line n. " + i + "\r";
        /* here I want to know on which page is the line just created (error is generated here just during the creation of the new page + text frame) */
        thisPage = story.insertionPoints[-1].parentTextFrames[0].parentPage.documentOffset;
       /* and now I print page number */
        story.insertionPoints.item(-1).contents = "current page: " + thisPage + "\r";
    The big problem is: when the first text frame is full and an overflow is generated, a new page with a new text frame belonging to the main text flow (as the master spread wants) is generated; but it seems my script requests the page number before the new page with the new text frame is born, and an error is given.
    It seems like the script goes too fast in respect to the creation of the new page.
    If I delete the line thisPage = story.insertionPoints[-1].parentTextFrames[0].parentPage.documentOffset; everything is ok.
    I tried to introduce a delay until 3 seconds without any effect.
    I tried also to show or zoom the new page before the page number request, thinking to force the system to wait until page is really born, also without any effect (by the way, I was not able to show the page during the script's additions of text!).
    Someone can help me?
    Many thanks to everyone
    Roberto

    Many thanks: you are right!
    Unfortunately, I am at the very beginning with ExtendScript, and there are so many things I don't know until now...
    With recompose() everything works very well, and it give me a solution also for redrawing the page while the script is working...
    Many thanks, again!
    Roberto

  • Preview.app and multipage tiff files (page number)

    I scan completed job folders at my company and store the resulting files on a server for users to access. They are a multipage .tif format which is basically a fax file format that is very common among document scanners.
    Preview is pretty good at viewing these except I am stuck with two problems.
    - 10.4 Preview will only show the first 250 pages of a file.
    - 10.5 Preview will show many more pages which is good, but it gives NO WAY to know what image number you are looking at!! (preview 10.4 shows image numbers under the thumbnails, but the 10.5 version for some mysterious reason does not).
    So if you are looking at an image near the middle of a 500 page document, you have no idea what image number it is, and you basically have to click the little arrow on the print box until you get to that page (which can be hard to tell because you are looking at a small thumbnail of the page). It's completely unusable.
    Now before you tell me "yes it does show the page numbers in the thumbnail view!!!" let me remind you that I am not viewing PDFs. Yes, for PDF files the page number is right there all nice and handy. But for these multipage tif files, no page number for you!!!
    Hah, update! I have just discovered that with very short file names, you can see the image number, because Preview 10.5 appends the image number to the end of the file name on each thumbnail.
    So you can see: myFile.tif-389 on page 389's thumbnail.
    But if your filename is much longer, you see: myLongerFile... with no way to see the image number.
    I don't even know where to complain about this. Any ideas welcome.

    Paul Bruneau wrote:
    I scan completed job folders at my company and store the resulting files on a server for users to access. They are a multipage .tif format which is basically a fax file format that is very common among document scanners... Any ideas welcome.
    Multipage TIF is not common at all. Why not just save these files as PDF? Any modern scanner software should be about to generate PDF files. They won't be any larger than the TIF files and will be readable in anything with all available features.
    I don't have any multipage tif files and don't even know how I could generate one. You can send your request to Apple via their Feedback page. But there is really no downside and numerous benefits to saving as PDF instead.

  • Table of Content with page number for entire pdf

    Hi
    We need to merge dynamic pdf with n number of static pdf.
    The output of the generated pdf has one of the page called Table Of Content with page number.
    For this we have created following process
    We created a form using Adobe livecycle form designer to populates input data(xml).
    We created process to generate dynamic pdf .
    We have static pdf's in some folder location(Eg:C:\temp)
    We created xsl to generate DDX to merge Dynamic pdf with static pdf's by using an assembler operation in the Process
    There are number of static specification pdf's  inserted in between of dynamic pdf using logic in xsl.
    We used bookmark option in xsl for creating table of content .
    While invoking the process we are able to generate the correct merged pdf with some unformatted page of table of content
    We can explain better in the following way where we are actually facing a challenge:
    We need a table of content in the below mentioned format:
                                                                                                                 PAGE
    MAIN DESCRIPTION                                                                                    n
    ID1             NAME1            DESCRIPTION   1                                              m
    ID2POK       NAME2            DESCRIPTION   2                                              m
    FDJKHJG                                                                                                   
    ID3             NAME3            DESCRIPTION   3                                              m
    MAIN DESCRIPTION2                                                                                 n
    ID3            NAME3            DESCRIPTION   5                                               m
    ID4            NAME4            DESCRIPTION   4                                               m
    ID5            NAME5            DESCRIPTION   5                                               m
    Since the pdf merging and numbering is done  using ddx at runtime, page number tag is not there in xml and  therefore the toc page cannot be populated at the time of form design.
    The issue we are facing is that, by using ddx script we are not able to align id,name,description in  table of content in proper manner. We want to wrap particular id ,name and description in their respective columns.
    Currently, we are getting the below mentioned result which is not in a proper format.
                                                                                                               PAGE
    MAIN DESCRIPTION                                                                                n
    ID1HDSJHJDHFDJFHD            NAME1FDJFHDJH           DESCRIP
    TION 1                                                                                                    m
    ID2POKLFDJKHJG           NAME2FDJKFJDKFJKD            DESCRI
    PTION   2                                                                                                m
    ID3            NAME3            DESCRIPTION   3                                             m
    Note: Page numbering has been done only after merging all the pdf(Dynamic and static) using ddx  instead of the adobe livecycle form designer.
    Is there any solution to resolve the formatting issue or any other option to create table of content dynamically ?

    Hi SaCvP,
    According to your description, you want to display the table of contents with page number in SSRS 2014.
    In Reporting Services, the global variable PageNumber or Totalpages can be only used in the page header and page footer. In your scenario, you can create a table of content using document map, but we can’t specify the expression with PageNumber or Totalpages.
    So your requirement can’t be achieved currently.
    Reference:
    Create a Document Map (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Repeating frame data run over the page number in the bottom of page

    Hi all,
    I have an issue trying to have page number info shown on every page of report.
    The report has an outer frame M1 that includes frame M2 (it contains a repeating frame with actual data), M3 (a frame that shows the summary and total info) and M4 (the frame that contains page number information.
    Settings are as follow:
    Frame - Vertical - Horizontal - Print Obj On - Base Printing On
    M1     Fixed          Fixed          First Page     Enclosing
    M2     Expand          Fixed          First Page     Enclosing
    M3     Fixed          Fixed          Last Page     Anchoring
    M4     Fixed          Fixed           All Page     Enclosing
    What happens now is that frames M3 and M4 both only shown on the last page. M3 has the right behavior but I expected M4 to show on every page. All these are on Main Section. I know I could have page info on Trailer section but I need to have everything on Main section because of some other logic I have.
    Any suggestions?
    Mike

    I tried that but it did not work. If I used Print All Pages for main content frame it will just have 1 page output versus multiple pages as expected.
    Two important points:
    1) R1 (the repeating frame in M2) has Vertical Elasticity as Expand because it also contains more repeating frames under it. Problem could be solved if the R1 would have vertical elasticity as Fixed instead;
    2) I also could have fixed this by having M2 (it contains a repeating frame with actual data) with Vertical Elasticity as Fixed instead of Expand. But once I do that, I get Report error M3 (frame that shows the summary at the last page) "has an illegal print condition"? Anyone know why this error occurs?

  • In FM 10  Table of contents wraps ok except the page number.

    In FM 10  Table of contents wraps ok except if the text just makes it to the end of the line the page the page number goes to the start of the next line. If the text is longer the text wraps fine and the page number goes right justified as it should.  What am I missing?

    Van,
       When you want to change several settings the same way in multiple paragraph formats, there is no need to do so one format at a time.
       To set all formats in all paragraphs and catalog entries:
    1) Open the paragraph designer and go to the appropriate tab.
    2) Type Shift-F8 to set all properties on the tab to "As Is".
    3) Set the properties you care about to the desired values.
    4) From the Commands pop-up in the lower-left corner, select Global Update Options.
    5) Click the All Paragraphs and Catalog Entries.
    6) Click Update.
      The properties you specified but no others have been changed.
      If you do not want to update all paragraphs or catalog entries, make a copy of your document. In the copy, delete all catalog entries you do not want to update. Perform the above steps. Import paragraph formats from the copy into the actual document(s).
            --Lynne

Maybe you are looking for

  • Help, CheckOut causes error IFS-34611

    There was an error checking out logo.jpg: oracle.ifs.common.IfsException: There was an error checking out logo.jpg: oracle.ifs.common.IfsException: IFS-34611: Error reserving version series. oracle.ifs.common.IfsException: IFS-30054: Insufficient acc

  • Virtual MAC-Address on Solaris 10 update 9

    Hi, i'm installing Solaris 10 update 9 on UCS B-Series (B230 M2 or B440 M2) with M72KR-Q Adapter. We create the Service Profile with vNIC associated to vNIC Template. The vNIC Template use the MAC Pool Address configurated. When we run ifconfig -a on

  • WAS 5.02 vs WAS 5.1

    Hi, WAS 5.1 shipped with enhanced features when compared to WAS 5.02. In my project, they are planning to have WAS5.02 as dev environment and WAS5.1 as production env. In that event, what could be the problems and what are the advantages we lose by u

  • How can I show ipad3 icon with my online status of Facebook?

    I am using Facebook apps on my iPad.. When I upload any photos through this app it can not show iPad icon with my online status seen to others? How it will work plz help...

  • What's with the prices?

    Anyone know why the exact same movie cost $2.99 to rent from the iTunes store on my Mac (which I can then stream to my ATV2) and $3.99 to rent on the ATV? What's so different that it needs to cost an extra dollar just because I hit the rent button on