myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r522321 - in /myfaces/current/orchestra: core15/ core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/myfaces/ core15/src/main/resources/META-INF/ examples/src/main/java/org/apache/myfaces/examples/dynaForm/ examples/s...
Date Sun, 25 Mar 2007 18:36:21 GMT
Author: imario
Date: Sun Mar 25 11:36:20 2007
New Revision: 522321

URL: http://svn.apache.org/viewvc?view=rev&rev=522321
Log:
start creating dynaForm examples

Added:
    myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/
    myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/
    myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java
    myfaces/current/orchestra/examples/src/main/webapp/dynaForm/
    myfaces/current/orchestra/examples/src/main/webapp/dynaForm/Form.jsp
      - copied, changed from r522170, myfaces/current/orchestra/examples/src/main/webapp/configurator/Checkout.jsp
    myfaces/current/orchestra/examples/src/main/webapp/dynaForm/index.jsp
      - copied, changed from r522170, myfaces/current/orchestra/examples/src/main/webapp/configurator/index.jsp
    myfaces/current/orchestra/examples/src/main/webapp/dynaForm/start.jsp
      - copied, changed from r522170, myfaces/current/orchestra/examples/src/main/webapp/start.jsp
Removed:
    myfaces/current/orchestra/examples/src/main/webapp/web.xml
Modified:
    myfaces/current/orchestra/core15/pom.xml
    myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java
    myfaces/current/orchestra/core15/src/main/resources/META-INF/dynaForm-default.xml
    myfaces/current/orchestra/core15/src/main/resources/META-INF/faces-config.xml
    myfaces/current/orchestra/examples/src/main/resources/META-INF/persistence.xml
    myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml
    myfaces/current/orchestra/examples/src/main/webapp/start.jsp

Modified: myfaces/current/orchestra/core15/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/core15/pom.xml?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/core15/pom.xml (original)
+++ myfaces/current/orchestra/core15/pom.xml Sun Mar 25 11:36:20 2007
@@ -74,6 +74,13 @@
 		</dependency>
 
 		<dependency>
+			<groupId>org.apache.myfaces.tomahawk</groupId>
+			<artifactId>tomahawk-sandbox</artifactId>
+			<version>1.1.5-SNAPSHOT</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
 			<groupId>org.apache.myfaces.shared</groupId>
 			<artifactId>myfaces-shared-orchestra</artifactId>
 			<scope>provided</scope>

Modified: myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java
(original)
+++ myfaces/current/orchestra/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/myfaces/MyFacesGuiBuilder.java
Sun Mar 25 11:36:20 2007
@@ -20,9 +20,19 @@
 
 import org.apache.myfaces.orchestra.dynaForm.guiBuilder.impl.jsf.JsfGuiBuilder;
 import org.apache.myfaces.orchestra.dynaForm.metadata.FieldInterface;
+import org.apache.myfaces.orchestra.dynaForm.lib.ObjectSerializationConverter;
+import org.apache.myfaces.custom.convertNumber.TypedNumberConverter;
+import org.apache.myfaces.custom.calendar.HtmlInputCalendar;
+import org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjax;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.html.HtmlPanelGroup;
+import javax.faces.component.html.HtmlInputText;
+import javax.faces.convert.Converter;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.persistence.TemporalType;
+import java.math.BigDecimal;
 
 /**
  * use myfaces goodies
@@ -34,7 +44,7 @@
 		super();
 	}
 
-	/* SANDBOX COMPONENT
+	/* TODO: SANDBOX COMPONENT - promote to tomahawk */
 	@Override
 	public Converter doCreateConverter(FieldInterface field)
 	{
@@ -78,7 +88,6 @@
 
 		return cmp;
 	}
-	*/
 
 	@SuppressWarnings("unchecked")
 	@Override
@@ -102,7 +111,7 @@
 		fireNewComponent(field, panel);
 	}
 
-/* SANDBOX COMPONENT
+	/* TODO: SANDBOX COMPONENT - promote to tomahawk */
 	@Override
 	public UIComponent doCreateSearchFor(FieldInterface field)
 	{
@@ -138,5 +147,4 @@
 		panel.getChildren().add(cmp);
 		return panel;
 	}
-	*/
 }

Modified: myfaces/current/orchestra/core15/src/main/resources/META-INF/dynaForm-default.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/core15/src/main/resources/META-INF/dynaForm-default.xml?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/core15/src/main/resources/META-INF/dynaForm-default.xml (original)
+++ myfaces/current/orchestra/core15/src/main/resources/META-INF/dynaForm-default.xml Sun
Mar 25 11:36:20 2007
@@ -21,5 +21,5 @@
 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
 <properties>
 <comment>DynaForm default configuration</comment>
-<entry key="Extractor">org.apache.myfaces.custom.dynaForm.metadata.impl.ejb.EjbExtractor</entry>
+<entry key="Extractor">org.apache.myfaces.orchestra.dynaForm.metadata.impl.ejb.EjbExtractor</entry>
 </properties>

Modified: myfaces/current/orchestra/core15/src/main/resources/META-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/core15/src/main/resources/META-INF/faces-config.xml?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/core15/src/main/resources/META-INF/faces-config.xml (original)
+++ myfaces/current/orchestra/core15/src/main/resources/META-INF/faces-config.xml Sun Mar
25 11:36:20 2007
@@ -28,12 +28,12 @@
     <!-- components -->
     <component>
         <component-type>org.apache.myfaces.dynaForm.DynaConfigs</component-type>
-        <component-class>org.apache.myfaces.orchestratra.dynaForm.component.dynaForm.DynaConfigs</component-class>
+        <component-class>org.apache.myfaces.orchestra.dynaForm.component.dynaForm.DynaConfigs</component-class>
     </component>
 
     <component>
         <component-type>org.apache.myfaces.dynaForm.DynaConfig</component-type>
-        <component-class>org.apache.myfaces.orchestratra.dynaForm.component.dynaForm.DynaConfig</component-class>
+        <component-class>org.apache.myfaces.orchestra.dynaForm.component.dynaForm.DynaConfig</component-class>
         <property>
           <description>
 			The name of the property this configuration is for
@@ -134,6 +134,6 @@
 	<!--  converters -->
 	<converter>
 		<converter-for-class>java.lang.Enum</converter-for-class>
-		<converter-class>org.apache.myfaces.orchestratra.converter.enumeration.EnumConverter</converter-class>
+		<converter-class>org.apache.myfaces.orchestra.converter.enumeration.EnumConverter</converter-class>
 	</converter>
 </faces-config>

Added: myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java?view=auto&rev=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java
(added)
+++ myfaces/current/orchestra/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java
Sun Mar 25 11:36:20 2007
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2007, Your Corporation. All Rights Reserved.
+ */
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, 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.
+ */
+package org.apache.myfaces.examples.dynaForm.model;
+
+import org.apache.myfaces.orchestra.dynaForm.annot.ui.ReadOnly;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Column;
+import javax.persistence.Version;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import java.util.Date;
+
+@Entity
+public class SimpleEntity
+{
+	@Id
+	@GeneratedValue(strategy= GenerationType.SEQUENCE)
+	private Long id;
+
+	@Column(nullable = false)
+	private String content;
+
+	private boolean active;
+
+	@Temporal(value = TemporalType.DATE)
+	private Date startDate;
+
+	@Temporal(value = TemporalType.TIME)
+	private Date startTime;
+
+	@Temporal(value = TemporalType.TIMESTAMP)
+	@ReadOnly(disabled = true)
+	private Date lastChanged;
+
+	private Double value;
+
+	@Version
+	private Long version;
+
+	public Long getId()
+	{
+		return id;
+	}
+
+	public void setId(Long id)
+	{
+		this.id = id;
+	}
+
+	public String getContent()
+	{
+		return content;
+	}
+
+	public void setContent(String content)
+	{
+		this.content = content;
+	}
+
+	public boolean isActive()
+	{
+		return active;
+	}
+
+	public void setActive(boolean active)
+	{
+		this.active = active;
+	}
+
+	public Date getStartDate()
+	{
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate)
+	{
+		this.startDate = startDate;
+	}
+
+	public Date getStartTime()
+	{
+		return startTime;
+	}
+
+	public void setStartTime(Date startTime)
+	{
+		this.startTime = startTime;
+	}
+
+	public Date getLastChanged()
+	{
+		return lastChanged;
+	}
+
+	public void setLastChanged(Date lastChanged)
+	{
+		this.lastChanged = lastChanged;
+	}
+
+	public Double getValue()
+	{
+		return value;
+	}
+
+	public void setValue(Double value)
+	{
+		this.value = value;
+	}
+
+	public Long getVersion()
+	{
+		return version;
+	}
+
+	public void setVersion(Long version)
+	{
+		this.version = version;
+	}
+}

Modified: myfaces/current/orchestra/examples/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/resources/META-INF/persistence.xml?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/resources/META-INF/persistence.xml (original)
+++ myfaces/current/orchestra/examples/src/main/resources/META-INF/persistence.xml Sun Mar
25 11:36:20 2007
@@ -33,5 +33,6 @@
 			<class>org.apache.myfaces.examples.ballot.model.Topic</class>
 			<class>org.apache.myfaces.examples.ballot.model.Vote</class>
 			<class>org.apache.myfaces.examples.ballot.model.Voter</class>
+			<class>org.apache.myfaces.examples.dynaForm.model.SimpleEntity</class>
 		</persistence-unit>
 </persistence>

Modified: myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/faces-config.xml?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/faces-config.xml Sun Mar 25
11:36:20 2007
@@ -24,7 +24,7 @@
 		<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
 		<navigation-handler>org.apache.myfaces.custom.redirectTracker.RedirectTrackerNavigationHandler</navigation-handler>
 		<navigation-handler>org.apache.myfaces.orchestra.urlParamNav.UrlParameterNavigationHandler</navigation-handler>
-		<view-handler>org.apache.myfaces.orchestratra.urlParamNav.UrlParameterViewHandler</view-handler>
+		<view-handler>org.apache.myfaces.orchestra.urlParamNav.UrlParameterViewHandler</view-handler>
 	</application>
 
 	<navigation-rule>

Modified: myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/WEB-INF/web.xml Sun Mar 25 11:36:20
2007
@@ -82,7 +82,7 @@
 
 	<filter>
 		<filter-name>requestEncodingFilter</filter-name>
-		<filter-class>org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterServletFilter</filter-class>
+		<filter-class>org.apache.myfaces.filter.RequestEncodingFilter</filter-class>
 	</filter>
 
 	<filter>
@@ -103,7 +103,7 @@
 
 	<filter-mapping>
 		<filter-name>requestParameterFilter</filter-name>
-		<url-pattern>/*</url-pattern>
+		<url-pattern>*.faces</url-pattern>
 	</filter-mapping>
 
 	<filter-mapping>

Copied: myfaces/current/orchestra/examples/src/main/webapp/dynaForm/Form.jsp (from r522170,
myfaces/current/orchestra/examples/src/main/webapp/configurator/Checkout.jsp)
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/dynaForm/Form.jsp?view=diff&rev=522321&p1=myfaces/current/orchestra/examples/src/main/webapp/configurator/Checkout.jsp&r1=522170&p2=myfaces/current/orchestra/examples/src/main/webapp/dynaForm/Form.jsp&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/configurator/Checkout.jsp (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/dynaForm/Form.jsp Sun Mar 25 11:36:20
2007
@@ -22,6 +22,7 @@
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
 <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s" %>
+<%@ taglib uri="http://myfaces.apache.org/orchestra15" prefix="ox" %>
 
 <f:view>
 	<%@ include file="../header.jspf" %>
@@ -29,74 +30,21 @@
 	<h:form>
 
 		<t:htmlTag value="h3">
-			<h:outputText value="Buy your PC"/>
+			<h:outputText value="Form"/>
 		</t:htmlTag>
 
-		<t:dataTable
-			var="order"
-			value="#{configuratorData.orderItems}"
-			rowClasses="TR1, TR2">
-
-			<f:facet name="footer">
-				<h:panelGroup>
-					<h:commandButton value="Cancel" action="#{configuratorData.cancelAction}"/>
-					<h:commandButton value="Buy" action="#{configuratorData.buyAction}"/>
-				</h:panelGroup>
-			</f:facet>
-
-			<h:column>
-				<f:facet name="header">
-					<h:outputText value="position"/>
-				</f:facet>
-				<h:outputText value="#{order.posnr}"/>
-			</h:column>
-
-			<h:column>
-				<f:facet name="header">
-					<h:outputText value="count"/>
-				</f:facet>
-				<h:inputText value="#{order.amount}">
-					<s:convertNumber
-						groupingUsed="true"
-						minFractionDigits="0"
-						maxFractionDigits="0"/>
-				</h:inputText>
-			</h:column>
-
-			<h:column>
-				<f:facet name="header">
-					<h:outputText value="number"/>
-				</f:facet>
-				<h:outputText value="#{order.piece.number}"/>
-			</h:column>
-
-			<h:column>
-				<f:facet name="header">
-					<h:outputText value="description"/>
-				</f:facet>
-				<h:outputText value="#{order.piece.description}"/>
-			</h:column>
-
-			<h:column>
-				<f:facet name="header">
-					<h:outputText value="price"/>
-				</f:facet>
-				<h:outputText value="#{order.piece.price}">
-					<f:convertNumber
-						groupingUsed="true"
-						minFractionDigits="2"
-						maxFractionDigits="2"/>
-				</h:outputText>
-			</h:column>
-
-			<h:column>
-				<f:facet name="header">
-					<h:outputText value="value"/>
-				</f:facet>
-				<h:outputText value="???"/>
-			</h:column>
+		<ox:dynaForm
+			var="entity"
+			uri="org.apache.myfaces.examples.dynaForm.model.SimpleEntity"
+			valueBindingPrefix="simpleForm">
+
+			<h:panelGrid
+				id="entity-layout"
+				columns="2">
 
-		</t:dataTable>
+			</h:panelGrid>
+
+		</ox:dynaForm>
 
 	</h:form>
 

Copied: myfaces/current/orchestra/examples/src/main/webapp/dynaForm/index.jsp (from r522170,
myfaces/current/orchestra/examples/src/main/webapp/configurator/index.jsp)
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/dynaForm/index.jsp?view=diff&rev=522321&p1=myfaces/current/orchestra/examples/src/main/webapp/configurator/index.jsp&r1=522170&p2=myfaces/current/orchestra/examples/src/main/webapp/dynaForm/index.jsp&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/configurator/index.jsp (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/dynaForm/index.jsp Sun Mar 25 11:36:20
2007
@@ -22,4 +22,4 @@
   --%>
 
 <%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect("ComponentSelection.faces"); %>
\ No newline at end of file
+<% response.sendRedirect("start.faces"); %>
\ No newline at end of file

Copied: myfaces/current/orchestra/examples/src/main/webapp/dynaForm/start.jsp (from r522170,
myfaces/current/orchestra/examples/src/main/webapp/start.jsp)
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/dynaForm/start.jsp?view=diff&rev=522321&p1=myfaces/current/orchestra/examples/src/main/webapp/start.jsp&r1=522170&p2=myfaces/current/orchestra/examples/src/main/webapp/dynaForm/start.jsp&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/start.jsp (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/dynaForm/start.jsp Sun Mar 25 11:36:20
2007
@@ -24,28 +24,23 @@
 <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s" %>
 
 <f:view>
-<%@include file="header.jspf"%>
+<%@include file="../header.jspf"%>
 
 <h:form>
 
 	<t:htmlTag value="h3">
-		<h:outputText value="Examples" />
+		<h:outputText value="DynaForm Examples" />
 	</t:htmlTag>
 
 	<t:htmlTag value="ul">
 		<t:htmlTag value="li">
-			<h:outputLink value="ballot/Hall.faces" >
-				<h:outputText value="A Voting Machine" />
-			</h:outputLink>
-		</t:htmlTag>
-		<t:htmlTag value="li">
-			<h:outputLink value="configurator" >
-				<h:outputText value="A PC Konfigurator" />
+			<h:outputLink value="Form.faces" >
+				<h:outputText value="A simple input form" />
 			</h:outputLink>
 		</t:htmlTag>
 	</t:htmlTag>
 
 </h:form>
 
-<%@include file="footer.jspf"%>
+<%@include file="../footer.jspf"%>
 </f:view>

Modified: myfaces/current/orchestra/examples/src/main/webapp/start.jsp
URL: http://svn.apache.org/viewvc/myfaces/current/orchestra/examples/src/main/webapp/start.jsp?view=diff&rev=522321&r1=522320&r2=522321
==============================================================================
--- myfaces/current/orchestra/examples/src/main/webapp/start.jsp (original)
+++ myfaces/current/orchestra/examples/src/main/webapp/start.jsp Sun Mar 25 11:36:20 2007
@@ -43,6 +43,11 @@
 				<h:outputText value="A PC Konfigurator" />
 			</h:outputLink>
 		</t:htmlTag>
+		<t:htmlTag value="li">
+			<h:outputLink value="dynaForm/start.faces" >
+				<h:outputText value="DynaForm examples" />
+			</h:outputLink>
+		</t:htmlTag>
 	</t:htmlTag>
 
 </h:form>



Mime
View raw message