You have your tableSize parameter setup as a String type and are
giving it a default value with something like:

<property name="tableSize" initial-value="2" />

Without anything else to go on tapestry will treat this as a literal
String type - which if you read the javadocs for you will find that it
is indeed static / immutable.

Something like tableSize sounds like a numeric value anyways,  so
perhaps try specifying it as an int and using something like :

<property name="tableSize" initial-value="ognl:2" />

instead.

It may be good for you to always use a binding prefix to prevent
confusion in the future.   If you want anything to be a string literal
you can always do:

<property name="tableSize" initial-value="literal:2" />

There is more on this here
http://tapestry.apache.org/tapestry4.1/usersguide/bindings.html .

On Nov 27, 2007 4:52 PM, Ken in nashua <[EMAIL PROTECTED]> wrote:
>
> Well after spending a day and trying all combinations/permutations of trying 
> to establish a binding... everything idicates that bindings do not work for 
> component or session property.
>
> So I tried a regular parameter annotation
> @Parameter(required = false, cache = true)
> public abstract String getTableSize();
> public abstract void setTableSize (String tableSize);
>
> and in template...
>
> stackoverflow if I try
> <span
>  jwcid="@Script" script="/org/trails/demo/components/Gallery.script"
>  tableSize = "ognl:components.galleryWidget.tableSize"
>
> static binding exception if I try
> <span
>  jwcid="@Script" script="/org/trails/demo/components/Gallery.script"
>  tableSize = "2"
>
> static binding exception if I try
> <span
>  jwcid="@Script" script="/org/trails/demo/components/Gallery.script"
>  tableSize = "literal:2"
>
> Binding exception if I omit it
>
> So I am going to create extra code to put the parameter inside my home.page
>
> I shouldn't have to do this.
>
> Can someone confirm this as a bug?Best regards Ken in nashua
>
>
> From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug 
> T-4.1.3 ?Date: Tue, 27 Nov 2007 13:50:05 -0500
>
>
> Adding a setter does not help. public abstract void setTableSize(String 
> tableSize);
>
> Connect and share in new ways with Windows Live. Connect now!
> _________________________________________________________________
> Your smile counts. The more smiles you share, the more we donate. Join in.
> www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline



-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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

Reply via email to