You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/11/05 12:10:47 UTC
svn commit: r471397 - in /myfaces/tobago/trunk: contrib/facelets/
core/src/main/java/org/apache/myfaces/tobago/renderkit/
core/src/main/java/org/apache/myfaces/tobago/util/ example/facelets/
theme/scarborough/src/main/java/org/apache/myfaces/tobago/ren...
Author: bommel
Date: Sun Nov 5 03:10:46 2006
New Revision: 471397
URL: http://svn.apache.org/viewvc?view=rev&rev=471397
Log:
some cleanups
add more examples to gendoc
Modified:
myfaces/tobago/trunk/contrib/facelets/pom.xml
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java
myfaces/tobago/trunk/example/facelets/pom.xml
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectManyListBox.jsp
myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp
myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneListbox.jsp
Modified: myfaces/tobago/trunk/contrib/facelets/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/pom.xml?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/pom.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/pom.xml Sun Nov 5 03:10:46 2006
@@ -41,7 +41,7 @@
<executions>
<execution>
<id>unpack-sources</id>
- <phase>generate-sources</phase>
+ <phase>validate</phase>
<goals><goal>unpack</goal></goals>
<configuration>
<artifactItems>
@@ -58,6 +58,39 @@
</execution>
</executions>
</plugin>
+ <!--<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <version>1.0-beta-1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>tobago-facelet-taglib</id>
+ <goals><goal>execute</goal></goals>
+ <configuration>
+ <excludes>
+ <exclude>org/apache/myfaces/tobago/*</exclude>
+ </excludes>
+ <includes>
+ <include>org/apache/myfaces/tobago/taglib/component/*.java</include>
+ <include>org/apache/myfaces/tobago/taglib/decl/*.java</include>
+ </includes>
+ <aptSourceRoots>
+ <aptSourceRoot>${project.build.directory}/tobago-core-sources</aptSourceRoot>
+ </aptSourceRoots>
+ <targetFiles>
+ <targetFile>tobago.taglib.xml</targetFile>
+ </targetFiles>
+ <resourceTargetPath>META-INF</resourceTargetPath>
+ <generated>target/generated-sources</generated>
+ <factory>org.apache.myfaces.tobago.apt.FaceletAnnotationProcessorFactory</factory>
+ <nocompile>true</nocompile>
+ <encoding>UTF-8</encoding>
+ <generateToBuildDir>false</generateToBuildDir>
+ <force>true</force>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>-->
<plugin>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>maven-apt-plugin</artifactId>
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java Sun Nov 5 03:10:46 2006
@@ -54,13 +54,6 @@
private static final Log LOG = LogFactory.getLog(RendererBase.class);
- public static final String BEGIN_POSTFIX = "Begin";
-
- public static final String CHILDREN_POSTFIX = "Children";
-
- public static final String END_POSTFIX = "";
-
-
public void encodeBegin(FacesContext facesContext, UIComponent component)
throws IOException {
if (LOG.isDebugEnabled()) {
@@ -221,8 +214,8 @@
if (component instanceof UICell) {
List children = LayoutUtil.addChildren(new ArrayList(), component);
- for (Iterator childs = children.iterator(); childs.hasNext();) {
- UIComponent child = (UIComponent) childs.next();
+ for (Object aChildren : children) {
+ UIComponent child = (UIComponent) aChildren;
RendererBase renderer = ComponentUtil.getRenderer(facesContext, child);
if (renderer != null) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java Sun Nov 5 03:10:46 2006
@@ -191,7 +191,10 @@
&& component.getRendererType() == null) {
return true;
}
-
+ /* TODO disable layouting of facelet stuff
+ if (component.getClass().getPackage().getName().equals("com.sun.facelets.compiler")) {
+ return true;
+ } */
// also Forms are transparent for layouting
return component instanceof UIForm;
Modified: myfaces/tobago/trunk/example/facelets/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/pom.xml?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/example/facelets/pom.xml (original)
+++ myfaces/tobago/trunk/example/facelets/pom.xml Sun Nov 5 03:10:46 2006
@@ -154,14 +154,6 @@
<scope>runtime</scope>
</dependency>
</dependencies>
- <repositories>
- <repository>
- <id>java.net</id>
- <name>java.net Maven 1 Repository</name>
- <url>https://maven-repository.dev.java.net/repository</url>
- <layout>legacy</layout>
- </repository>
- </repositories>
</profile>
</profiles>
</project>
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Sun Nov 5 03:10:46 2006
@@ -581,6 +581,8 @@
}
}
maxHeight = Math.max(maxHeight, height);
+ } else if (object instanceof UIGridLayout.Marker) {
+ // ignore
} else {
// TODO is this needed?
LOG.error("Object is not instanceof UIComponent " + object.getClass().getName());
Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectManyListBox.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectManyListBox.jsp?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectManyListBox.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectManyListBox.jsp Sun Nov 5 03:10:46 2006
@@ -23,7 +23,7 @@
<jsp:body>
<tc:panel>
<f:facet name="layout">
- <tc:gridLayout rows="45px;1*" />
+ <tc:gridLayout rows="45px;45px;1*" />
</f:facet>
<%-- code-sniplet-start id="selectManyListbox" --%>
<tx:selectManyListbox inline="true" id="LabeledInlineMultiSelect"
@@ -32,6 +32,16 @@
<f:selectItem itemValue="eMail" itemLabel="eMail"/>
<f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
<f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+ </tx:selectManyListbox>
+ <tx:selectManyListbox inline="true"
+ label="Contact via: ">
+ <f:selectItem itemValue="Phone" itemLabel="Phone" />
+ <f:selectItem itemValue="eMail" itemLabel="eMail"/>
+ <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
+ <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+ <f:facet name="click">
+ <tc:command />
+ </f:facet>
</tx:selectManyListbox>
<%-- code-sniplet-end id="selectManyListbox" --%>
<tc:cell/>
Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp Sun Nov 5 03:10:46 2006
@@ -23,17 +23,29 @@
<jsp:body>
<tc:panel>
<f:facet name="layout">
- <tc:gridLayout rows="fixed;1*" />
+ <tc:gridLayout rows="1*:1*;1*" />
</f:facet>
<%-- code-sniplet-start id="selectOneChoice" --%>
- <tx:selectOneChoice value="selectOneChoice0" inline="true"
- label="Contact me: " >
+ <tx:selectOneChoice inline="true" value="selectOneChoice0"
+ label="Contact me1: " >
<tc:selectItem itemLabel="Letter" itemValue="letter" />
<tc:selectItem itemLabel="Phone" itemValue="phone" />
<tc:selectItem itemLabel="eMail" itemValue="eMail" />
<tc:selectItem itemLabel="Fax" itemValue="fax" />
</tx:selectOneChoice>
+
<%-- code-sniplet-end id="selectOneChoice" --%>
+
+ <tx:selectOneChoice inline="true" value="selectOneChoice0"
+ label="Contact me2: " >
+ <tc:selectItem itemLabel="Letter" itemValue="letter" />
+ <tc:selectItem itemLabel="Phone" itemValue="phone" />
+ <tc:selectItem itemLabel="eMail" itemValue="eMail" />
+ <tc:selectItem itemLabel="Fax" itemValue="fax" />
+ <f:facet name="click">
+ <tc:command />
+ </f:facet>
+ </tx:selectOneChoice>
<tc:cell/>
Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneListbox.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneListbox.jsp?view=diff&rev=471397&r1=471396&r2=471397
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneListbox.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneListbox.jsp Sun Nov 5 03:10:46 2006
@@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
---%>
+tc:cell/>--%>
<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
<%@ taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
@@ -24,7 +24,7 @@
<jsp:body>
<tc:panel>
<f:facet name="layout">
- <tc:gridLayout rows="90px;1*" columns="300px;1*" />
+ <tc:gridLayout rows="90px;90px;1*" columns="300px;1*" />
</f:facet>
<%-- code-sniplet-start id="selectOneListbox" --%>
<tx:selectOneListbox id="LabeledInlineSingleSelect"
@@ -33,6 +33,17 @@
<f:selectItem itemValue="eMail" itemLabel="eMail"/>
<f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
<f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+ </tx:selectOneListbox>
+ <tc:cell/>
+ <tx:selectOneListbox id="LabeledInlineSingleSelect1"
+ label="Contact via: " height="90px">
+ <f:selectItem itemValue="Phone" itemLabel="Phone" />
+ <f:selectItem itemValue="eMail" itemLabel="eMail"/>
+ <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
+ <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+ <f:facet name="click">
+ <tc:command />
+ </f:facet>
</tx:selectOneListbox>
<%-- code-sniplet-end id="selectOneListbox" --%>
<tc:cell/>