I have a component with a parameter named rate and a session-scoped
property named rateProp.  Both are to be ints.

I have my rate parameter declared as follows:
<parameter name="rate" required="true" />

I have the rateProp declared as follows:

<property name="rateProp" initial-value="rate" persist="session" />

Note that I am trying to use the value of the rate parameter to
initialize the rateProp property.

I use the rateProp in the value binding of a form field (a
PropertySelection) and as an input-symbol to a script included in the
component.

The problem is that the rateProp property does not get initialized
with the value of the rate parameter as I would like.  So, when the
component actually renders itself the value of the rateProp is the
default int value of 0, not the 10 that I am passing in to the
component from the page that includes the component.

I could work around the problem by setting the initial value of the
rateProp property to some invalid value (like -1) and then look for
that in the pageAttached method -- resetting the rateProp to the value
of rate as needed, but it seems like that shouldn't be necessary.

After resetting the rateProp via the PropertySelection on the page it
works fine.

Any help would be appreciated.

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to