Examples of HtmlDataTable


Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

                                    ResponseWriter writer, UIData uiData,
                                    UIComponent component, Styles styles, int columnStyleIndex)
        throws IOException {
        if (isGroupedTable(uiData)) {

            HtmlDataTable htmlDataTable = (HtmlDataTable) uiData;
            List tableChildren = htmlDataTable.getChildren();

            int first = htmlDataTable.getFirst();
            int rowInfoIndex = htmlDataTable.getRowIndex() - first;
            int columnInfoIndex = tableChildren.indexOf(component);

            RowInfo rowInfo = (RowInfo) htmlDataTable.getTableContext().getRowInfos().get(rowInfoIndex);
            ColumnInfo columnInfo = (ColumnInfo) rowInfo.getColumnInfos().get(columnInfoIndex);

            if (!columnInfo.isRendered()) {
                return;
            }
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    protected void beforeColumn(FacesContext facesContext, UIData uiData, int columnIndex) throws IOException {
        super.beforeColumn(facesContext, uiData, columnIndex);

        if (uiData instanceof HtmlDataTable) {
            HtmlDataTable dataTable = (HtmlDataTable) uiData;

            putSortedReqScopeParam(facesContext, dataTable, columnIndex);
        }
    }
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    protected void beforeColumnHeaderOrFooter(FacesContext facesContext, UIData uiData, boolean header, int columnIndex) throws IOException {
        super.beforeColumnHeaderOrFooter(facesContext, uiData, header, columnIndex);

        if (header && uiData instanceof HtmlDataTable) {
            HtmlDataTable dataTable = (HtmlDataTable) uiData;

            putSortedReqScopeParam(facesContext, dataTable, columnIndex);
        }
    }
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    public void broadcast(FacesEvent event) throws AbortProcessingException
    {
        if (event instanceof ActionEvent)
        {
            HtmlDataTable dataTable = findParentDataTable();
            if (dataTable == null)
            {
                log.error("CommandSortHeader has no MyFacesHtmlDataTable parent");
            }
            else
            {
                String colName = getColumnName();                               
                String currentSortColumn = dataTable.getSortColumn();                               
               
                boolean currentAscending = dataTable.isSortAscending();
               
                if (colName.equals(currentSortColumn))
                {
                    String propName = getPropertyName();                      
                    if (propName != null)
                        dataTable.setSortProperty(getPropertyName());                       
                   
                    dataTable.setSortColumn(getColumnName());
                    dataTable.setSortAscending(!currentAscending);
                }
                else
                {
                    dataTable.setSortProperty(getPropertyName());
                    dataTable.setSortColumn(getColumnName());
                    dataTable.setSortAscending(true);
                }
            }
        }
        super.broadcast(event);
    }      
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    {
        RendererUtils.checkParamValidity(facesContext, component, HtmlCommandSortHeader.class);
        if (UserRoleUtils.isEnabledOnUserRole(component))
        {
            HtmlCommandSortHeader sortHeader = (HtmlCommandSortHeader)component;
            HtmlDataTable dataTable = sortHeader.findParentDataTable();
           
            if (sortHeader.getColumnName().equals(dataTable.getSortColumn()))
            {
                UIComponent img = (dataTable.isSortAscending())
                                  ? sortHeader.getFacet(FACET_ASCENDING)
                                  : sortHeader.getFacet(FACET_DESCENDING);
                // render directional image
                if (img != null)
                {
                    RendererUtils.renderChild(facesContext, img);
                }
                // render directional character
                if (sortHeader.isArrow())
                {
                    ResponseWriter writer = facesContext.getResponseWriter();
                    writer.write((dataTable.isSortAscending()) ? "↑" : "↓");
                }
            }           
        }
        super.encodeEnd(facesContext, component);
    }
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    }

    protected boolean isEmbeddedTable(UIComponent uiComponent) {
        boolean embedded = false;
        if (uiComponent instanceof HtmlDataTable) {
            HtmlDataTable table = (HtmlDataTable) uiComponent;
            embedded = table.isEmbedded();
        }
        return embedded;
    }
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

     */
    private void renderDetailRow(FacesContext facesContext, UIData uiData) throws IOException {
        UIComponent detailStampFacet = uiData.getFacet(DETAIL_STAMP_FACET_NAME);

        if (uiData instanceof HtmlDataTable) {
            HtmlDataTable htmlDataTable = (HtmlDataTable) uiData;

            if (htmlDataTable.isCurrentDetailExpanded()) {

                boolean embedded = false;
                if (detailStampFacet != null) {
                    embedded = isEmbeddedTable(detailStampFacet);
                }
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    /**
     * @see org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
     */
    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
        if (uiComponent instanceof HtmlDataTable) {
            HtmlDataTable htmlDataTable = (HtmlDataTable) uiComponent;
            if (htmlDataTable.isRenderedIfEmpty() || htmlDataTable.getRowCount() > 0) {
                super.encodeBegin(facesContext, uiComponent);
            }
        }
        else {
            super.encodeBegin(facesContext, uiComponent);
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    /**
     * @see org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase#encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
     */
    public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {
        if (component instanceof HtmlDataTable) {
            HtmlDataTable htmlDataTable = (HtmlDataTable) component;
            if (htmlDataTable.isRenderedIfEmpty() || htmlDataTable.getRowCount() > 0) {
                super.encodeChildren(facesContext, component);
            }
        }
        else {
            super.encodeChildren(facesContext, component);
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlDataTable

    /**
     * @see org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
     */
    public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {
        if (uiComponent instanceof HtmlDataTable) {
            HtmlDataTable htmlDataTable = (HtmlDataTable) uiComponent;
            if (htmlDataTable.isRenderedIfEmpty() || htmlDataTable.getRowCount() > 0) {
                super.encodeEnd(facesContext, uiComponent);
            }
        }
        else {
            super.encodeEnd(facesContext, uiComponent);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.