Author: lofwyr Date: Wed Nov 2 08:54:23 2016 New Revision: 1767622 URL: http://svn.apache.org/viewvc?rev=1767622&view=rev Log: update site after release 3.0.0-alpha-7 Added: myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/component/UIFigure.html myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFigure.html myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFormBase.html myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/taglib/component/FigureTagDeclaration.html myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/renderkit/FigureRenderer.html myfaces/site/publish/tobago/tobago-example/tobago-example-demo/xref/org/apache/myfaces/tobago/example/demo/ResizeController.html myfaces/site/publish/tobago/tobago-theme/tobago-theme-standard/xref/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/component/UIFigure.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/example/demo/ResizeController.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFigure.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFormBase.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/internal/taglib/component/FigureTagDeclaration.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/renderkit/FigureRenderer.html myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.html Added: myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/component/UIFigure.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/component/UIFigure.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/component/UIFigure.html (added) +++ myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/component/UIFigure.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,150 @@ + + + +UIFigure xref + + + +
View Javadoc
+1   // ---------- Attention: Generated code, please do not modify! -----------  
+2   
+3   /*
+4    * Licensed to the Apache Software Foundation (ASF) under one or more
+5    * contributor license agreements.  See the NOTICE file distributed with
+6    * this work for additional information regarding copyright ownership.
+7    * The ASF licenses this file to You under the Apache License, Version 2.0
+8    * (the "License"); you may not use this file except in compliance with
+9    * the License.  You may obtain a copy of the License at
+10   *
+11   *      http://www.apache.org/licenses/LICENSE-2.0
+12   *
+13   * Unless required by applicable law or agreed to in writing, software
+14   * distributed under the License is distributed on an "AS IS" BASIS,
+15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+16   * See the License for the specific language governing permissions and
+17   * limitations under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.component;
+21  
+22  import javax.faces.context.FacesContext;
+23  import org.apache.myfaces.tobago.context.Markup;
+24  import org.apache.myfaces.tobago.internal.component.AbstractUIFigure;
+25  import org.apache.myfaces.tobago.renderkit.css.CustomClass;
+26  import org.apache.myfaces.tobago.renderkit.css.Style;
+27  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
+28  import org.apache.myfaces.tobago.internal.util.StringUtils;
+29  import org.apache.myfaces.tobago.internal.util.Deprecation;
+30  import javax.el.ELException;
+31  import javax.faces.FacesException;
+32  import java.util.ArrayList;
+33  import java.util.List;
+34  import javax.el.MethodExpression;
+35  import javax.el.ValueExpression;
+36  
+37  /** 
+38   Use figure to show e. g. images or videos inside.
+39    * UIComponent class, generated from template {@code component.stg} with class
+40    * {@link org.apache.myfaces.tobago.internal.taglib.component.FigureTagDeclaration}.
+41   */
+42  public class UIFigure
+43      extends AbstractUIFigure implements Visual {
+44  
+45    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Figure";
+46  
+47    public static final String COMPONENT_FAMILY = "javax.faces.Panel";
+48  
+49  
+50    enum PropertyKeys {
+51      markup,
+52      customClass,
+53      style,
+54      tip,
+55      label,
+56    }
+57  
+58    public String getFamily() {
+59      return COMPONENT_FAMILY;
+60    }
+61  
+62  
+63    public org.apache.myfaces.tobago.context.Markup getMarkup() {
+64      Object object = getStateHelper().eval(PropertyKeys.markup);
+65      if (object != null) {
+66        return Markup.valueOf(object);
+67      }
+68      return null;
+69    }
+70  
+71    public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
+72      getStateHelper().put(PropertyKeys.markup, markup);
+73    }
+74  
+75    /**
+76    Sets a CSS class in its parent, if the parent supports it.
+77  
+78     Which this feature it is possible to put a CSS class name into a component with the <tc:style> tag. Example:
+79  
+80     <pre>
+81     &lt;tc:in&gt;
+82       &lt;tc:style customClass="my-emphasized"/&gt;
+83     &lt;/tc:in&gt;
+84     </pre>
+85  
+86     One capability is, to used external CSS libs.
+87     <br>
+88     This feature should not be used imprudent.
+89     Because it might be unstable against changes in the renderered HTML code.
+90  
+91    */
+92    public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
+93      return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
+94    }
+95  
+96    public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
+97      getStateHelper().put(PropertyKeys.customClass, customClass);
+98    }
+99  
+100   /**
+101   For internal use. Used for rendering, if there is a child tag &lt;tc:style&gt;
+102 
+103   */
+104   public org.apache.myfaces.tobago.renderkit.css.Style getStyle() {
+105     return (org.apache.myfaces.tobago.renderkit.css.Style) getStateHelper().eval(PropertyKeys.style);
+106   }
+107 
+108   public void setStyle(org.apache.myfaces.tobago.renderkit.css.Style style) {
+109     getStateHelper().put(PropertyKeys.style, style);
+110   }
+111 
+112   /**
+113   Text value to display as tooltip.
+114 
+115   */
+116   public java.lang.String getTip() {
+117     return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
+118   }
+119 
+120   public void setTip(java.lang.String tip) {
+121     getStateHelper().put(PropertyKeys.tip, tip);
+122   }
+123 
+124   /**
+125   A localized user presentable label for this component.
+126 
+127   */
+128   public java.lang.String getLabel() {
+129     return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
+130   }
+131 
+132   public void setLabel(java.lang.String label) {
+133     getStateHelper().put(PropertyKeys.label, label);
+134   }
+135 
+136 
+137 }
+
+
+ + + Added: myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFigure.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFigure.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFigure.html (added) +++ myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFigure.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,38 @@ + + + +AbstractUIFigure xref + + + +
View Javadoc
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   *   http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.internal.component;
+21  
+22  public abstract class AbstractUIFigure extends AbstractUIPanelBase {
+23  
+24    public abstract String getLabel();
+25  }
+
+
+ + + Added: myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFormBase.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFormBase.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFormBase.html (added) +++ myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/component/AbstractUIFormBase.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,113 @@ + + + +AbstractUIFormBase xref + + + +
View Javadoc
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   *   http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.internal.component;
+21  
+22  import org.apache.myfaces.tobago.util.AjaxUtils;
+23  import org.apache.myfaces.tobago.util.ComponentUtils;
+24  import org.slf4j.Logger;
+25  import org.slf4j.LoggerFactory;
+26  
+27  import javax.faces.component.UIComponent;
+28  import javax.faces.component.UIForm;
+29  import javax.faces.context.FacesContext;
+30  import java.util.Iterator;
+31  
+32  public abstract class AbstractUIFormBase extends UIForm {
+33  
+34    private static final Logger LOG = LoggerFactory.getLogger(AbstractUIFormBase.class);
+35  
+36    @Override
+37    public void processDecodes(final FacesContext facesContext) {
+38  
+39      // Process this component first
+40      // to know the active actionId
+41      // for the following children
+42      decode(facesContext);
+43  
+44      final Iterator kids = getFacetsAndChildren();
+45      while (kids.hasNext()) {
+46        final UIComponent kid = (UIComponent) kids.next();
+47        kid.processDecodes(facesContext);
+48      }
+49    }
+50  
+51    @Override
+52    public void setSubmitted(final boolean b) {
+53      super.setSubmitted(b);
+54  
+55      // set submitted for all subforms
+56      for (final AbstractUIForm subForm : ComponentUtils.findSubForms(this)) {
+57        subForm.setSubmitted(b);
+58      }
+59    }
+60  
+61    @Override
+62    public void processValidators(final FacesContext facesContext) {
+63      // if we're not the submitted form, only process subforms.
+64      if (LOG.isDebugEnabled()) {
+65        LOG.debug("processValidators for form: {}", getClientId(facesContext));
+66      }
+67      if (isSubmitted() || AjaxUtils.isAjaxRequest(facesContext)) {
+68        // Process all facets and children of this component
+69        final Iterator kids = getFacetsAndChildren();
+70        while (kids.hasNext()) {
+71          final UIComponent kid = (UIComponent) kids.next();
+72          kid.processValidators(facesContext);
+73        }
+74      } else {
+75        for (final AbstractUIForm subForm : ComponentUtils.findSubForms(this)) {
+76          subForm.processValidators(facesContext);
+77        }
+78      }
+79    }
+80  
+81    @Override
+82    public void processUpdates(final FacesContext facesContext) {
+83      // if we're not the submitted form, only process subforms.
+84      if (LOG.isDebugEnabled()) {
+85        LOG.debug("processUpdates for form: {}", getClientId(facesContext));
+86      }
+87      if (isSubmitted() || AjaxUtils.isAjaxRequest(facesContext)) {
+88        // Process all facets and children of this component
+89        final Iterator kids = getFacetsAndChildren();
+90        while (kids.hasNext()) {
+91          final UIComponent kid = (UIComponent) kids.next();
+92          kid.processUpdates(facesContext);
+93        }
+94      } else {
+95        for (final AbstractUIForm subForm : ComponentUtils.findSubForms(this)) {
+96          subForm.processUpdates(facesContext);
+97        }
+98      }
+99    }
+100 }
+
+
+ + + Added: myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/taglib/component/FigureTagDeclaration.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/taglib/component/FigureTagDeclaration.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/taglib/component/FigureTagDeclaration.html (added) +++ myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/internal/taglib/component/FigureTagDeclaration.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,64 @@ + + + +FigureTagDeclaration xref + + + +
View Javadoc
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   *   http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.internal.taglib.component;
+21  
+22  import org.apache.myfaces.tobago.apt.annotation.Facet;
+23  import org.apache.myfaces.tobago.apt.annotation.Tag;
+24  import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+25  import org.apache.myfaces.tobago.component.Facets;
+26  import org.apache.myfaces.tobago.component.RendererTypes;
+27  import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+28  import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
+29  import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+30  import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
+31  
+32  import javax.faces.component.UIPanel;
+33  
+34  /**
+35   * Use figure to show e. g. images or videos inside.
+36   */
+37  @Tag(name = "figure")
+38  @UIComponentTag(
+39      uiComponent = "org.apache.myfaces.tobago.component.UIFigure",
+40      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIFigure",
+41      uiComponentFacesClass = "javax.faces.component.UIPanel",
+42      componentFamily = UIPanel.COMPONENT_FAMILY,
+43      rendererType = RendererTypes.FIGURE,
+44      interfaces = "org.apache.myfaces.tobago.component.Visual",
+45      facets = {
+46          @Facet(
+47              name = Facets.LABEL,
+48              description = "Contains some code to be placed in the header at the label position.")})
+49  public interface FigureTagDeclaration
+50      extends HasIdBindingAndRendered, IsVisual, HasTip, HasLabel {
+51  }
+
+
+ + + Added: myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/renderkit/FigureRenderer.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/renderkit/FigureRenderer.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/renderkit/FigureRenderer.html (added) +++ myfaces/site/publish/tobago/tobago-core/xref/org/apache/myfaces/tobago/renderkit/FigureRenderer.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,48 @@ + + + +FigureRenderer xref + + + +
View Javadoc
+1   // ---------- Attention: Generated code, please do not modify! -----------  
+2   
+3   /*
+4    * Licensed to the Apache Software Foundation (ASF) under one or more
+5    * contributor license agreements.  See the NOTICE file distributed with
+6    * this work for additional information regarding copyright ownership.
+7    * The ASF licenses this file to You under the Apache License, Version 2.0
+8    * (the "License"); you may not use this file except in compliance with
+9    * the License.  You may obtain a copy of the License at
+10   *
+11   *      http://www.apache.org/licenses/LICENSE-2.0
+12   *
+13   * Unless required by applicable law or agreed to in writing, software
+14   * distributed under the License is distributed on an "AS IS" BASIS,
+15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+16   * See the License for the specific language governing permissions and
+17   * limitations under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.renderkit;
+21  
+22  
+23  /** 
+24   * Renderer class, generated from template {@code renderer.stg} with class 
+25   * {@link }.
+26   */
+27  public final class FigureRenderer
+28      extends AbstractRendererBaseWrapper  {
+29  
+30    @Override
+31    protected final String getRendererType() {
+32  	  return "Figure";
+33  	}
+34  
+35  }
+
+
+ + + Added: myfaces/site/publish/tobago/tobago-example/tobago-example-demo/xref/org/apache/myfaces/tobago/example/demo/ResizeController.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-example/tobago-example-demo/xref/org/apache/myfaces/tobago/example/demo/ResizeController.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-example/tobago-example-demo/xref/org/apache/myfaces/tobago/example/demo/ResizeController.html (added) +++ myfaces/site/publish/tobago/tobago-example/tobago-example-demo/xref/org/apache/myfaces/tobago/example/demo/ResizeController.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,49 @@ + + + +ResizeController xref + + + +
View Javadoc
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   *   http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.example.demo;
+21  
+22  import org.slf4j.Logger;
+23  import org.slf4j.LoggerFactory;
+24  
+25  import javax.enterprise.inject.Model;
+26  
+27  @Model
+28  public class ResizeController {
+29  
+30    private static final Logger LOG = LoggerFactory.getLogger(ResizeController.class);
+31  
+32    public String resize() {
+33      LOG.info("Method resize() was called!");
+34      return null;
+35    }
+36  }
+
+
+ + + Added: myfaces/site/publish/tobago/tobago-theme/tobago-theme-standard/xref/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/tobago-theme/tobago-theme-standard/xref/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/tobago-theme/tobago-theme-standard/xref/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.html (added) +++ myfaces/site/publish/tobago/tobago-theme/tobago-theme-standard/xref/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FigureRenderer.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,91 @@ + + + +FigureRenderer xref + + + +
View Javadoc
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   *   http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
+21  
+22  import org.apache.myfaces.tobago.component.Facets;
+23  import org.apache.myfaces.tobago.internal.component.AbstractUIFigure;
+24  import org.apache.myfaces.tobago.renderkit.RendererBase;
+25  import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
+26  import org.apache.myfaces.tobago.renderkit.css.Classes;
+27  import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
+28  import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
+29  import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
+30  import org.apache.myfaces.tobago.util.ComponentUtils;
+31  import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+32  
+33  import javax.faces.component.UIComponent;
+34  import javax.faces.context.FacesContext;
+35  import java.io.IOException;
+36  
+37  public class FigureRenderer extends RendererBase {
+38  
+39    @Override
+40    public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
+41      final AbstractUIFigure figure = (AbstractUIFigure) component;
+42      final TobagoResponseWriter writer = getResponseWriter(facesContext);
+43      writer.startElement(HtmlElements.FIGURE);
+44      writer.writeClassAttribute(Classes.create(figure), BootstrapClass.FIGURE, figure.getCustomClass());
+45      writer.writeStyleAttribute(figure.getStyle());
+46      final String tip = figure.getTip();
+47      if (tip != null) {
+48        writer.writeAttribute(HtmlAttributes.TITLE, tip, true);
+49      }
+50  
+51      writer.startElement(HtmlElements.DIV);
+52      writer.writeClassAttribute(BootstrapClass.FIGURE_IMG);
+53    }
+54  
+55    @Override
+56    public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
+57      final AbstractUIFigure figure = (AbstractUIFigure) component;
+58      final UIComponent label = ComponentUtils.getFacet(figure, Facets.label);
+59      final String labelString = figure.getLabel();
+60  
+61      final TobagoResponseWriter writer = getResponseWriter(facesContext);
+62  
+63      writer.endElement(HtmlElements.DIV);
+64  
+65      if (labelString != null || label != null) {
+66        writer.startElement(HtmlElements.FIGCAPTION);
+67        writer.writeClassAttribute(BootstrapClass.FIGURE_CAPTION);
+68        if (labelString != null) {
+69          writer.writeText(labelString);
+70        }
+71        if (label != null) {
+72          RenderUtils.encode(facesContext, label);
+73        }
+74        writer.endElement(HtmlElements.FIGCAPTION);
+75      }
+76      writer.endElement(HtmlElements.FIGURE);
+77    }
+78  }
+
+
+ + + Added: myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/component/UIFigure.html URL: http://svn.apache.org/viewvc/myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/component/UIFigure.html?rev=1767622&view=auto ============================================================================== --- myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/component/UIFigure.html (added) +++ myfaces/site/publish/tobago/xref/org/apache/myfaces/tobago/component/UIFigure.html Wed Nov 2 08:54:23 2016 @@ -0,0 +1,150 @@ + + + +UIFigure xref + + + +
View Javadoc
+1   // ---------- Attention: Generated code, please do not modify! -----------  
+2   
+3   /*
+4    * Licensed to the Apache Software Foundation (ASF) under one or more
+5    * contributor license agreements.  See the NOTICE file distributed with
+6    * this work for additional information regarding copyright ownership.
+7    * The ASF licenses this file to You under the Apache License, Version 2.0
+8    * (the "License"); you may not use this file except in compliance with
+9    * the License.  You may obtain a copy of the License at
+10   *
+11   *      http://www.apache.org/licenses/LICENSE-2.0
+12   *
+13   * Unless required by applicable law or agreed to in writing, software
+14   * distributed under the License is distributed on an "AS IS" BASIS,
+15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+16   * See the License for the specific language governing permissions and
+17   * limitations under the License.
+18   */
+19  
+20  package org.apache.myfaces.tobago.component;
+21  
+22  import javax.faces.context.FacesContext;
+23  import org.apache.myfaces.tobago.context.Markup;
+24  import org.apache.myfaces.tobago.internal.component.AbstractUIFigure;
+25  import org.apache.myfaces.tobago.renderkit.css.CustomClass;
+26  import org.apache.myfaces.tobago.renderkit.css.Style;
+27  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
+28  import org.apache.myfaces.tobago.internal.util.StringUtils;
+29  import org.apache.myfaces.tobago.internal.util.Deprecation;
+30  import javax.el.ELException;
+31  import javax.faces.FacesException;
+32  import java.util.ArrayList;
+33  import java.util.List;
+34  import javax.el.MethodExpression;
+35  import javax.el.ValueExpression;
+36  
+37  /** 
+38   Use figure to show e. g. images or videos inside.
+39    * UIComponent class, generated from template {@code component.stg} with class
+40    * {@link org.apache.myfaces.tobago.internal.taglib.component.FigureTagDeclaration}.
+41   */
+42  public class UIFigure
+43      extends AbstractUIFigure implements Visual {
+44  
+45    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Figure";
+46  
+47    public static final String COMPONENT_FAMILY = "javax.faces.Panel";
+48  
+49  
+50    enum PropertyKeys {
+51      markup,
+52      customClass,
+53      style,
+54      tip,
+55      label,
+56    }
+57  
+58    public String getFamily() {
+59      return COMPONENT_FAMILY;
+60    }
+61  
+62  
+63    public org.apache.myfaces.tobago.context.Markup getMarkup() {
+64      Object object = getStateHelper().eval(PropertyKeys.markup);
+65      if (object != null) {
+66        return Markup.valueOf(object);
+67      }
+68      return null;
+69    }
+70  
+71    public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
+72      getStateHelper().put(PropertyKeys.markup, markup);
+73    }
+74  
+75    /**
+76    Sets a CSS class in its parent, if the parent supports it.
+77  
+78     Which this feature it is possible to put a CSS class name into a component with the &lt;tc:style&gt; tag. Example:
+79  
+80     <pre>
+81     &lt;tc:in&gt;
+82       &lt;tc:style customClass="my-emphasized"/&gt;
+83     &lt;/tc:in&gt;
+84     </pre>
+85  
+86     One capability is, to used external CSS libs.
+87     <br>
+88     This feature should not be used imprudent.
+89     Because it might be unstable against changes in the renderered HTML code.
+90  
+91    */
+92    public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
+93      return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
+94    }
+95  
+96    public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
+97      getStateHelper().put(PropertyKeys.customClass, customClass);
+98    }
+99  
+100   /**
+101   For internal use. Used for rendering, if there is a child tag &lt;tc:style&gt;
+102 
+103   */
+104   public org.apache.myfaces.tobago.renderkit.css.Style getStyle() {
+105     return (org.apache.myfaces.tobago.renderkit.css.Style) getStateHelper().eval(PropertyKeys.style);
+106   }
+107 
+108   public void setStyle(org.apache.myfaces.tobago.renderkit.css.Style style) {
+109     getStateHelper().put(PropertyKeys.style, style);
+110   }
+111 
+112   /**
+113   Text value to display as tooltip.
+114 
+115   */
+116   public java.lang.String getTip() {
+117     return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
+118   }
+119 
+120   public void setTip(java.lang.String tip) {
+121     getStateHelper().put(PropertyKeys.tip, tip);
+122   }
+123 
+124   /**
+125   A localized user presentable label for this component.
+126 
+127   */
+128   public java.lang.String getLabel() {
+129     return (java.lang.String) getStateHelper().eval(PropertyKeys.label);
+130   }
+131 
+132   public void setLabel(java.lang.String label) {
+133     getStateHelper().put(PropertyKeys.label, label);
+134   }
+135 
+136 
+137 }
+
+
+ + +