You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/12/07 14:13:07 UTC
svn commit: r1773080 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/
tobago-example/tobago-example-demo/src/main/webapp...
Author: lofwyr
Date: Wed Dec 7 14:13:07 2016
New Revision: 1773080
URL: http://svn.apache.org/viewvc?rev=1773080&view=rev
Log:
TOBAGO-1656: Use <tc:gridLayout> without a facet, but surrounding to the components.
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/GridLayoutRenderer.java
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/20-panel/panel.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/21-error/error.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/23-transition/x-transition-after-sleep.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/25-facelets-as-resources/facelets-as-resources.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/content-security-policy.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/non-faces-request.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/x-fish-pond.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/70-grid-layout/grid-layout.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2000-selectItem/type-of-literals.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java Wed Dec 7 14:13:07 2016
@@ -32,9 +32,16 @@ import org.slf4j.LoggerFactory;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ComponentSystemEvent;
+import javax.faces.event.ComponentSystemEventListener;
+import javax.faces.event.ListenerFor;
+import javax.faces.event.PreRenderComponentEvent;
import java.util.List;
-public abstract class AbstractUIGridLayout extends AbstractUILayoutBase implements Visual {
+@ListenerFor(systemEventClass = PreRenderComponentEvent.class)
+public abstract class AbstractUIGridLayout extends AbstractUILayoutBase
+ implements Visual, ComponentSystemEventListener {
private static final Logger LOG = LoggerFactory.getLogger(AbstractUIGridLayout.class);
@@ -45,22 +52,27 @@ public abstract class AbstractUIGridLayo
/**
* Initialize the grid and remove the current width and height values from the component, recursively.
*/
- public void init() {
+ @Override
+ public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {
+
+ super.processEvent(event);
- final UIComponent parent = getParent();
- if (!parent.isRendered()) {
+ if (!isRendered()) {
return;
}
- grid = new Grid(LayoutTokens.parse(getColumns()), LayoutTokens.parse(getRows()));
+ if (event instanceof PreRenderComponentEvent) {
- final List<UIComponent> components = LayoutUtils.findLayoutChildren(parent);
- for (final UIComponent component : components) {
- final int columnSpan = ComponentUtils.getIntAttribute(component, Attributes.columnSpan, 1);
- final int rowSpan = ComponentUtils.getIntAttribute(component, Attributes.rowSpan, 1);
- grid.add(new OriginCell(component), columnSpan, rowSpan);
- if (LOG.isDebugEnabled()) {
- LOG.debug("\n" + grid);
+ grid = new Grid(LayoutTokens.parse(getColumns()), LayoutTokens.parse(getRows()));
+
+ final List<UIComponent> components = LayoutUtils.findLayoutChildren(this);
+ for (final UIComponent component : components) {
+ final int columnSpan = ComponentUtils.getIntAttribute(component, Attributes.columnSpan, 1);
+ final int rowSpan = ComponentUtils.getIntAttribute(component, Attributes.rowSpan, 1);
+ grid.add(new OriginCell(component), columnSpan, rowSpan);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("\n" + grid);
+ }
}
}
}
@@ -76,17 +88,9 @@ public abstract class AbstractUIGridLayo
public abstract boolean isRigid();
public Grid getGrid() {
- if (grid == null) {
- init();
- }
return grid;
}
- @Override
- public boolean getRendersChildren() {
- return false;
- }
-
public String toString() {
final StringBuilder builder = new StringBuilder();
builder.append(getClass().getSimpleName()).append("#");
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/GridLayoutRenderer.java?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/GridLayoutRenderer.java Wed Dec 7 14:13:07 2016
@@ -82,16 +82,14 @@ public class GridLayoutRenderer extends
}
@Override
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ @Override
public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
- final AbstractUIGridLayout gridLayout = (AbstractUIGridLayout) component;
-/*
- final UIComponent container = gridLayout.getParent();
- if (!container.isRendered()) {
- return;
- }
- RenderUtils.encodeChildren(facesContext, container);
-*/
+ final AbstractUIGridLayout gridLayout = (AbstractUIGridLayout) component;
final TobagoResponseWriter writer = getResponseWriter(facesContext);
final Grid grid = gridLayout.getGrid();
final int columns = grid.getColumnCount();
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/20-panel/panel.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/20-panel/panel.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/20-panel/panel.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/20-panel/panel.xhtml Wed Dec 7 14:13:07 2016
@@ -75,20 +75,4 @@
</tc:panel>
</tc:section>
- <tc:section label="Layout (deprecated)">
- <p>A panel can contain a <code class="language-markup"><f:facet name="layout"></code> tag.
- Currently, it can set a grid layout.</p>
- <p>Since this is deprecated, you better use flex layout or segment layout instead.</p>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="1*;1*" rows="auto;*"/>
- </f:facet>
- <tc:label value="Label 1"/>
- <tc:label value="Label 2"/>
- <tc:label value="Label 3"/>
- <tc:label value="Label 4"/>
- <tc:label value="Label 5"/>
- <tc:label value="Label 6"/>
- </tc:panel>
- </tc:section>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml Wed Dec 7 14:13:07 2016
@@ -22,33 +22,27 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<ui:param name="title" value="#{demoBundle.locale} - #{demoBundle.locale_title}"/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout rows="80px;auto;auto;auto"/>
- </f:facet>
+ <tc:gridLayout rows="80px;auto;auto;auto">
<tc:out escape="false" value="#{demoBundle.locale_text}"/>
- <tc:selectOneChoice value="#{clientConfigController2.locale}"
- label="#{demoBundle.locale}">
- <f:selectItems value="#{clientConfigController2.localeItems}"/>
- </tc:selectOneChoice>
+ <tc:selectOneChoice value="#{clientConfigController2.locale}"
+ label="#{demoBundle.locale}">
+ <f:selectItems value="#{clientConfigController2.localeItems}"/>
+ </tc:selectOneChoice>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="100px;*;100px"/>
- </f:facet>
+ <tc:gridLayout columns="100px;*;100px">
- <tc:image value="image/country.png" width="100px" height="100px"/>
+ <tc:image value="image/country.png" width="100px" height="100px"/>
- <tc:panel/>
+ <tc:panel/>
- <tc:panel>
- <tc:gridLayout rows="*;auto "/>
+ <tc:panel>
+ <tc:gridLayout rows="*;auto "/>
- <tc:panel/>
- <tc:button action="#{clientConfigController2.submit}" label="#{demoBundle.locale_submit}"/>
- </tc:panel>
+ <tc:panel/>
+ <tc:button action="#{clientConfigController2.submit}" label="#{demoBundle.locale_submit}"/>
</tc:panel>
- </tc:panel>
+ </tc:gridLayout>
+ </tc:gridLayout>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/21-error/error.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/21-error/error.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/21-error/error.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/21-error/error.xhtml Wed Dec 7 14:13:07 2016
@@ -22,16 +22,14 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
- <ui:param name="title" value="Sample Error Scenarios (Todo: is to be optimized) " />
+ <ui:param name="title" value="Sample Error Scenarios (Todo: is to be optimized) "/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout rows="35px;35px;35px;35px" columns="100px;*"/>
- </f:facet>
+ <tc:gridLayout rows="35px;35px;35px;35px" columns="100px;*">
<tc:flowLayout>
<tc:gridLayoutConstraint columnSpan="2"/>
- <tc:out value="When using MyFaces or Facelets you have to turn off the exception mechanism of them to use this demo. See in the MyFaces Wiki: "/>
+ <tc:out
+ value="When using MyFaces or Facelets you have to turn off the exception mechanism of them to use this demo. See in the MyFaces Wiki: "/>
<tc:link link="http://wiki.apache.org/myfaces/Handling_Server_Errors" label="Handling Server Errors"/>
</tc:flowLayout>
@@ -46,6 +44,6 @@
<tc:button action="syntax" label="Syntax Error"/>
<tc:out value="The navigation handler refers to a page with a syntax error."/>
- </tc:panel>
+ </tc:gridLayout>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/23-transition/x-transition-after-sleep.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/23-transition/x-transition-after-sleep.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/23-transition/x-transition-after-sleep.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/23-transition/x-transition-after-sleep.xhtml Wed Dec 7 14:13:07 2016
@@ -22,12 +22,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<ui:param name="title" value="Transition after sleep"/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout rows="auto"/>
- </f:facet>
- <tc:button label="Back" action="/content/30-concept/23-transition/transition.xhtml"/>
+ <tc:button label="Back" action="/content/30-concept/23-transition/transition.xhtml"/>
- </tc:panel>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/25-facelets-as-resources/facelets-as-resources.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/25-facelets-as-resources/facelets-as-resources.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/25-facelets-as-resources/facelets-as-resources.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/25-facelets-as-resources/facelets-as-resources.xhtml Wed Dec 7 14:13:07 2016
@@ -23,15 +23,11 @@
xmlns:f="http://java.sun.com/jsf/core">
<ui:param name="title" value="Loading Facelets from JARs"/>
<tc:panel>
- <f:facet name="layout">
- <tc:gridLayout rows="2*;7*"/>
- </f:facet>
-
<tc:out value="#{demoBundle.faceletsAsResources_text}"/>
<tc:box label="This content is included from a JAR.">
- <ui:include src="/data/edit-solar.xhtml" />
+ <ui:include src="/data/edit-solar.xhtml"/>
</tc:box>
</tc:panel>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/50-partial/partial.xhtml Wed Dec 7 14:13:07 2016
@@ -23,43 +23,32 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns="http://www.w3.org/1999/xhtml">
<ui:param name="title" value="Partial Update (AJAX)"/>
- <tc:panel id="parent">
- <f:facet name="layout">
- <tc:gridLayout rows="20px;200px;*;auto"/>
- </f:facet>
+ <tc:gridLayout id="parent" rows="20px;200px;*;auto">
<tc:out value="Demonstration and test of partial reload"/>
<tc:style file="content/50-partial/partial.css"/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="1*;1*"/>
- </f:facet>
+ <tc:gridLayout columns="1*;1*">
<tc:box label="Left panel" id="left">
- <f:facet name="layout">
- <tc:gridLayout rows="auto;*"/>
- </f:facet>
- <tc:label value="Current seconds on server: "/>
- <tc:out value="#{partialReloadController.currentDate}" markup="demoSeconds">
- <f:convertDateTime pattern="ss:SSS"/>
- </tc:out>
+ <tc:gridLayout rows="auto;*">
+ <tc:label value="Current seconds on server: "/>
+ <tc:out value="#{partialReloadController.currentDate}" markup="demoSeconds">
+ <f:convertDateTime pattern="ss:SSS"/>
+ </tc:out>
+ </tc:gridLayout>
</tc:box>
<tc:box label="Right panel" id="right">
- <f:facet name="layout">
- <tc:gridLayout rows="auto;*"/>
- </f:facet>
- <tc:label value="Current seconds on server: "/>
- <tc:out value="#{partialReloadController.currentDate}" markup="demoSeconds">
- <f:convertDateTime pattern="ss:SSS"/>
- </tc:out>
+ <tc:gridLayout rows="auto;*">
+ <tc:label value="Current seconds on server: "/>
+ <tc:out value="#{partialReloadController.currentDate}" markup="demoSeconds">
+ <f:convertDateTime pattern="ss:SSS"/>
+ </tc:out>
+ </tc:gridLayout>
</tc:box>
- </tc:panel>
+ </tc:gridLayout>
- <tc:panel>
- <f:facet name="layout">
- <tc:flowLayout/>
- </f:facet>
+ <tc:flowLayout>
<ul>
<li>Click on 'Reload Left' button to reload the left panel."</li>
<li>Click on 'Reload Right' button to reload the right panel."</li>
@@ -72,19 +61,13 @@
</ul>
</li>
</ul>
- </tc:panel>
+ </tc:flowLayout>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="*;205px;*"/>
- </f:facet>
+ <tc:gridLayout columns="*;205px;*">
<tc:panel/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="*;*" rows="auto;auto;auto;auto;auto;auto;auto;auto"/>
- </f:facet>
+ <tc:gridLayout columns="*;*" rows="auto;auto;auto;auto;auto;auto;auto;auto">
<tc:button label="Reload left" tip="Reload left side box"
action="#{partialReloadController.reload}">
@@ -126,7 +109,8 @@
<tc:panel id="navTest">
<tc:gridLayoutConstraint columnSpan="2"/>
- <tc:selectOneChoice fieldId="navSelect" value="#{partialReloadController.navigateActionValue}" label="On Change">
+ <tc:selectOneChoice fieldId="navSelect" value="#{partialReloadController.navigateActionValue}"
+ label="On Change">
<f:ajax execute="navTest"
render="navTest :page:header:headerInfo"
listener="#{partialReloadController.navigateAction}"/>
@@ -151,10 +135,10 @@
<f:ajax render="right :page:header:headerInfo"/>
</tc:button>
- </tc:panel>
+ </tc:gridLayout>
<tc:panel/>
- </tc:panel>
- </tc:panel>
+ </tc:gridLayout>
+ </tc:gridLayout>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/content-security-policy.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/content-security-policy.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/content-security-policy.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/80-security/content-security-policy.xhtml Wed Dec 7 14:13:07 2016
@@ -23,36 +23,32 @@
xmlns:f="http://java.sun.com/jsf/core">
<ui:param name="title" value="Content Security Policy"/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout rows="100px;*;*" columns="*;*"/>
- </f:facet>
+ Tobago supports Content Security Policy (CSP) to prevent cross-site
+ scripting (XSS) and related attacks.
+ <tc:link link="http://www.w3.org/TR/CSP/" label="Specification link"/>.
+ In short: The HTML page doesn't contain any JavaScript or CSS information.
+ All allowed sources for JavaScript, CSS and other resources have to be declared in special header.
+ If you have own renderers or own JavaScript in your application, this code also needs to support SCP, to use this feature.
- <tc:out escape="false" value=" Tobago supports Content Security Policy (CSP) to prevent cross-site
- scripting (XSS) and related attacks.
- Specification link http://www.w3.org/TR/CSP/
- In short: The HTML page doesn't contain any JavaScript or CSS information.
- All allowed sources for JavaScript, CSS and other resources have to be declared in special header.
- If you have own renderers or own JavaScript in your application, this code also needs to support SCP, to use this feature.
- ">
- <tc:gridLayoutConstraint columnSpan="2"/>
- </tc:out>
-
- <tc:box label="This box may be manipulated by JavaScript">
- <tc:panel id="panel">
- <tc:out value="When you can read this text, it hasn't been manipulated by JavaScript.
+ <tc:box label="This box may be manipulated by JavaScript">
+ <tc:style maxWidth="400px"/>
+ <tc:panel id="panel">
+ <tc:out value="When you can read this text, it hasn't been manipulated by JavaScript.
That means the CSP is working correctly."/>
- </tc:panel>
- <tc:script onload="cspDemo();">
- // <![CDATA[
- function cspDemo() {
- jQuery(Tobago.Utils.escapeClientId("page:panel")).html(
+ </tc:panel>
+ <script>
+ <![CDATA[
+ function cspDemo() {
+ jQuery(Tobago.Utils.escapeClientId("page:panel")).html(
"<span style='color: #ff0000; font-weight: bold;'>Attention: When you can read this text, the content was manipulated by JavaScript."
+ " It seems, your browser doesn't support CSP!</span>");
- }
- // ]]>
- </tc:script>
- </tc:box>
+ }
+
+ cspDemo();
+ ]]>
+ </script>
+ </tc:box>
+
+ <h5 class="alert alert-danger">This example is currently not working!</h5>
- </tc:panel>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/non-faces-request.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/non-faces-request.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/non-faces-request.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/non-faces-request.xhtml Wed Dec 7 14:13:07 2016
@@ -25,9 +25,6 @@
<ui:param name="title" value="Non-Faces-Request Demo: Start"/>
<tc:panel>
- <f:facet name="layout">
- <tc:flowLayout/>
- </f:facet>
<p>
This demo works with <f:viewParam>.<br/>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/x-fish-pond.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/x-fish-pond.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/x-fish-pond.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/90-non-faces-request/x-fish-pond.xhtml Wed Dec 7 14:13:07 2016
@@ -25,28 +25,21 @@
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="fishId" value="#{fishPond.selectedFishId}" />
+ <f:viewParam name="fishId" value="#{fishPond.selectedFishId}"/>
<f:event type="preRenderView" listener="#{fishPond.action}"/>
</f:metadata>
</ui:define>
<tc:panel id="pond">
- <f:facet name="layout">
- <tc:gridLayout rows="auto;auto" margin="20px"/>
- </f:facet>
-
<tc:in label="Selected:" value="#{fishPond.selectedFish}" readonly="true"/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="auto;auto;*"/>
- </f:facet>
+ <tc:buttons>
<tc:button label="random" action="#{fishPond.random}">
<f:ajax render="pond :page:header:headerInfo" execute="pond"/>
</tc:button>
- <tc:button label="back to start" action="/content/90-non-faces-request/non-faces-request.xhtml"/>
- </tc:panel>
+ <tc:button label="back to start" action="/content/30-concept/90-non-faces-request/non-faces-request.xhtml"/>
+ </tc:buttons>
</tc:panel>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/70-grid-layout/grid-layout.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/70-grid-layout/grid-layout.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/70-grid-layout/grid-layout.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/35-deprecated/70-grid-layout/grid-layout.xhtml Wed Dec 7 14:13:07 2016
@@ -38,32 +38,31 @@
<tc:section label="GridLayout">
<tc:box label="Personal Information">
- <f:facet name="layout">
- <tc:gridLayout columns="*;*" rows="auto;auto;auto;auto;auto;*"/>
- </f:facet>
- <tc:selectOneChoice label="Salutation">
- <f:selectItem itemLabel="none"/>
- <f:selectItem itemLabel="Mr."/>
- <f:selectItem itemLabel="Mrs."/>
- </tc:selectOneChoice>
- <tc:panel/>
-
- <tc:in label="First Name"/>
- <tc:in label="Last Name"/>
-
- <tc:in label="c/o">
- <tc:gridLayoutConstraint columnSpan="2"/>
- </tc:in>
-
- <tc:in label="Street"/>
- <tc:in label="No"/>
-
- <tc:in label="ZIP"/>
- <tc:in label="City"/>
-
- <tc:textarea label="Note">
- <tc:gridLayoutConstraint columnSpan="2"/>
- </tc:textarea>
+ <tc:gridLayout columns="*;*" rows="auto;auto;auto;auto;auto;*">
+ <tc:selectOneChoice label="Salutation">
+ <f:selectItem itemLabel="none"/>
+ <f:selectItem itemLabel="Mr."/>
+ <f:selectItem itemLabel="Mrs."/>
+ </tc:selectOneChoice>
+ <tc:panel/>
+
+ <tc:in label="First Name"/>
+ <tc:in label="Last Name"/>
+
+ <tc:in label="c/o">
+ <tc:gridLayoutConstraint columnSpan="2"/>
+ </tc:in>
+
+ <tc:in label="Street"/>
+ <tc:in label="No"/>
+
+ <tc:in label="ZIP"/>
+ <tc:in label="City"/>
+
+ <tc:textarea label="Note">
+ <tc:gridLayoutConstraint columnSpan="2"/>
+ </tc:textarea>
+ </tc:gridLayout>
</tc:box>
</tc:section>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2000-selectItem/type-of-literals.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2000-selectItem/type-of-literals.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2000-selectItem/type-of-literals.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/2000-selectItem/type-of-literals.xhtml Wed Dec 7 14:13:07 2016
@@ -21,39 +21,38 @@
xmlns:f="http://java.sun.com/jsf/core">
<tc:page width="700px" height="600px">
- <f:facet name="layout">
- <tc:gridLayout rows="auto;80px;80px;auto;*" columns="4*;*"/>
- </f:facet>
-
- <tc:panel>
- <tc:gridLayoutConstraint columnSpan="2"/>
- <tc:messages/>
- </tc:panel>
-
- <tc:selectOneListbox value="#{selectItemModel.number}" label="Model: int" labelWidth="160px">
- <f:selectItem itemValue="1" itemLabel="f:selectItem 1 (literal), works not with JSF 1.1"/>
- <f:selectItem itemValue="#{selectItemModel.two}" itemLabel="f:selectItem 2 (model)"/>
- <tc:selectItem itemValue="3" itemLabel="tc:selectItem 3 (literal)"/>
- <tc:selectItem itemValue="#{selectItemModel.four}" itemLabel="tc:selectItem 4 (model)"/>
- </tc:selectOneListbox>
-
- <tc:in readonly="true" value="#{selectItemModel.number}"/>
-
- <tc:selectOneListbox value="#{selectItemModel.currency}" label="Model: java.util.Currency" labelWidth="160px">
- <f:selectItem itemValue="TTD" itemLabel="f:selectItem TTD (literal), works not with JSF 1.1 and Sun-RI 1.2"/>
- <f:selectItem itemValue="#{selectItemModel.usd}" itemLabel="f:selectItem USD (model)"/>
- <tc:selectItem itemValue="JPY" itemLabel="tc:selectItem JPY (literal)"/>
- <tc:selectItem itemValue="#{selectItemModel.eur}" itemLabel="tc:selectItem EUR (model)"/>
- </tc:selectOneListbox>
-
- <tc:in readonly="true" value="#{selectItemModel.currency}"/>
-
- <tc:panel/>
- <tc:button label="submit"/>
-
- <tc:panel>
- <tc:gridLayoutConstraint columnSpan="2"/>
- </tc:panel>
+ <tc:gridLayout rows="auto;80px;80px;auto;*" columns="4*;*">
+ <tc:panel>
+ <tc:gridLayoutConstraint columnSpan="2"/>
+ <tc:messages/>
+ </tc:panel>
+
+ <tc:selectOneListbox value="#{selectItemModel.number}" label="Model: int" labelWidth="160px">
+ <f:selectItem itemValue="1" itemLabel="f:selectItem 1 (literal), works not with JSF 1.1"/>
+ <f:selectItem itemValue="#{selectItemModel.two}" itemLabel="f:selectItem 2 (model)"/>
+ <tc:selectItem itemValue="3" itemLabel="tc:selectItem 3 (literal)"/>
+ <tc:selectItem itemValue="#{selectItemModel.four}" itemLabel="tc:selectItem 4 (model)"/>
+ </tc:selectOneListbox>
+
+ <tc:in readonly="true" value="#{selectItemModel.number}"/>
+
+ <tc:selectOneListbox value="#{selectItemModel.currency}" label="Model: java.util.Currency" labelWidth="160px">
+ <f:selectItem itemValue="TTD" itemLabel="f:selectItem TTD (literal), works not with JSF 1.1 and Sun-RI 1.2"/>
+ <f:selectItem itemValue="#{selectItemModel.usd}" itemLabel="f:selectItem USD (model)"/>
+ <tc:selectItem itemValue="JPY" itemLabel="tc:selectItem JPY (literal)"/>
+ <tc:selectItem itemValue="#{selectItemModel.eur}" itemLabel="tc:selectItem EUR (model)"/>
+ </tc:selectOneListbox>
+
+ <tc:in readonly="true" value="#{selectItemModel.currency}"/>
+
+ <tc:panel/>
+ <tc:button label="submit"/>
+
+ <tc:panel>
+ <tc:gridLayoutConstraint columnSpan="2"/>
+ </tc:panel>
+
+ </tc:gridLayout>
</tc:page>
</f:view>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml Wed Dec 7 14:13:07 2016
@@ -22,12 +22,6 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<ui:param name="title" value="Error 404"/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout rows="auto;*" />
- </f:facet>
-
- <tc:messages />
- <tc:out id="pageNotFoundMessage" value="The page was not found!"/>
- </tc:panel>
+ <tc:messages/>
+ <tc:out id="pageNotFoundMessage" value="The page was not found!"/>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml?rev=1773080&r1=1773079&r2=1773080&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/logging-info.xhtml Wed Dec 7 14:13:07 2016
@@ -24,61 +24,52 @@
xmlns="http://www.w3.org/1999/xhtml">
<ui:param name="title" value="Logging Info"/>
- <tc:panel rendered="#{info.enabled}">
- <f:facet name="layout">
- <tc:gridLayout rows="auto;auto;auto;*"/>
- </f:facet>
+ <tc:gridLayout rows="auto;auto;auto;*" rendered="#{info.enabled}">
<tc:in label="Test Category" value="#{universalLoggingInfo.testCategory}"/>
<tc:button label="Update" action="#{universalLoggingInfo.update}"/>
<tc:separator/>
- <tc:panel>
- <f:facet name="layout">
- <tc:gridLayout columns="auto;120px;auto;*"/>
- </f:facet>
+ <tc:gridLayout columns="auto;120px;auto;*">
<tc:label value="JUL" tip="Java Util Logging"/>
<tc:selectBooleanCheckbox value="#{universalLoggingInfo.jul.available}" readonly="true"
- label="available"/>
- <tc:button label="Log some stuff in every level" action="#{universalLoggingInfo.jul.logDemo}"
+ label="available" labelLayout="skip"/>
+ <tc:button label="Log" tip="Log some stuff in every level" action="#{universalLoggingInfo.jul.logDemo}"
disabled="#{not universalLoggingInfo.jul.available}"/>
<tc:out value="#{universalLoggingInfo.jul.activeLevels}"/>
<tc:label value="SLF4J" tip="Simple Logging Facade"/>
<tc:selectBooleanCheckbox value="#{universalLoggingInfo.slf4j.available}" readonly="true"
- label="available"/>
- <tc:button label="Log some stuff in every level" action="#{universalLoggingInfo.slf4j.logDemo}"
+ label="available" labelLayout="skip"/>
+ <tc:button label="Log" tip="Log some stuff in every level" action="#{universalLoggingInfo.slf4j.logDemo}"
disabled="#{not universalLoggingInfo.slf4j.available}"/>
<tc:out value="#{universalLoggingInfo.slf4j.activeLevels}"/>
<tc:label value="LOG4J"/>
<tc:selectBooleanCheckbox value="#{universalLoggingInfo.log4j.available}" readonly="true"
- label="available"/>
- <tc:button label="Log some stuff in every level" action="#{universalLoggingInfo.log4j.logDemo}"
+ label="available" labelLayout="skip"/>
+ <tc:button label="Log" tip="Log some stuff in every level" action="#{universalLoggingInfo.log4j.logDemo}"
disabled="#{not universalLoggingInfo.log4j.available}"/>
<tc:out value="#{universalLoggingInfo.log4j.activeLevels}"/>
<tc:label value="LOG4J2"/>
<tc:selectBooleanCheckbox value="#{universalLoggingInfo.log4j2.available}" readonly="true"
- label="available"/>
- <tc:button label="Log some stuff in every level" action="#{universalLoggingInfo.log4j2.logDemo}"
+ label="available" labelLayout="skip"/>
+ <tc:button label="Log" tip="Log some stuff in every level" action="#{universalLoggingInfo.log4j2.logDemo}"
disabled="#{not universalLoggingInfo.log4j2.available}"/>
<tc:out value="#{universalLoggingInfo.log4j2.activeLevels}"/>
<tc:label value="JCL" tip="Commons Logging"/>
<tc:selectBooleanCheckbox value="#{universalLoggingInfo.commonsLogging.available}" readonly="true"
- label="available"/>
- <tc:button label="Log some stuff in every level" action="#{universalLoggingInfo.commonsLogging.logDemo}"
+ label="available" labelLayout="skip"/>
+ <tc:button label="Log" tip="Log some stuff in every level" action="#{universalLoggingInfo.commonsLogging.logDemo}"
disabled="#{not universalLoggingInfo.commonsLogging.available}"/>
<tc:out value="#{universalLoggingInfo.commonsLogging.activeLevels}"/>
- </tc:panel>
+ </tc:gridLayout>
- <tc:panel>
- <f:facet name="layout">
- <tc:flowLayout/>
- </f:facet>
+ <tc:flowLayout>
<h3>This is a test page to check if all logging libraries are working well in the used container.</h3>
@@ -88,6 +79,6 @@
<li>Consult your log file (or anywhere you are logging) to check the result</li>
</ul>
- </tc:panel>
- </tc:panel>
+ </tc:flowLayout>
+ </tc:gridLayout>
</ui:composition>