struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phyopiyo <>
Subject [Shale - Clay] nested properties in @managed-bean-name can't work
Date Sat, 03 Jun 2006 13:28:59 GMT


I could not get/set property values of nested properties in my managed bean.
I am using normal HTML to reference to JSF components defined in my
clay-config.xml.   Here is the code fragment.

<!-- ======== in HTML page =========== -->
<span jsfid="clay" allowBody="false" managedBeanName="testBean" />
...//supporing HTMLs code here
      <label jsfid="testObjLabel">Mock password</label>
      <input jsfid="testObj" type="text" class="data_form">
      <span jsfid="testObjMessage" class="error_form">Mock Error
...//supporing HTMLs code here

<!-- ============ in clay-config.xml ============ -->
<component jsfid="testObjLabel" extends="outputLabel" allowBody="false">
	        <set name="value" value="#{messages['common.label.test']}" />
		<set name="for" value="testObj" />
<component jsfid="testObj" extends="inputText" id="testObj">
   <set name="value" value="#{@managed-bean-name.nestedProperty.testObj}" />
   <set name="required" value="true" />
<component jsfid="testObjMessage" extends="message" allowBody="false">
		<set name="for" value="testObj" />

<!-- ============ in respective backing bean ========= -->
public class TestBean extends AbstractViewController{

   private NestedClass nestedProperty;
   public NestedClass getNestedProperty(){
      return nestedProperty;

   public void setNestedProperty(NestedClass nested){
      nestedProperty = nested;

   // ... all other related methods like 'save', 'canel' etc.

<!-- ====== nested property class ========-->
public class NestedClass{

   private String testObj;
   public String getTestObj(){
      return testObj;

   public void setTestObj(String test){
      testObj = test;
<!-- ========== in faces-config.xml ==========-->

<!-- ========== End ============== -->
I knew that we must use managed-beans in xxx$yyy  format, if the URL is like
http://localhost:8080/myapplication/xxx/yyy.html.  But my case here is using
http://localhost:8080/myapplication/testBean.html.  Therefore, I gave my
managed-bean name 'testBean' without any $ character.

When i submit the form, I am getting '  "testObj": Error during model data
update.  ' error message.  When I try out other immediate properties (e.g.
@managed-bean-name.propertyOne ), i can set/gett it perfectly.  The error
only happen when i used nested properties (e.g.

Is there any thing that I need to do to solve this problem? I have already
read through and study the 'rolodex' example came along with Shale.  But it
is too confusing and could not understand it because there are so many
components defined inside and i lost track.  I also found that Rolodex
sample can successfully use nested bean properties from managed-bean.  but i
just can't do it and can't find the reason why... 

thank you for spending your precious time to read my mail....

Regards to all,

View this message in context:
Sent from the Struts - User forum at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message