Hi Ken.
I haven't really used T4, but I suspect you may need to bind
the parameter to a persistent property in your Home page:
<div jwcid="[EMAIL PROTECTED]:Gallery"
collectionType="ognl:@[EMAIL PROTECTED]"
component="galleryWidget"
tableSize="tableSize">
Now, you may have noticed that no-one else has replied to you,
and in the interests of improving the signal-to-noise ratio of
the list I'd like to make a polite suggestion.
Post once on a topic, with no ALL-CAPS in the title, and then
wait a day to see if anyone replies. Repeat posts are likely
to either aggravate readers or suggest you've been answered.
Everyone wants input on their particular problem, but posting
10 times a day in ALL-CAPS is not the best way to attract it.
Cheers,
Nick.
Ken nashua wrote:
Folks,
I have been chasing my tail trying to get a simple parameter to work. I am 2
years tapestry and developed parameters for quite sometime.
Can someone confirm this as bug or present a solution?
This is what I have...
Gallery.JAVA
public abstract class Gallery extends BaseComponent
{
public static IPropertySelectionModel tableSizeModel = new
StringPropertySelectionModel(new String[] {
"1", "2", "3", "4", "5", "10", "25", "50", "100", "500", "1000", "2500", "5000",
"10000", "25000", "50000" });
@Parameter(required = false, cache = true, defaultValue = "1")
public abstract String getTableSize();
public abstract void setTableSize(String tableSize);
...
}
Home.html (usage)
<div jwcid="[EMAIL PROTECTED]:Gallery"
collectionType="ognl:@[EMAIL PROTECTED]"
component="galleryWidget"
tableSize="1"
>
Depending on whether I specify @Parameter or @Persist of declare the arrays non-static or specify the parameter in JWC file or omit them from the Home.html definition... I receive various exceptions ranging from cannot update this parameter ...to cannot update static data ...to stack overflow... to bindingexception... to not being able to even reference the property inside an @If condition
<span jwcid="@If" condition="ognl:(index % tableSize) == 0">
Can someone explain how they wold do this? I tried every combination.
Nothing works. Informal parameters are allowed on the java class declaration as
well as within the JWC file.
???
Best regards
Ken in nashua
Gallery.html follows:
<span jwcid="$content$">
<span jwcid="[EMAIL PROTECTED]">
<table width="100%" border=1>
<tr>
<td width="25%" align="left" NOWRAP>
<span jwcid="@Insert" value="Table Size"/>
<select jwcid="@PropertySelection" model="ognl:@[EMAIL PROTECTED]"
value="ognl:tableSize" onchange="tapestry.form.refresh(this.form)"></select>
<span jwcid="@Insert" value="Paging Span"/>
<select jwcid="@PropertySelection" model="ognl:@[EMAIL PROTECTED]"
value="ognl:pagingSpan" onchange="tapestry.form.refresh(this.form)"></select>
</td>
<td align="left" NOWRAP>
<a jwcid="@DirectLink" listener="listener:onBegin" style="fontSize:15px;"> <span
jwcid="@Insert" value="<<"/> </a>
<a jwcid="@DirectLink" listener="listener:onPrev"> <span jwcid="@Insert"
value="<"/> </a>
<a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:1"> <span
jwcid="@Insert" value="ognl:1"/> </a>
<a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:2"> <span
jwcid="@Insert" value="ognl:2"/> </a>
<a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:3"> <span
jwcid="@Insert" value="ognl:3"/> </a>
<a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:4"> <span
jwcid="@Insert" value="ognl:4"/> </a>
<a jwcid="@DirectLink" listener="listener:onPage" parameters="ognl:5"> <span
jwcid="@Insert" value="ognl:5"/> </a>
<a jwcid="@DirectLink" listener="listener:onNext"> <span jwcid="@Insert"
value=">"/> </a>
<a jwcid="@DirectLink" listener="listener:onEnd"> <span jwcid="@Insert"
value=">>"/> </a>
</td>
</tr>
</table>
</span>
<span jwcid="[EMAIL PROTECTED]">
<table width="100%">
<tr>
<span jwcid="[EMAIL PROTECTED]" source="ognl:collection"
value="ognl:currentObject" index="ognl:index">
<span jwcid="@If" condition="ognl:(index % tableSize) == 0">
<span jwcid="@Insert" value="</tr><tr>" raw="true"/>
</span>
<td>
<a jwcid="[EMAIL PROTECTED]" listener="listener:edit"
parameters="ognl:currentObject">
<img jwcid="@Image"
image="ognl:photoAsset"
alt="ognl:currentObject.demographics.city"
title="ognl:currentObject.demographics.city" width="160"
height="110"
/>
</a>
</td>
</span>
</tr>
</table>
</span>
<form jwcid="[EMAIL PROTECTED]" listener="listener:onFormSubmit">
<div jwcid="@RenderBlock" block="ognl:components.autoPagingContent"/>
<div jwcid="@RenderBlock" block="ognl:components.collectionContent"/>
<div jwcid="@RenderBlock" block="ognl:components.autoPagingContent"/>
</form>
<!--
<span jwcid="@Script" script="/org/trails/demo/components/Gallery.script"
tableSize="ognl:3"
component="ognl:components.galleryForm"
/>
-->
</span>
_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]