commandLink.setStyleClass(this.getCssClassFirstPage());
commandLink.setTitle(this
.getProperty("catalog.general.pageCursor.first.alt"));
link = commandLink;
} else {
HtmlOutputLink outputLink = new HtmlOutputLink();
outputLink.setStyleClass(this.getCssClassFirstPage());
outputLink.setValue("#");
outputLink.setTitle(this
.getProperty("catalog.general.pageCursor.first.alt"));
link = outputLink;
}
link.getAttributes().put(PageEvents.goToPage.name(), 1);
link.setId(this.getIdFirstPage());
HtmlOutputText linkText = new HtmlOutputText();
linkText.setId(this.getIdPrefix() + "txtFirstPage"); //$NON-NLS-1$
linkText.setValue(this.getProperty("catalog.general.pageCursor.first")); //$NON-NLS-1$
link.getChildren().add(linkText);
mainPanel.getChildren().add(link);
// previousPage link
link = null;
if (!useAjax) {
HtmlCommandLink commandLink = new HtmlCommandLink();
if (actionListenerMethod != null) {
commandLink.setActionListener(actionListenerMethod);
}
if (actionMethod != null) {
commandLink.setAction(actionMethod);
}
commandLink.setStyleClass(this.getCssClassPreviousPage());
commandLink.setTitle(this
.getProperty("catalog.general.pageCursor.previous.alt"));
link = commandLink;
} else {
HtmlOutputLink outputLink = new HtmlOutputLink();
outputLink.setValue("#");
outputLink.setStyleClass(this.getCssClassPreviousPage());
outputLink.setTitle(this
.getProperty("catalog.general.pageCursor.previous.alt"));
link = outputLink;
}
link.setId(this.getIdPreviousPage());
linkText = new HtmlOutputText();
linkText.setId(this.getIdPrefix() + "txtPreviousPage"); //$NON-NLS-1$
linkText.setValue(this.getProperty("catalog.general.pageCursor.previous")); //$NON-NLS-1$
link.getChildren().add(linkText);
mainPanel.getChildren().add(link);
// Enumerated Pages link
HtmlPanelGrid grid = new HtmlPanelGrid();
grid.setId(this.getIdEnumPagesPanel());
mainPanel.getChildren().add(grid);
grid.setCellpadding("0"); //$NON-NLS-1$
grid.setCellspacing("0"); //$NON-NLS-1$
// nextPage link
link = null;
if (!useAjax) {
HtmlCommandLink commandLink = new HtmlCommandLink();
if (actionListenerMethod != null) {
commandLink.setActionListener(actionListenerMethod);
}
if (actionMethod != null) {
commandLink.setAction(actionMethod);
}
commandLink.setStyleClass(this.getCssClassNextPage());
link = commandLink;
} else {
HtmlOutputLink outputLink = new HtmlOutputLink();
outputLink.setValue("#");
outputLink.setStyleClass(this.getCssClassNextPage());
outputLink.setTitle(this.getProperty("catalog.general.pageCursor.next.alt"));
link = outputLink;
}
link.setId(this.getIdNextPage());
linkText = new HtmlOutputText();
linkText.setId(this.getIdPrefix() + "txtNextPage"); //$NON-NLS-1$
linkText.setValue(this.getProperty("catalog.general.pageCursor.next")); //$NON-NLS-1$
link.getChildren().add(linkText);
mainPanel.getChildren().add(link);
// lastPage link
link = null;
if (!useAjax) {
HtmlCommandLink commandLink = new HtmlCommandLink();
if (actionListenerMethod != null) {
commandLink.setActionListener(actionListenerMethod);
}
if (actionMethod != null) {
commandLink.setAction(actionMethod);
}
commandLink.setStyleClass(this.getCssClassLastPage());
commandLink.setTitle(this
.getProperty("catalog.general.pageCursor.last.alt"));
link = commandLink;
} else {
HtmlOutputLink outputLink = new HtmlOutputLink();
outputLink.setValue("#");
outputLink.setStyleClass(this.getCssClassLastPage());
outputLink.setTitle(this
.getProperty("catalog.general.pageCursor.last.alt"));
link = outputLink;
}
link.setId(this.getIdLastPage());
linkText = new HtmlOutputText();