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/09/07 12:02:01 UTC
svn commit: r573524 - in /myfaces/orchestra/trunk:
core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/
core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/
core15/src/main/tld/ examples/src/main/web...
Author: imario
Date: Fri Sep 7 03:01:57 2007
New Revision: 573524
URL: http://svn.apache.org/viewvc?rev=573524&view=rev
Log:
cleanup the dynaform component
Modified:
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormRenderer.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormTag.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilder.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilderDecorator.java
myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld
myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/Form.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/mops/CustomerLogin.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditCustomerGroup.jsp
myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java Fri Sep 7 03:01:57 2007
@@ -42,7 +42,7 @@
private String uri;
private String bundle;
- private String var;
+ // private String var;
private String valueBindingPrefix;
private Boolean displayOnly;
private Boolean exclusiveFields;
@@ -128,7 +128,6 @@
/**
* @see #setVar
- */
public String getVar()
{
if (var != null)
@@ -138,6 +137,7 @@
ValueBinding vb = getValueBinding("var");
return vb != null ? (String) vb.getValue(getFacesContext()) : null;
}
+ */
/**
* Display the whole form in read only mode
@@ -201,11 +201,11 @@
/**
* the var name used to allow access to the form controller
- */
public void setVar(String var)
{
this.var = var;
}
+ */
@Override
public void restoreState(FacesContext context, Object stateArray)
@@ -213,10 +213,10 @@
Object[] states = (Object[]) stateArray;
super.restoreState(context, states[0]);
uri = (String) states[1];
- var = (String) states[2];
- displayOnly = (Boolean) states[3];
- bundle = (String) states[4];
- valueBindingPrefix = (String) states[5];
+ // var = (String) states[2];
+ displayOnly = (Boolean) states[2];
+ bundle = (String) states[3];
+ valueBindingPrefix = (String) states[4];
}
@Override
@@ -226,7 +226,7 @@
{
super.saveState(context),
uri,
- var,
+ // var,
displayOnly,
bundle,
valueBindingPrefix
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormRenderer.java?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormRenderer.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormRenderer.java Fri Sep 7 03:01:57 2007
@@ -160,7 +160,7 @@
protected UIComponent findLayoutComponent(DynaForm dynaForm)
{
- UIComponent layoutComponent = findComponentEx(dynaForm, dynaForm.getVar() + "-layout");
+ UIComponent layoutComponent = findComponentEx(dynaForm, dynaForm.getId() + "-layout");
if (layoutComponent == null)
{
throw new IllegalStateException("DynaForm '" + dynaForm.getId()
@@ -238,7 +238,7 @@
JsfGuiBuilder guiBuilder = createGuiBuilder(context);
guiBuilder.setContext(context);
- guiBuilder.setBackingBeanPrefix(dynaForm.getVar());
+ // guiBuilder.setBackingBeanPrefix(dynaForm.getVar());
if (isTable(layoutComponent))
{
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormTag.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormTag.java?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormTag.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaFormTag.java Fri Sep 7 03:01:57 2007
@@ -25,7 +25,7 @@
public class DynaFormTag extends UIComponentBodyTagBase
{
private String uri;
- private String var;
+ // private String var;
private String valueBindingPrefix;
private String displayOnly;
private String bundle;
@@ -36,7 +36,7 @@
super.release();
uri = null;
- var = null;
+ // var = null;
displayOnly = null;
bundle = null;
exclusiveFields = null;
@@ -47,7 +47,7 @@
{
super.setProperties(component);
setStringProperty(component, "uri", uri);
- setStringProperty(component, "var", var);
+ // setStringProperty(component, "var", var);
setStringProperty(component, "valueBindingPrefix", valueBindingPrefix);
setBooleanProperty(component, "displayOnly", displayOnly);
setStringProperty(component, "bundle", bundle);
@@ -72,19 +72,19 @@
/**
* @see DynaForm#setVar(String)
- */
public String getVar()
{
return var;
}
+ */
/**
* @see DynaForm#setVar(String)
- */
public void setVar(String var)
{
this.var = var;
}
+ */
/**
* @see DynaForm#setDisplayOnly(boolean)
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilder.java?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilder.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilder.java Fri Sep 7 03:01:57 2007
@@ -25,7 +25,6 @@
import org.apache.myfaces.orchestra.dynaForm.metadata.utils.TypeInfos;
import org.apache.myfaces.orchestra.lib.OrchestraException;
-import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
@@ -33,7 +32,6 @@
import javax.faces.component.UISelectBoolean;
import javax.faces.component.UISelectItem;
import javax.faces.component.UISelectItems;
-import javax.faces.component.html.HtmlCommandLink;
import javax.faces.component.html.HtmlInputText;
import javax.faces.component.html.HtmlOutputLabel;
import javax.faces.component.html.HtmlOutputText;
@@ -55,7 +53,6 @@
import javax.faces.convert.NumberConverter;
import javax.faces.convert.ShortConverter;
import javax.faces.el.MethodBinding;
-import javax.faces.event.ActionEvent;
import javax.faces.validator.DoubleRangeValidator;
import javax.faces.validator.LengthValidator;
import java.math.BigDecimal;
@@ -76,7 +73,7 @@
private FacesContext context;
private NewComponentListener newComponentListener;
private String backingEntityPrefix;
- private String backingBeanPrefix;
+ // private String backingBeanPrefix;
private static final Map<String, JsfGuiElementBuilder> builderMap = new TreeMap<String, JsfGuiElementBuilder>();
@@ -92,6 +89,7 @@
builderMap.put(elementType.getName(), builder);
}
+ /*
public String getBackingBeanPrefix()
{
return backingBeanPrefix;
@@ -101,6 +99,7 @@
{
this.backingBeanPrefix = backingBeanPrefix;
}
+ */
public String getBackingEntityPrefix()
{
@@ -701,19 +700,23 @@
return select;
}
+ /*
public HtmlCommandLink doCreateCommandLink(FieldInterface field)
{
HtmlCommandLink command = doCreateCommandLinkComponent();
iniCommandDefaults(command, field, "searchAction", null);
return command;
}
+ */
+ /*
public HtmlCommandLink doCreateCommandLinkComponent()
{
HtmlCommandLink command = (HtmlCommandLink) context.getApplication()
.createComponent("javax.faces.HtmlCommandLink");
return command;
}
+ */
public HtmlPanelGroup doCreatePanelGroupComponent()
{
@@ -866,7 +869,6 @@
/**
* init defaults specifically for commands
- */
public void iniCommandDefaults(UICommand cmp, FieldInterface field,
String action, String actionListener)
{
@@ -891,6 +893,7 @@
{ActionEvent.class}));
}
}
+ */
/**
* setup all the validators, maxlength, size, ... for HtmlInputText fields
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilderDecorator.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilderDecorator.java?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilderDecorator.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/guiBuilder/impl/jsf/JsfGuiBuilderDecorator.java Fri Sep 7 03:01:57 2007
@@ -20,13 +20,11 @@
import org.apache.myfaces.orchestra.dynaForm.metadata.FieldInterface;
-import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
import javax.faces.component.UIParameter;
import javax.faces.component.UISelectBoolean;
-import javax.faces.component.html.HtmlCommandLink;
import javax.faces.component.html.HtmlInputText;
import javax.faces.component.html.HtmlOutputLabel;
import javax.faces.component.html.HtmlOutputText;
@@ -111,15 +109,12 @@
original.createSelectOneMenu(field);
}
- public HtmlCommandLink doCreateCommandLink(FieldInterface field)
- {
- return original.doCreateCommandLink(field);
- }
-
+ /*
public HtmlCommandLink doCreateCommandLinkComponent()
{
return original.doCreateCommandLinkComponent();
}
+ */
public DateTimeConverter doCreateDateConverter(FieldInterface field)
{
@@ -221,10 +216,12 @@
original.fireNewComponent(field, cmp);
}
+ /*
public String getBackingBeanPrefix()
{
return original.getBackingBeanPrefix();
}
+ */
public String getBackingEntityPrefix()
{
@@ -241,10 +238,12 @@
return original.getNewComponentListener();
}
+ /*
public void iniCommandDefaults(UICommand cmp, FieldInterface field, String action, String actionListener)
{
original.iniCommandDefaults(cmp, field, action, actionListener);
}
+ */
public void initDefaults(UIComponent cmp, FieldInterface field)
{
@@ -281,10 +280,12 @@
return original.isDisplayOnly();
}
+ /*
public void setBackingBeanPrefix(String backingBeanPrefix)
{
original.setBackingBeanPrefix(backingBeanPrefix);
}
+ */
public void setBackingEntityPrefix(String backingEntityPrefix)
{
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=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld (original)
+++ myfaces/orchestra/trunk/core15/src/main/tld/myfaces_orchestra15.tld Fri Sep 7 03:01:57 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-
+
<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -41,7 +41,7 @@
Container for field configurations
</description>
</tag>
-
+
<tag>
<name>dynaFormConfig</name>
<tag-class>org.apache.myfaces.orchestra.dynaForm.component.dynaForm.DynaConfigTag</tag-class>
@@ -58,7 +58,7 @@
the name of the property this configuration is for
</description>
</attribute>
-
+
<attribute>
<name>displaySize</name>
<required>false</required>
@@ -67,7 +67,7 @@
the displaySize to be used to render the component
</description>
</attribute>
-
+
<attribute>
<name>displayOnly</name>
<required>false</required>
@@ -95,7 +95,7 @@
</description>
</attribute>
</tag>
-
+
<tag>
<name>dynaForm</name>
<tag-class>org.apache.myfaces.orchestra.dynaForm.component.dynaForm.DynaFormTag</tag-class>
@@ -113,6 +113,7 @@
</description>
</attribute>
+ <!--
<attribute>
<name>var</name>
<required>true</required>
@@ -121,7 +122,8 @@
The var used to get access to the form controller
</description>
</attribute>
-
+-->
+
<attribute>
<name>rendered</name>
<required>false</required>
@@ -167,7 +169,7 @@
The bundle to use to convert the lables to readable strings
</description>
</attribute>
-
+
<attribute>
<name>exclusiveFields</name>
<required>false</required>
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/Form.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/Form.jsp?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/Form.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/dynaForm/Form.jsp Fri Sep 7 03:01:57 2007
@@ -34,7 +34,7 @@
</t:htmlTag>
<ox:dynaForm
- var="entity"
+ id="entity"
uri="org.apache.myfaces.examples.dynaForm.model.SimpleEntity"
valueBindingPrefix="simpleForm">
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/mops/CustomerLogin.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/mops/CustomerLogin.jsp?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/mops/CustomerLogin.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/CustomerLogin.jsp Fri Sep 7 03:01:57 2007
@@ -37,7 +37,6 @@
<ox:dynaForm
id="customer"
- var="customer"
uri="org.apache.myfaces.examples.mops.model.ShopCustomer"
valueBindingPrefix="mopsCustomerLogin.shopCustomer">
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditCustomerGroup.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditCustomerGroup.jsp?rev=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditCustomerGroup.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditCustomerGroup.jsp Fri Sep 7 03:01:57 2007
@@ -36,7 +36,6 @@
<s:subForm>
<ox:dynaForm
id="customerGroup"
- var="customerGroup"
uri="org.apache.myfaces.examples.mops.model.CustomerGroup"
valueBindingPrefix="mopsEditCustomerGroup.customerGroup">
@@ -83,7 +82,6 @@
<s:subForm>
<ox:dynaForm
id="customerGroups"
- var="customerGroups"
uri="org.apache.myfaces.examples.mops.model.CustomerGroup">
<h:dataTable
Modified: 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=573524&r1=573523&r2=573524&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/mops/EditProduct.jsp Fri Sep 7 03:01:57 2007
@@ -36,7 +36,6 @@
<s:subForm id="newProductFrm">
<ox:dynaForm
id="product"
- var="product"
uri="org.apache.myfaces.examples.mops.model.Product"
valueBindingPrefix="mopsEditProduct.product">
<ox:dynaFormConfigs>
@@ -86,7 +85,6 @@
<s:subForm id="editPriceFrm">
<ox:dynaForm
id="prices"
- var="prices"
uri="org.apache.myfaces.examples.mops.backings.EditProduct$ProductPriceWrapper"
rendered="#{mopsEditProduct.savedProduct}"
exclusiveFields="true">
@@ -138,7 +136,6 @@
<s:subForm id="newPriceFrm">
<ox:dynaForm
id="newPrice"
- var="newPrice"
uri="org.apache.myfaces.examples.mops.model.ProductPrice"
valueBindingPrefix="mopsEditProduct.productPrice"
rendered="#{mopsEditProduct.savedProduct}">