Examples of HtmlDataTable


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

    {
        String rowStyleClass;
        String rowStyle;
        if (uiData instanceof HtmlDataTable)
        {
            HtmlDataTable datatable = (HtmlDataTable) uiData;
            rowStyleClass = datatable.getRowStyleClass();
            rowStyle = datatable.getRowStyle();
        }
        else
        {
            rowStyleClass = (String) uiData.getAttributes().get(JSFAttr.ROW_STYLECLASS_ATTR);
            rowStyle = (String) uiData.getAttributes().get(JSFAttr.ROW_STYLE_ATTR);
View Full Code Here

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

                                    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;

            if (component instanceof HtmlColumn && amISpannedOver(null, component))
View Full Code Here

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

    {       
        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

    {       
        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 deleteCountry(ActionEvent ev)
    {
        UIComponent comp = ev.getComponent();
        HtmlDataTable dataTable = (HtmlDataTable) comp.getParent().getParent();
        getCountries().remove(dataTable.getRowIndex());
    }
View Full Code Here

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

    {
        super.broadcast(event);

        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))
                {
                    dataTable.setSortColumn(getColumnName());
                    dataTable.setSortAscending(!currentAscending);
                }
                else
                {
                    dataTable.setSortColumn(getColumnName());
                    dataTable.setSortAscending(true);
                }
            }
        }
    }
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.isArrow() && sortHeader.getColumnName().equals(dataTable.getSortColumn()))
            {
                ResponseWriter writer = facesContext.getResponseWriter();

                if (dataTable.isSortAscending())
                {
                    writer.write("↑");
                }
                else
                {
View Full Code Here

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

                    throws IOException
    {
        super.renderRowStart(facesContext, writer, uiData, rowStyleClassIterator);

        // get event handlers from component
        HtmlDataTable table = (HtmlDataTable) uiData;
       
        renderRowAttribute(writer, HTML.ONCLICK_ATTR, table.getRowOnClick());
        renderRowAttribute(writer, HTML.ONDBLCLICK_ATTR, table.getRowOnDblClick());
        renderRowAttribute(writer, HTML.ONKEYDOWN_ATTR, table.getRowOnKeyDown());
        renderRowAttribute(writer, HTML.ONKEYPRESS_ATTR, table.getRowOnKeyPress());
        renderRowAttribute(writer, HTML.ONKEYUP_ATTR, table.getRowOnKeyUp());
        renderRowAttribute(writer, HTML.ONMOUSEDOWN_ATTR, table.getRowOnMouseDown());
        renderRowAttribute(writer, HTML.ONMOUSEMOVE_ATTR, table.getRowOnMouseMove());
        renderRowAttribute(writer, HTML.ONMOUSEOUT_ATTR, table.getRowOnMouseOut());
        renderRowAttribute(writer, HTML.ONMOUSEOVER_ATTR, table.getRowOnMouseOver());
        renderRowAttribute(writer, HTML.ONMOUSEUP_ATTR, table.getRowOnMouseUp());
    }
View Full Code Here

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

    {
      String rowStyleClass;
      String rowStyle;
      if (uiData instanceof HtmlDataTable)
      {
        HtmlDataTable datatable = (HtmlDataTable) uiData;
        rowStyleClass = datatable.getRowStyleClass();
        rowStyle = datatable.getRowStyle();
      }
      else
      {
        rowStyleClass = (String) uiData.getAttributes().get(JSFAttr.ROW_STYLECLASS_ATTR);
        rowStyle = (String) uiData.getAttributes().get(JSFAttr.ROW_STYLE_ATTR);
View Full Code Here

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

     */
    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
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.