You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Duff, Jason" <jd...@starkinvestments.com> on 2001/09/18 22:56:24 UTC

bean:define... get/set

I am using the <bean:define> tag to set an attribute to a specific bean: 
(ex)
  <bean:define id="swapFormModel" name="instrumentForm"
property="formModel"/>

Then I proceed to use this attribute as the "name" property of various html
tags:
(ex)
  <html:text name="swapFormModel" property="model.page1Model.ticker"/>


The problem I am seeing (actually stepped into Struts to confirm this) is
that Struts uses the correct bean (the one defined by the attribute) to get
the value to populate the page.  On submit it reverts to using the default
bean associated with this page which does not work because the html tag
property was formatted to work with the defined attribute as noted above.

Any thoughts as to why this may be happening is greatly appreciated.
Thanks.
jason