use of javax.faces.component.html.HtmlDataTable in project TNTConcept by autentia.
the class PublicationBean method letterClicked.
/**
* Handle an ABC pager letter click: filter objects by specified starting letter
*/
public void letterClicked() {
if (letter != null) {
UIComponent comp = FacesUtils.getComponent("publications:list");
HtmlDataTable tabla = (HtmlDataTable) comp;
tabla.setFirst(0);
search.setName(letter + "%");
} else {
search.unsetName();
}
}
use of javax.faces.component.html.HtmlDataTable in project TNTConcept by autentia.
the class TutorialBean method letterClicked.
/**
* Handle an ABC pager letter click: filter objects by specified starting letter
*/
public void letterClicked() {
if (letter != null) {
UIComponent comp = FacesUtils.getComponent("tutorials:list");
HtmlDataTable tabla = (HtmlDataTable) comp;
tabla.setFirst(0);
search.setName(letter + "%");
} else {
search.unsetName();
}
}
use of javax.faces.component.html.HtmlDataTable in project TNTConcept by autentia.
the class FinancialRatioBean method letterClicked.
/**
* Handle an ABC pager letter click: filter objects by specified starting letter
*/
public void letterClicked() {
if (letter != null) {
UIComponent comp = FacesUtils.getComponent("financialRatios:list");
HtmlDataTable tabla = (HtmlDataTable) comp;
tabla.setFirst(0);
search.setTitle(letter + "%");
} else {
search.unsetTitle();
}
}
use of javax.faces.component.html.HtmlDataTable in project liferay-faces-alloy by liferay.
the class ColumnRenderer method encodeBegin.
@Override
public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
ResponseWriter responseWriter = facesContext.getResponseWriter();
UIComponent parent = uiComponent.getParent();
if (!((parent instanceof HtmlDataTable) || (parent instanceof HtmlPanelGrid))) {
responseWriter.startElement("div", uiComponent);
String clientId = uiComponent.getClientId(facesContext);
responseWriter.writeAttribute("id", clientId, null);
Column column = (Column) uiComponent;
StringBuilder classNames = new StringBuilder();
String size = column.getSize();
size = getColumnCSSClassSize(size);
Integer span = column.getSpan();
if (span != null) {
if ((span < 1) || (span > Column.COLUMNS)) {
throw new IOException("span number must be between 1 and " + Column.COLUMNS);
}
}
Integer width = column.getWidth();
if (width != null) {
if ((width < 1) || (width > 100)) {
throw new IOException("width must be between 1 and 100");
}
span = getColumnUnitSize(width);
}
classNames.append("col-");
classNames.append(size);
classNames.append("-");
classNames.append(span);
Integer offset = column.getOffset();
if (offset != null) {
if ((offset < 1) || (offset > Column.COLUMNS)) {
throw new IOException("offset must be between 1 and " + Column.COLUMNS);
}
}
Integer offsetWidth = column.getOffsetWidth();
if (offsetWidth != null) {
if ((offsetWidth < 1) || (offsetWidth > 100)) {
throw new IOException("offsetWidth must be between 1 and 100");
}
offset = getColumnUnitSize(offsetWidth);
}
if (offset != null) {
classNames.append(" ");
classNames.append("col-");
classNames.append(size);
classNames.append("-offset-");
classNames.append(offset);
}
RendererUtil.encodeStyleable(responseWriter, column, classNames.toString());
}
}
use of javax.faces.component.html.HtmlDataTable in project gdmatrix by gdmatrix.
the class AgendaBean method nextEvents.
// ACTIONS
/**
* Loads <code>eventsTable</code> and <code>eventTypes</code> with data.
* Could be invoked in first request from menu or coming back from an event
* description view.
* In this second case, <code>currentFirstPage</code> is asigned to
* <code>eventsTable</code><code>first</code> property to recover current
* page of the scroller.
*
* @return outcome to the agenda (event list) view
*/
public String nextEvents() {
Map requestParameters = getExternalContext().getRequestParameterMap();
String eventId = (String) requestParameters.get("eventid");
if (eventId != null) {
try {
currentEvent = loadEvent(eventId);
eventPlaces = findEventPlaces();
eventDocuments = findEventDocuments();
return "goEvent";
} catch (Exception ex) {
ex.printStackTrace();
getExternalContext().log(ex.getMessage());
}
} else {
// Component constructions
eventsTable = new HtmlDataTable();
eventsTable.setValue(find());
if (currentFirstPage != 0)
eventsTable.setFirst(currentFirstPage);
eventTypes = new UISelectItems();
// eventTypes.setValue(findEventTypes());
}
return "agenda";
}
Aggregations