You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Doublel <mo...@gmail.com> on 2007/09/10 10:03:12 UTC
T5: MarkupWriter.element() can not display correctly in my custom component page
I write a custom componnet page ,in beginRender method I want to get a
image link ,so the code is :
writer.element("a",
"t:type","ActionLink"
,"context",totalPage,"t:id","splitPage");
writer.element("img", "src",this.getLast02());
writer.end();
writer.end();
generate html code is :
<a t:type='ActionLink' t:id="splitPage" context=2><img
src="/T505PJBlog/assets/ImagesPath/last01.gif"></a>
It is not work.
the correct html code is :
<a href="/T505PJBlog/default.pages.splitPage/1" id="splitPage">1</a>
Is anybody give me some tips? or I did not understand this page
http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
need your help;
thanks in advance.
--
得与失都是生活
Re: T5: MarkupWriter.element() can not display correctly in my custom component page
Posted by Davor Hrg <hr...@gmail.com>.
uh,
I'm not sure, but i belive
you'll need to change your approach to the problem,
what are you trying to acheive ?
Davor Hrg
On 9/10/07, Doublel <mo...@gmail.com> wrote:
>
> Yes that is true ,I found this point also, If i want to write tapestry
> core
> component,How to do??
>
> use
> @component(parameters={"id=literal:splitPage"})
> private Actionlink link1;
>
> getter /setter^^
>
> then I didn't know how to use link1?? how to nest <img src=""/> into it ?
>
>
>
> 2007/9/10, Davor Hrg <hr...@gmail.com>:
> >
> > I belive writer only writes elements
> > it doesn't handle template syntax
> > t:id and t:type belong to the template
> >
> > Davor Hrg
> >
> > On 9/10/07, Doublel <mo...@gmail.com> wrote:
> > >
> > > I write a custom componnet page ,in beginRender method I want to get
> a
> > > image link ,so the code is :
> > > writer.element("a",
> > > "t:type","ActionLink"
> > > ,"context",totalPage,"t:id","splitPage");
> > > writer.element("img", "src",this.getLast02());
> > > writer.end();
> > > writer.end();
> > >
> > > generate html code is :
> > > <a t:type='ActionLink' t:id="splitPage" context=2><img
> > > src="/T505PJBlog/assets/ImagesPath/last01.gif"></a>
> > > It is not work.
> > >
> > > the correct html code is :
> > > <a href="/T505PJBlog/default.pages.splitPage/1" id="splitPage">1</a>
> > >
> > > Is anybody give me some tips? or I did not understand this page
> > >
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
> > > need your help;
> > > thanks in advance.
> > >
> > > --
> > > 得与失都是生活
> > >
> >
>
>
>
> --
> 得与失都是生活
>
Re: T5: MarkupWriter.element() can not display correctly in my custom component page
Posted by Howard Lewis Ship <hl...@gmail.com>.
Create a component with it's own template. However, you may find that once
you are creating your own component, it so easy to replicate the things that
ActionLink does, that you'll do it inline.
On 9/10/07, Doublel <mo...@gmail.com> wrote:
>
> Yes that is true ,I found this point also, If i want to write tapestry
> core
> component,How to do??
>
> use
> @component(parameters={"id=literal:splitPage"})
> private Actionlink link1;
>
> getter /setter^^
>
> then I didn't know how to use link1?? how to nest <img src=""/> into it ?
>
>
>
> 2007/9/10, Davor Hrg <hr...@gmail.com>:
> >
> > I belive writer only writes elements
> > it doesn't handle template syntax
> > t:id and t:type belong to the template
> >
> > Davor Hrg
> >
> > On 9/10/07, Doublel <mo...@gmail.com> wrote:
> > >
> > > I write a custom componnet page ,in beginRender method I want to get
> a
> > > image link ,so the code is :
> > > writer.element("a",
> > > "t:type","ActionLink"
> > > ,"context",totalPage,"t:id","splitPage");
> > > writer.element("img", "src",this.getLast02());
> > > writer.end();
> > > writer.end();
> > >
> > > generate html code is :
> > > <a t:type='ActionLink' t:id="splitPage" context=2><img
> > > src="/T505PJBlog/assets/ImagesPath/last01.gif"></a>
> > > It is not work.
> > >
> > > the correct html code is :
> > > <a href="/T505PJBlog/default.pages.splitPage/1" id="splitPage">1</a>
> > >
> > > Is anybody give me some tips? or I did not understand this page
> > >
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
> > > need your help;
> > > thanks in advance.
> > >
> > > --
> > > 得与失都是生活
> > >
> >
>
>
>
> --
> 得与失都是生活
>
--
Howard M. Lewis Ship
Partner and Senior Architect at Feature50
Creator Apache Tapestry and Apache HiveMind
Re: T5: MarkupWriter.element() can not display correctly in my custom component page
Posted by Doublel <mo...@gmail.com>.
Yes that is true ,I found this point also, If i want to write tapestry core
component,How to do??
use
@component(parameters={"id=literal:splitPage"})
private Actionlink link1;
getter /setter^^
then I didn't know how to use link1?? how to nest <img src=""/> into it ?
2007/9/10, Davor Hrg <hr...@gmail.com>:
>
> I belive writer only writes elements
> it doesn't handle template syntax
> t:id and t:type belong to the template
>
> Davor Hrg
>
> On 9/10/07, Doublel <mo...@gmail.com> wrote:
> >
> > I write a custom componnet page ,in beginRender method I want to get a
> > image link ,so the code is :
> > writer.element("a",
> > "t:type","ActionLink"
> > ,"context",totalPage,"t:id","splitPage");
> > writer.element("img", "src",this.getLast02());
> > writer.end();
> > writer.end();
> >
> > generate html code is :
> > <a t:type='ActionLink' t:id="splitPage" context=2><img
> > src="/T505PJBlog/assets/ImagesPath/last01.gif"></a>
> > It is not work.
> >
> > the correct html code is :
> > <a href="/T505PJBlog/default.pages.splitPage/1" id="splitPage">1</a>
> >
> > Is anybody give me some tips? or I did not understand this page
> > http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
> > need your help;
> > thanks in advance.
> >
> > --
> > 得与失都是生活
> >
>
--
得与失都是生活
Re: T5: MarkupWriter.element() can not display correctly in my custom component page
Posted by Davor Hrg <hr...@gmail.com>.
I belive writer only writes elements
it doesn't handle template syntax
t:id and t:type belong to the template
Davor Hrg
On 9/10/07, Doublel <mo...@gmail.com> wrote:
>
> I write a custom componnet page ,in beginRender method I want to get a
> image link ,so the code is :
> writer.element("a",
> "t:type","ActionLink"
> ,"context",totalPage,"t:id","splitPage");
> writer.element("img", "src",this.getLast02());
> writer.end();
> writer.end();
>
> generate html code is :
> <a t:type='ActionLink' t:id="splitPage" context=2><img
> src="/T505PJBlog/assets/ImagesPath/last01.gif"></a>
> It is not work.
>
> the correct html code is :
> <a href="/T505PJBlog/default.pages.splitPage/1" id="splitPage">1</a>
>
> Is anybody give me some tips? or I did not understand this page
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
> need your help;
> thanks in advance.
>
> --
> 得与失都是生活
>