Thank you very much!

Finally, I find out the reason. It is a stupid bug.

.java
public abstract class MyPage extends BasePage{
}

.page
<page-specification
class="org.apache.tapestry.html.BasePage">

I should 
<page-specification class="pkg.MyPage">

Ah!! It takes me serveral hours to find out this
bug!!!

--- "seloha ." <[EMAIL PROTECTED]> 說:

> I think what you need is something like this:
> 
> in .page:
> 
>    <property name="aLink" type="java.lang.String"/>
> 
>     <component id="foreach" type="Foreach">
>         <binding name="source"
> expression="allLink"/>
>         <binding name="value" expression="aLink"/>
>     </component>
> 
> in .html:
> 
> <span jwcid="foreach">
>   <span jwcid="@Insert" value="ognl:aLink"/>
> </span>
> 
> 
> in .java:
> 
>     public abstract String getALink();
>     public abstract void setALink(String aLink);
> 
> This may not be spot on but I think the problem is
> that you need a value in 
> the foreach to set each iteration to, you then use
> this to display what you 
> want.
> 
> Paul
> 
> 
> Eng Lark Eric Tan <[EMAIL PROTECTED]> wrote:
> 
> Dear all,
> 
> I have prepare "allLink" in 3 parts. Why it still
> have
> error? Looking forward for your comment.
> 
> Eric Tan
> 
> Unable to resolve expression 'allLink' for
> [EMAIL PROTECTED]
> binding:      ExpressionBinding[Main allLink]
> location:     context:/WEB-INF/Main.page, line 44,
> column
> 54
> 
> ognl.NoSuchPropertyException
> allLink
> 
> Main.page
> 
> ...
>     <component id="foreach" type="Foreach">
>         <binding name="source"
> expression="allLink"/>
>     </component>
>     <component id="link" type="PageLink">
>         <static-binding name="page"
> value="UsrMain"/>
>     </component>
> ...
> 
> Main.html
> <span jwcid="foreach">
>     <span jwcid="link"/>
> </span>
> 
> Main.java
> 
> public List getAllLink() {
>               allLink = new ArrayList();
>               allLink.add("Page1");
>               allLink.add("Page2");
>               allLink.add("Page3");
>               return allLink;
> }
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


_______________________________________
 想即時收到新 email 通知?
 下載 Yahoo! Messenger http://messenger.yahoo.com.hk 

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

Reply via email to