You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/08/28 08:34:05 UTC
svn commit: r570330 - in /myfaces/orchestra/trunk: core15/src/main/tld/
examples/src/main/java/org/apache/myfaces/examples/mops/backings/
examples/src/main/java/org/apache/myfaces/examples/mops/dao/
examples/src/main/java/org/apache/myfaces/examples/mo...
Author: imario
Date: Mon Aug 27 23:34:04 2007
New Revision: 570330
URL: http://svn.apache.org/viewvc?rev=570330&view=rev
Log:
added missing attributes to dynaForm, some mops code
Added:
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/EditProduct.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductDao.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductPriceDao.java
myfaces/orchestra/trunk/examples/src/main/webapp/mops/
myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/mops/ProductDetail.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/mops/SearchProduct.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/mops/index.jsp
- copied, changed from r569274, myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp
Modified:
myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/Product.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ProductPrice.java
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ShoppingCart.java
myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml
myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml
myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/default.css
myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
Modified: myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld (original)
+++ myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld Mon Aug 27 23:34:04 2007
@@ -104,7 +104,16 @@
Handle all the dynamic form creation for JSF
</description>
- <attribute>
+ <attribute>
+ <name>id</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ The id of the component
+ </description>
+ </attribute>
+
+ <attribute>
<name>var</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
@@ -113,7 +122,16 @@
</description>
</attribute>
- <attribute>
+ <attribute>
+ <name>rendered</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ false if the component should not be rendered
+ </description>
+ </attribute>
+
+ <attribute>
<name>valueBindingPrefix</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/EditProduct.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/EditProduct.java?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/EditProduct.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/EditProduct.java Mon Aug 27 23:34:04 2007
@@ -0,0 +1,173 @@
+/*
+ * 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.mops.backings;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.myfaces.examples.lib.FacesConst;
+import org.apache.myfaces.examples.lib.FacesUtils;
+import org.apache.myfaces.examples.mops.dao.ProductDao;
+import org.apache.myfaces.examples.mops.model.Product;
+import org.apache.myfaces.examples.mops.model.ProductPrice;
+import org.apache.myfaces.orchestra.conversation.Conversation;
+import org.apache.myfaces.orchestra.viewController.annotations.InitView;
+import org.apache.myfaces.orchestra.viewController.annotations.ViewController;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.faces.context.FacesContext;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+@ViewController(viewIds="/mops/EditProduct.jsp")
+public class EditProduct
+{
+ private ProductDao productDao;
+
+ private Product product;
+ private ProductPrice productPrice;
+
+ public final static class ProductPriceWrapper
+ {
+ private final ProductPrice productPrice;
+
+ public ProductPriceWrapper(ProductPrice productPrice)
+ {
+ this.productPrice = productPrice;
+ }
+
+ public ProductPrice getProductPrice()
+ {
+ return productPrice;
+ }
+ }
+
+ @InitView
+ public void myInitView()
+ {
+ String productId = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("productId");
+ if (!StringUtils.isEmpty(productId))
+ {
+ initProduct(Long.valueOf(productId, 10));
+ }
+
+ if (getProduct() == null)
+ {
+ setProduct(new Product());
+ }
+ }
+
+ public ProductDao getProductDao()
+ {
+ return productDao;
+ }
+
+ public void setProductDao(ProductDao productDao)
+ {
+ this.productDao = productDao;
+ }
+
+ public void initProduct(Long productId)
+ {
+ product = productDao.getByKey(productId);
+ if (product == null)
+ {
+ FacesUtils.addInfoMessage("can't find a product with id '" + productId + "'");
+ }
+ }
+
+ public Product getProduct()
+ {
+ return product;
+ }
+
+ public void setProduct(Product product)
+ {
+ this.product = product;
+ }
+
+ public boolean isSavedProduct()
+ {
+ return this.product != null && this.product.getVersion() != null;
+ }
+
+ public List<ProductPriceWrapper> getProductPrices()
+ {
+ if (product == null)
+ {
+ return Collections.EMPTY_LIST;
+ }
+
+ List<ProductPriceWrapper> ret = new ArrayList<ProductPriceWrapper>();
+ for (ProductPrice price : product.getProductPrices())
+ {
+ ret.add(new ProductPriceWrapper(price));
+ }
+
+ return ret;
+ }
+
+ public String newProductAction()
+ {
+ Conversation.getCurrentInstance().invalidate();
+
+ return FacesConst.SUCCESS;
+ }
+
+ @Transactional()
+ public String saveProductAction()
+ {
+ productDao.save(product);
+
+ return FacesConst.SUCCESS;
+ }
+
+ public ProductPrice getProductPrice()
+ {
+ return productPrice;
+ }
+
+ public void setProductPrice(ProductPrice productPrice)
+ {
+ this.productPrice = productPrice;
+ }
+
+ public String newPriceAction()
+ {
+ productPrice = new ProductPrice();
+ productPrice.setProduct(getProduct());
+
+ return FacesConst.SUCCESS;
+ }
+
+ @Transactional()
+ public String savePriceAction()
+ {
+ getProduct().addProductPrice(productPrice);
+
+ return FacesConst.SUCCESS;
+ }
+
+ @Transactional()
+ public String deletePriceAction()
+ {
+ getProduct().removeProductPrice(productPrice);
+
+ return FacesConst.SUCCESS;
+ }
+}
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java Mon Aug 27 23:34:04 2007
@@ -0,0 +1,44 @@
+package org.apache.myfaces.examples.mops.backings;
+
+import org.apache.myfaces.examples.mops.dao.ProductDao;
+import org.apache.myfaces.examples.mops.model.ShopCustomer;
+import org.apache.myfaces.examples.mops.model.ShoppingCart;
+import org.springframework.transaction.annotation.Transactional;
+
+public class PetstoreData
+{
+ private ProductDao productDao;
+
+ private ShopCustomer customer;
+ private ShoppingCart shoppingCart;
+
+ public ProductDao getProductDao()
+ {
+ return productDao;
+ }
+
+ public void setProductDao(ProductDao productDao)
+ {
+ this.productDao = productDao;
+ }
+
+ public Long getCustomerGroupId()
+ {
+ if (customer != null)
+ {
+ return customer.getCustomerGroup().getId();
+ }
+
+ return null;
+ }
+
+ @Transactional
+ public void addProduct(Long productId, long quantity)
+ {
+ if (shoppingCart == null)
+ {
+ shoppingCart = new ShoppingCart();
+ }
+ shoppingCart.addProduct(productDao.getByKey(productId), quantity);
+ }
+}
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java Mon Aug 27 23:34:04 2007
@@ -0,0 +1,115 @@
+package org.apache.myfaces.examples.mops.backings;
+
+import org.apache.myfaces.examples.mops.dao.ProductDao;
+import org.apache.myfaces.examples.mops.dao.ProductPriceDao;
+import org.apache.myfaces.examples.mops.model.Product;
+import org.apache.myfaces.examples.mops.model.ProductPrice;
+import org.apache.myfaces.examples.lib.FacesConst;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SearchProduct
+{
+ private ProductDao productDao;
+ private ProductPriceDao productPriceDao;
+
+ private PetstoreData petstoreData;
+
+ private String searchText;
+
+ private List<ProductWrapper> products;
+
+ public static class ProductWrapper
+ {
+ private final Product product;
+ private final ProductPrice price;
+
+ public ProductWrapper(Product product, ProductPrice price)
+ {
+ this.product = product;
+ this.price = price;
+ }
+
+ public Product getProduct()
+ {
+ return product;
+ }
+
+ public ProductPrice getPrice()
+ {
+ return price;
+ }
+ }
+
+ public PetstoreData getPetstoreData()
+ {
+ return petstoreData;
+ }
+
+ public void setPetstoreData(PetstoreData petstoreData)
+ {
+ this.petstoreData = petstoreData;
+ }
+
+ public ProductDao getProductDao()
+ {
+ return productDao;
+ }
+
+ public void setProductDao(ProductDao productDao)
+ {
+ this.productDao = productDao;
+ }
+
+ public ProductPriceDao getProductPriceDao()
+ {
+ return productPriceDao;
+ }
+
+ public void setProductPriceDao(ProductPriceDao productPriceDao)
+ {
+ this.productPriceDao = productPriceDao;
+ }
+
+ public String getSearchText()
+ {
+ return searchText;
+ }
+
+ public void setSearchText(String searchText)
+ {
+ this.searchText = searchText;
+ }
+
+ public List<ProductWrapper> getProducts()
+ {
+ return products;
+ }
+
+ public String searchProductAction()
+ {
+ List<Product> foundProducts;
+ if (searchText == null)
+ {
+ foundProducts = productDao.getAll();
+ }
+ else
+ {
+ foundProducts = productDao.getProductsByFulltext(searchText);
+ }
+
+ List<ProductWrapper> result = new ArrayList<ProductWrapper>();
+ for (Product product : foundProducts)
+ {
+ result.add(new ProductWrapper(
+ product,
+ productPriceDao.getPriceForProduct(product,
+ petstoreData.getCustomerGroupId())));
+ }
+
+ products = result;
+
+ return FacesConst.SUCCESS;
+ }
+}
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java Mon Aug 27 23:34:04 2007
@@ -0,0 +1,17 @@
+package org.apache.myfaces.examples.mops.backings;
+
+public class Security
+{
+ private boolean administratorMode;
+
+ public boolean isAdministratorMode()
+ {
+ return administratorMode;
+ }
+
+ public String switchAdministratorModeAction()
+ {
+ administratorMode = !administratorMode;
+ return null;
+ }
+}
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductDao.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductDao.java?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductDao.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductDao.java Mon Aug 27 23:34:04 2007
@@ -0,0 +1,53 @@
+/*
+ * 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.mops.dao;
+
+import org.apache.myfaces.examples.mops.model.Product;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import java.util.List;
+
+public class ProductDao
+{
+ @PersistenceContext
+ private EntityManager entityManager;
+
+ public Product getByKey(Long productId)
+ {
+ return entityManager.find(Product.class, productId);
+ }
+
+ public List<Product> getAll()
+ {
+ return entityManager.createNamedQuery("productsAll").getResultList();
+ }
+ public List<Product> getProductsByFulltext(String text)
+ {
+ Query query = entityManager.createNamedQuery("productByFulltext");
+ query.setParameter("description", "%" + text.toLowerCase() + "%");
+ return query.getResultList();
+ }
+
+ public void save(Product product)
+ {
+ entityManager.persist(product);
+ }
+}
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductPriceDao.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductPriceDao.java?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductPriceDao.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/dao/ProductPriceDao.java Mon Aug 27 23:34:04 2007
@@ -0,0 +1,72 @@
+/*
+ * 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.mops.dao;
+
+import org.apache.myfaces.examples.mops.model.Product;
+import org.apache.myfaces.examples.mops.model.ProductPrice;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.PersistenceContext;
+import javax.persistence.Query;
+import javax.persistence.TemporalType;
+import java.util.Date;
+
+public class ProductPriceDao
+{
+ @PersistenceContext
+ private EntityManager entityManager;
+
+ public ProductPrice getPriceForProduct(Product product, Long customerGroupId)
+ {
+ Date today = new Date();
+
+ Query query = entityManager.createNamedQuery("productPriceCustomerGroupCurrent");
+ query.setParameter("product", product);
+ query.setParameter("date", today, TemporalType.DATE);
+ query.setParameter("customerGroupId", customerGroupId);
+ ProductPrice price = null;
+ try
+ {
+ price = (ProductPrice) query.getSingleResult();
+ }
+ catch (NoResultException e)
+ {
+ // fall through ... not unique or not existent
+ }
+ if (price != null)
+ {
+ return null;
+ }
+
+ query = entityManager.createNamedQuery("productPriceCurrent");
+ query.setParameter("product", product);
+ query.setParameter("date", today, TemporalType.DATE);
+ try
+ {
+ return (ProductPrice) query.getSingleResult();
+ }
+ catch (NoResultException e)
+ {
+ // fall through ... not unique or not existent
+ }
+
+ return null;
+ }
+}
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/Product.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/Product.java?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/Product.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/Product.java Mon Aug 27 23:34:04 2007
@@ -18,13 +18,28 @@
*/
package org.apache.myfaces.examples.mops.model;
+import org.apache.myfaces.orchestra.dynaForm.annot.ui.DisplayOnly;
+
+import javax.persistence.CascadeType;
import javax.persistence.Entity;
-import javax.persistence.Id;
+import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
import javax.persistence.Version;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import java.util.HashSet;
+import java.util.Set;
@Entity
+@NamedQueries(value=
+ {
+ @NamedQuery(name="productByFulltext", query="select p from Product p where lower(p.description) like :description"),
+ @NamedQuery(name="productsAll", query="select p from Product p")
+ }
+)
public class Product
{
private Long id;
@@ -33,10 +48,13 @@
private String description;
+ private Set<ProductPrice> productPrices;
+
private Long version;
@Id
@GeneratedValue(strategy= GenerationType.TABLE)
+ @DisplayOnly
public Long getId()
{
return id;
@@ -47,6 +65,16 @@
this.id = id;
}
+ public String getProductNumber()
+ {
+ return productNumber;
+ }
+
+ public void setProductNumber(String productNumber)
+ {
+ this.productNumber = productNumber;
+ }
+
public String getDescription()
{
return description;
@@ -57,7 +85,19 @@
this.description = description;
}
+ @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+ public Set<ProductPrice> getProductPrices()
+ {
+ return productPrices;
+ }
+
+ public void setProductPrices(Set<ProductPrice> productPrices)
+ {
+ this.productPrices = productPrices;
+ }
+
@Version
+ @DisplayOnly
public Long getVersion()
{
return version;
@@ -66,5 +106,25 @@
public void setVersion(Long version)
{
this.version = version;
+ }
+
+ public void addProductPrice(ProductPrice productPrice)
+ {
+ if (productPrices == null)
+ {
+ productPrices = new HashSet();
+ }
+ productPrices.add(productPrice);
+ productPrice.setProduct(this);
+ }
+
+ public void removeProductPrice(ProductPrice productPrice)
+ {
+ if (productPrices == null)
+ {
+ return;
+ }
+
+ productPrices.remove(productPrice);
}
}
Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ProductPrice.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ProductPrice.java?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ProductPrice.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ProductPrice.java Mon Aug 27 23:34:04 2007
@@ -18,6 +18,8 @@
*/
package org.apache.myfaces.examples.mops.model;
+import org.apache.myfaces.orchestra.dynaForm.annot.ui.DisplayOnly;
+
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
@@ -28,9 +30,21 @@
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import java.util.Date;
@Entity
+@NamedQueries(value=
+ {
+ @NamedQuery(
+ name="productPriceCustomerGroupCurrent",
+ query="select p from ProductPrice p where p.product = :product and p.validFrom < :date and (p.validTo is null or p.validTo > :date) and p.customerGroup.id = :customerGroupId"),
+ @NamedQuery(
+ name="productPriceCurrent",
+ query="select p from ProductPrice p where p.product = :product and p.validFrom < :date and (p.validTo is null or p.validTo > :date) and p.customerGroup.id is null")
+ }
+)
public class ProductPrice
{
private Long id;
@@ -60,6 +74,7 @@
}
@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+ @DisplayOnly
public Product getProduct()
{
return product;
Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ShoppingCart.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ShoppingCart.java?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ShoppingCart.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/model/ShoppingCart.java Mon Aug 27 23:34:04 2007
@@ -27,6 +27,7 @@
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Version;
+import java.util.HashSet;
import java.util.Set;
@Entity
@@ -83,5 +84,20 @@
public void setVersion(Long version)
{
this.version = version;
+ }
+
+ public void addProduct(Product product, long quantity)
+ {
+ if (shoppingCartItem == null)
+ {
+ shoppingCartItem = new HashSet();
+ }
+
+ ShoppingCartItem item = new ShoppingCartItem();
+ item.setShoppingCart(this);
+ item.setProduct(product);
+ item.setQuantity(quantity);
+
+ shoppingCartItem.add(item);
}
}
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml Mon Aug 27 23:34:04 2007
@@ -317,4 +317,50 @@
</bean>
+ <!-- mops - MyFaces Orchestra PetStore -->
+
+ <bean
+ name="productDao"
+ class="org.apache.myfaces.examples.mops.dao.ProductDao" />
+
+ <bean
+ name="productPriceDao"
+ class="org.apache.myfaces.examples.mops.dao.ProductPriceDao" />
+
+ <bean
+ name="petstoreData"
+ class="org.apache.myfaces.examples.mops.backings.PetstoreData"
+ scope="conversation"
+ orchestra:conversationName="petstoreConversation">
+
+ <aop:scoped-proxy/>
+ </bean>
+
+ <bean
+ name="mopsSecurity"
+ class="org.apache.myfaces.examples.mops.backings.Security"
+ scope="conversation"
+ orchestra:conversationName="petstoreConversation">
+
+ <aop:scoped-proxy/>
+ </bean>
+
+ <bean
+ name="mopsEditProduct"
+ class="org.apache.myfaces.examples.mops.backings.EditProduct"
+ scope="flash"
+ autowire="byName">
+
+ <aop:scoped-proxy/>
+ </bean>
+
+ <bean
+ name="mopsSearchProduct"
+ class="org.apache.myfaces.examples.mops.backings.SearchProduct"
+ scope="flash"
+ autowire="byName">
+
+ <aop:scoped-proxy/>
+ </bean>
+
</beans>
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml Mon Aug 27 23:34:04 2007
@@ -136,4 +136,24 @@
</navigation-case>
</navigation-rule>
+ <!-- mops - MyFaces Orchestra PetStore -->
+ <navigation-rule>
+ <description>various main navigations</description>
+ <navigation-case>
+ <from-outcome>EditProduct</from-outcome>
+ <to-view-id>/mops/EditProduct.jsp</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>ProductDetails</from-outcome>
+ <to-view-id>/mops/ProductDetail.jsp?productId=#{productId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>EditSelectedProduct</from-outcome>
+ <to-view-id>/mops/EditProduct.jsp?productId=#{productId}</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
</faces-config>
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp Mon Aug 27 23:34:04 2007
@@ -1,8 +1,4 @@
<%--
- 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
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/default.css
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/default.css?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/default.css (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/default.css Mon Aug 27 23:34:04 2007
@@ -109,4 +109,19 @@
.tRight
{
text-align: right;
+}
+
+.formInput
+{
+ text-align: left;
+}
+
+.formData
+{
+ text-align: left;
+}
+
+.formAction
+{
+ text-align: right;
}
Added: myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp Mon Aug 27 23:34:04 2007
@@ -0,0 +1,155 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ 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" %>
+
+ <h:form>
+
+ <t:htmlTag value="h3">
+ <h:outputText value="Edit Product"/>
+ </t:htmlTag>
+
+ <ox:dynaForm
+ id="product"
+ var="product"
+ uri="org.apache.myfaces.examples.mops.model.Product"
+ valueBindingPrefix="mopsEditProduct.product">
+ <h:panelGrid
+ columns="1"
+ rowClasses="formData,formAction"
+ styleClass="formInput"
+ width="40%">
+
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText
+ value="New product"
+ rendered="#{!mopsEditProduct.savedProduct}"/>
+
+ <h:outputText
+ value="Edit product"
+ rendered="#{mopsEditProduct.savedProduct}"/>
+ </h:panelGroup>
+ </f:facet>
+
+ <h:panelGrid
+ id="product-layout"
+ columns="2"
+ rowClasses="TR1,TR2"
+ width="100%">
+ </h:panelGrid>
+
+ <h:panelGrid
+ columns="2"
+ rowClasses="formAction">
+ <h:commandButton
+ value="New product"
+ action="#{mopsEditProduct.newProductAction}" />
+ <h:commandButton
+ value="Save product"
+ action="#{mopsEditProduct.saveProductAction}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </ox:dynaForm>
+
+ <ox:dynaForm
+ id="prices"
+ var="prices"
+ uri="org.apache.myfaces.examples.mops.backings.EditProduct$ProductPriceWrapper"
+ rendered="#{mopsEditProduct.savedProduct}">
+ <t:dataTable
+ id="prices-layout"
+ var="price"
+ value="#{mopsEditProduct.productPrices}">
+
+ <f:facet name="header">
+ <h:outputText
+ value="Product prices" />
+ </f:facet>
+
+ <t:column id="data" />
+
+ <t:column>
+ <f:facet name="header">
+ <h:outputText value="actions" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:commandButton
+ value="edit" />
+ <h:commandButton
+ value="delete">
+ <t:updateActionListener
+ property="#{mopsEditProduct.productPrice}"
+ value="#{price.productPrice}" />
+ </h:commandButton>
+ </h:panelGrid>
+ </t:column>
+
+ </t:dataTable>
+ </ox:dynaForm>
+
+ <ox:dynaForm
+ id="newPrice"
+ var="newPrice"
+ uri="org.apache.myfaces.examples.mops.model.ProductPrice"
+ valueBindingPrefix="mopsEditProduct.productPrice"
+ rendered="#{mopsEditProduct.savedProduct}">
+ <h:panelGrid
+ columns="1"
+ rowClasses="formData,formAction"
+ styleClass="formInput"
+ width="40%">
+
+ <f:facet name="header">
+ <h:outputText
+ value="New price" />
+ </f:facet>
+
+ <h:panelGrid
+ id="newPrice-layout"
+ columns="2"
+ rowClasses="TR1,TR2"
+ width="100%">
+ </h:panelGrid>
+
+ <h:panelGrid
+ columns="2"
+ rowClasses="formAction">
+ <h:commandButton
+ value="New product"
+ action="#{mopsEditProduct.newPriceAction}" />
+ <h:commandButton
+ value="Save product"
+ action="#{mopsEditProduct.savePriceAction}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </ox:dynaForm>
+
+ </h:form>
+
+ <%@ include file="../footer.jspf" %>
+</f:view>
\ No newline at end of file
Added: myfaces/orchestra/trunk/examples/src/main/webapp/mops/ProductDetail.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/mops/ProductDetail.jsp?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/mops/ProductDetail.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/ProductDetail.jsp Mon Aug 27 23:34:04 2007
@@ -0,0 +1,155 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ 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" %>
+
+ <h:form>
+
+ <t:htmlTag value="h3">
+ <h:outputText value="Edit Product"/>
+ </t:htmlTag>
+
+ <ox:dynaForm
+ id="product"
+ var="product"
+ uri="org.apache.myfaces.examples.mops.model.Product"
+ valueBindingPrefix="mopsEditProduct.product">
+ <h:panelGrid
+ columns="1"
+ rowClasses="formData,formAction"
+ styleClass="formInput"
+ width="40%">
+
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText
+ value="New product"
+ rendered="#{!mopsEditProduct.savedProduct}"/>
+
+ <h:outputText
+ value="Edit product"
+ rendered="#{mopsEditProduct.savedProduct}"/>
+ </h:panelGroup>
+ </f:facet>
+
+ <h:panelGrid
+ id="product-layout"
+ columns="2"
+ rowClasses="TR1,TR2"
+ width="100%">
+ </h:panelGrid>
+
+ <h:panelGrid
+ columns="2"
+ rowClasses="formAction">
+ <h:commandButton
+ value="New product"
+ action="#{mopsEditProduct.newProductAction}" />
+ <h:commandButton
+ value="Save product"
+ action="#{mopsEditProduct.saveProductAction}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </ox:dynaForm>
+
+ <ox:dynaForm
+ id="prices"
+ var="prices"
+ uri="org.apache.myfaces.examples.mops.backings.EditProduct$ProductPriceWrapper"
+ rendered="#{mopsEditProduct.savedProduct}">
+ <t:dataTable
+ id="prices-layout"
+ var="price"
+ value="#{mopsEditProduct.productPrices}">
+
+ <f:facet name="header">
+ <h:outputText
+ value="Product prices" />
+ </f:facet>
+
+ <t:column id="data" />
+
+ <t:column>
+ <f:facet name="header">
+ <h:outputText value="actions" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:commandButton
+ value="edit" />
+ <h:commandButton
+ value="delete">
+ <t:updateActionListener
+ property="#{mopsEditProduct.productPrice}"
+ value="#{price.productPrice}" />
+ </h:commandButton>
+ </h:panelGrid>
+ </t:column>
+
+ </t:dataTable>
+ </ox:dynaForm>
+
+ <ox:dynaForm
+ id="newPrice"
+ var="newPrice"
+ uri="org.apache.myfaces.examples.mops.model.Product"
+ valueBindingPrefix="#{mopsEditProduct.productPrice}"
+ rendered="#{mopsEditProduct.savedProduct}">
+ <h:panelGrid
+ columns="1"
+ rowClasses="formData,formAction"
+ styleClass="formInput"
+ width="40%">
+
+ <f:facet name="header">
+ <h:outputText
+ value="New price" />
+ </f:facet>
+
+ <h:panelGrid
+ id="newPrice-layout"
+ columns="2"
+ rowClasses="TR1,TR2"
+ width="100%">
+ </h:panelGrid>
+
+ <h:panelGrid
+ columns="2"
+ rowClasses="formAction">
+ <h:commandButton
+ value="New product"
+ action="#{mopsEditProduct.newPriceAction}" />
+ <h:commandButton
+ value="Save product"
+ action="#{mopsEditProduct.savePriceAction}" />
+ </h:panelGrid>
+ </h:panelGrid>
+ </ox:dynaForm>
+
+ </h:form>
+
+ <%@ include file="../footer.jspf" %>
+</f:view>
\ No newline at end of file
Added: myfaces/orchestra/trunk/examples/src/main/webapp/mops/SearchProduct.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/mops/SearchProduct.jsp?rev=570330&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/mops/SearchProduct.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/SearchProduct.jsp Mon Aug 27 23:34:04 2007
@@ -0,0 +1,117 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ 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" %>
+
+ <h:form>
+
+ <t:htmlTag value="h3">
+ <h:outputText value="Search Product"/>
+ </t:htmlTag>
+
+ <h:panelGrid
+ columns="1">
+
+ <f:facet name="header">
+ <h:outputText value="Administrative tasks" />
+ </f:facet>
+
+ <h:commandLink
+ value="Enable administrator mode"
+ action="#{mopsSecurity.switchAdministratorModeAction}"
+ rendered="#{!mopsSecurity.administratorMode}"/>
+ <h:commandLink
+ value="Disable administrator mode"
+ action="#{mopsSecurity.switchAdministratorModeAction}"
+ rendered="#{mopsSecurity.administratorMode}"/>
+
+ <h:commandLink
+ value="New product"
+ action="EditProduct"
+ rendered="#{mopsSecurity.administratorMode}"/>
+
+ </h:panelGrid>
+
+ <h:panelGrid columns="3">
+ <f:facet name="header">
+ <h:outputText value="Search product" />
+ </f:facet>
+
+ <h:outputLabel
+ for="searchText">
+ <h:outputText value="Search text" />
+ </h:outputLabel>
+
+ <h:inputText
+ id="searchText"
+ value="#{mopsSearchProduct.searchText}" />
+
+ <h:commandButton
+ value="go"
+ action="#{mopsSearchProduct.searchProductAction}" />
+
+ </h:panelGrid>
+
+ <ox:dynaForm
+ var="product"
+ uri="org.apache.myfaces.examples.mops.backings.SearchProduct$ProductWrapper"
+ displayOnly="true">
+
+ <t:dataTable
+ id="product-layout"
+ var="product">
+
+ <t:column id="data" />
+
+ <t:column>
+ <f:facet name="header">
+ <h:outputText value="action" />
+ </f:facet>
+
+ <h:panelGrid
+ columns="2">
+ <h:commandLink
+ value="detail"
+ action="ProductDetails">
+ <f:param name="productId" value="#{product.product.id}" />
+ </h:commandLink>
+
+ <h:commandLink
+ value="edit"
+ action="EditSelectedProduct">
+ <f:param name="productId" value="#{product.product.id}" />
+ </h:commandLink>
+ </h:panelGrid>
+ </t:column>
+ </t:dataTable>
+
+ </ox:dynaForm>
+
+ </h:form>
+
+ <%@ include file="../footer.jspf" %>
+</f:view>
\ No newline at end of file
Copied: myfaces/orchestra/trunk/examples/src/main/webapp/mops/index.jsp (from r569274, myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp)
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/mops/index.jsp?p2=myfaces/orchestra/trunk/examples/src/main/webapp/mops/index.jsp&p1=myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp&r1=569274&r2=570330&rev=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/configurator/index.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/index.jsp Mon Aug 27 23:34:04 2007
@@ -1,8 +1,4 @@
<%--
- 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
@@ -22,4 +18,4 @@
--%>
<%@ page pageEncoding="UTF-8" %>
-<% response.sendRedirect(response.encodeURL("ComponentSelection.faces")); %>
\ No newline at end of file
+<% response.sendRedirect(response.encodeURL("SearchProduct.faces")); %>
\ No newline at end of file
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp?rev=570330&r1=570329&r2=570330&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp Mon Aug 27 23:34:04 2007
@@ -24,46 +24,53 @@
<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s" %>
<f:view>
-<%@include file="header.jspf"%>
+ <%@ include file="header.jspf" %>
-<h:form>
+ <h:form>
- <t:htmlTag value="h3">
- <h:outputText value="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 value="h3">
+ <h:outputText value="Examples"/>
</t:htmlTag>
- <t:htmlTag value="li">
- <h:outputLink value="configurator/index.jsp" >
- <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>
- <t:htmlTag value="ul">
- <t:htmlTag value="li">
- <h:outputLink value="multiBean/start.faces" >
- <h:outputText value="Multiple Beans within the same conversation through special 'orchestra' configuration" />
- </h:outputLink>
+ <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="mops/index.jsp">
+ <h:outputText value="PetStore"/>
+ </h:outputLink>
+ </t:htmlTag>
</t:htmlTag>
- <t:htmlTag value="li">
- <h:outputLink value="annotations/start.faces" >
- <h:outputText value="Some annotation tests" />
- </h:outputLink>
+
+ <t:htmlTag value="ul">
+ <t:htmlTag value="li">
+ <h:outputLink value="configurator/index.jsp">
+ <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 value="li">
+ <h:outputLink value="multiBean/start.faces">
+ <h:outputText
+ value="Multiple Beans within the same conversation through special 'orchestra' configuration"/>
+ </h:outputLink>
+ </t:htmlTag>
+ <t:htmlTag value="li">
+ <h:outputLink value="annotations/start.faces">
+ <h:outputText value="Some annotation tests"/>
+ </h:outputLink>
+ </t:htmlTag>
</t:htmlTag>
- </t:htmlTag>
-</h:form>
+ </h:form>
-<%@include file="footer.jspf"%>
+ <%@ include file="footer.jspf" %>
</f:view>