You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2005/07/21 15:56:17 UTC
cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry/bean BindingBeanInitializer.java
hlship 2005/07/21 06:56:17
Modified: . status.xml
framework/src/java/org/apache/tapestry/bean
BindingBeanInitializer.java
Log:
TAPESTRY-406: Bean Property does not get updated from component parameter
Revision Changes Path
1.167 +1 -0 jakarta-tapestry/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/status.xml,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- status.xml 21 Jul 2005 13:26:31 -0000 1.166
+++ status.xml 21 Jul 2005 13:56:17 -0000 1.167
@@ -60,6 +60,7 @@
<action type="fix" dev="HLS" fixes-bug="TAPESTRY-385">Restore "zebra-striping" to the Exception page</action>
<action type="fix" dev="HLS" fixes-bug="TAPESTRY-427">InspectorButton ignores its disabled parameter</action>
<action type="fix" dev="HLS" fixes-bug="TAPESTRY-383, TAPESTRY-224">Properly position cursor into form fields</action>
+ <action type="fix" dev="HLS" due-to="Kent Tong" fixes-bug="TAPESTRY-406">Bean Property does not get updated from component parameter</action>
</release>
<release version="4.0-beta-2" date="Jul 9 2005">
<action type="fix" dev="HLS" fixes-bug="TAPESTRY-356">FormConditional extends BaseComponent but has no template</action>
1.7 +14 -21 jakarta-tapestry/framework/src/java/org/apache/tapestry/bean/BindingBeanInitializer.java
Index: BindingBeanInitializer.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/bean/BindingBeanInitializer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BindingBeanInitializer.java 18 Apr 2005 17:06:44 -0000 1.6
+++ BindingBeanInitializer.java 21 Jul 2005 13:56:17 -0000 1.7
@@ -23,9 +23,9 @@
import org.apache.tapestry.binding.BindingSource;
/**
- * An {@link org.apache.tapestry.bean.IBeanInitializer} implementation that uses an
- * {@link org.apache.tapestry.IBinding} to obtain the value which will be assigned to the
- * bean property.
+ * An {@link org.apache.tapestry.bean.IBeanInitializer} implementation that uses an
+ * {@link org.apache.tapestry.IBinding} to obtain the value which will be assigned to the bean
+ * property.
*
* @author Howard M. Lewis Ship
* @since 4.0
@@ -37,9 +37,6 @@
private String _bindingReference;
/** @since 4.0 */
- private IBinding _binding;
-
- /** @since 4.0 */
public BindingBeanInitializer(BindingSource source)
{
Defense.notNull(source, "source");
@@ -63,25 +60,21 @@
public void setBeanProperty(IBeanProvider provider, Object bean)
{
- if (_binding == null)
- {
- IComponent component = provider.getComponent();
-
- String description = BeanMessages.propertyInitializerName(_propertyName);
-
- _binding = _bindingSource.createBinding(
- component,
- description,
- _bindingReference,
- BindingConstants.OGNL_PREFIX,
- getLocation());
- }
+ IComponent component = provider.getComponent();
+
+ String description = BeanMessages.propertyInitializerName(_propertyName);
+
+ IBinding binding = _bindingSource.createBinding(
+ component,
+ description,
+ _bindingReference,
+ BindingConstants.OGNL_PREFIX,
+ getLocation());
Class propertyType = PropertyUtils.getPropertyType(bean, _propertyName);
- Object bindingValue = _binding.getObject(propertyType);
+ Object bindingValue = binding.getObject(propertyType);
setBeanProperty(bean, bindingValue);
}
}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org