You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2007/05/25 18:37:50 UTC
Passing 'ValidationDelegate' to a component via annotations - how?
Hi,
I have a component, that renders 'feedback' information, and in doing so
interrogates the ValidationDelegate - or at least that is what is
supposed to be happing. However, I haven't found a way to pass the
delegate into this component. Is this possible, and if so - how ?
I'm now trying:
public abstract class Feedback extends BaseComponent {
@Parameter(name="delegate",required=false,defaultValue="ognl:beans.delegate")
public abstract ValidationDelegate getDelegate();
....
}
Thanks,
-J.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] annoying javascript problem
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Of course it will.
In the meantime you can use the usual workarounds can't you?
<script type="text/javascript">
// <!--
//
...
//-->
</script>
Cheers,
Nick.
Allen Guo wrote:
> I think T5 must support CDATA in stable release.
>
> Allen Guo 写道:
>> Hi All,
>>
>> Due to the project requirement, I often add some javascript to .html
>> like this:
>> sample:
>> <script>
>> var s;
>> for (var i=0;i++;i < productCnt){
>> s += "palcehoder" + i;
>> }
>> .....
>> </script>
>> another sample
>> <input type="button" onclick="if(document.form1.price.value>10)
>> alert('you can not do this');" value="Test"/>
>>
>> You know, in T5, the html file must be a strict xml file, So above
>> codes which cotain '>' won't be allowed in it.
>> How do you solve this kind of problems?
>>
>> Any suggestion is welcome.
>>
>> Thanks
>> Guoguo Long
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] annoying javascript problem
Posted by Allen Guo <el...@gmail.com>.
I think T5 must support CDATA in stable release.
Allen Guo 写道:
> Hi All,
>
> Due to the project requirement, I often add some javascript to .html
> like this:
> sample:
> <script>
> var s;
> for (var i=0;i++;i < productCnt){
> s += "palcehoder" + i;
> }
> .....
> </script>
> another sample
> <input type="button" onclick="if(document.form1.price.value>10)
> alert('you can not do this');" value="Test"/>
>
> You know, in T5, the html file must be a strict xml file, So above
> codes which cotain '>' won't be allowed in it.
> How do you solve this kind of problems?
>
> Any suggestion is welcome.
>
> Thanks
> Guoguo Long
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
[T5] annoying javascript problem
Posted by Allen Guo <el...@gmail.com>.
Hi All,
Due to the project requirement, I often add some javascript to .html
like this:
sample:
<script>
var s;
for (var i=0;i++;i < productCnt){
s += "palcehoder" + i;
}
.....
</script>
another sample
<input type="button" onclick="if(document.form1.price.value>10)
alert('you can not do this');" value="Test"/>
You know, in T5, the html file must be a strict xml file, So above
codes which cotain '>' won't be allowed in it.
How do you solve this kind of problems?
Any suggestion is welcome.
Thanks
Guoguo Long
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Passing 'ValidationDelegate' to a component via annotations - how?
Posted by Jesse Kuhnert <jk...@gmail.com>.
Yep. TapestryUtils.getForm(this, cycle). (something like that)
On 5/25/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> If the component is enclosed by the Form, it can get the Form instance,
> and
> get the validation delegate from the Form. I believe there's a method on
> TapestryUtils to handle this.
>
> On 5/25/07, Jan Vissers <Ja...@cumquat.nl> wrote:
> >
> > Turns out in my case I actually didn't need this.
> >
> > My component now references the delegate using the 'page' shared
> property:
> >
> > ognl:page.delegate.fieldTracking
> >
> > Jan Vissers wrote:
> > > Hi,
> > >
> > > I have a component, that renders 'feedback' information, and in doing
> > > so interrogates the ValidationDelegate - or at least that is what is
> > > supposed to be happing. However, I haven't found a way to pass the
> > > delegate into this component. Is this possible, and if so - how ?
> > >
> > > I'm now trying:
> > >
> > > public abstract class Feedback extends BaseComponent {
> > >
> > > @Parameter(name="delegate",required=false,defaultValue="ognl:
> > beans.delegate")
> > >
> > > public abstract ValidationDelegate getDelegate();
> > > ....
> > >
> > > }
> > >
> > > Thanks,
> > > -J.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > >
> >
> > --
> > Cumquat Information Technology
> > De Dreef 19
> > 3706 BR Zeist
> > T +31 (0)30 - 6940490
> > F +31 (0)30 - 6940499
> > W http://www.cumquat.nl
> >
> > E Jan.Vissers@cumquat.nl
> > M +31 6 51 169 556
> > B http://www.cumquat.nl/technology_atom10.xml
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work. http://howardlewisship.com
>
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Passing 'ValidationDelegate' to a component via annotations - how?
Posted by Howard Lewis Ship <hl...@gmail.com>.
If the component is enclosed by the Form, it can get the Form instance, and
get the validation delegate from the Form. I believe there's a method on
TapestryUtils to handle this.
On 5/25/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>
> Turns out in my case I actually didn't need this.
>
> My component now references the delegate using the 'page' shared property:
>
> ognl:page.delegate.fieldTracking
>
> Jan Vissers wrote:
> > Hi,
> >
> > I have a component, that renders 'feedback' information, and in doing
> > so interrogates the ValidationDelegate - or at least that is what is
> > supposed to be happing. However, I haven't found a way to pass the
> > delegate into this component. Is this possible, and if so - how ?
> >
> > I'm now trying:
> >
> > public abstract class Feedback extends BaseComponent {
> >
> > @Parameter(name="delegate",required=false,defaultValue="ognl:
> beans.delegate")
> >
> > public abstract ValidationDelegate getDelegate();
> > ....
> >
> > }
> >
> > Thanks,
> > -J.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> Cumquat Information Technology
> De Dreef 19
> 3706 BR Zeist
> T +31 (0)30 - 6940490
> F +31 (0)30 - 6940499
> W http://www.cumquat.nl
>
> E Jan.Vissers@cumquat.nl
> M +31 6 51 169 556
> B http://www.cumquat.nl/technology_atom10.xml
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
Re: Passing 'ValidationDelegate' to a component via annotations -
how?
Posted by Jan Vissers <Ja...@cumquat.nl>.
Turns out in my case I actually didn't need this.
My component now references the delegate using the 'page' shared property:
ognl:page.delegate.fieldTracking
Jan Vissers wrote:
> Hi,
>
> I have a component, that renders 'feedback' information, and in doing
> so interrogates the ValidationDelegate - or at least that is what is
> supposed to be happing. However, I haven't found a way to pass the
> delegate into this component. Is this possible, and if so - how ?
>
> I'm now trying:
>
> public abstract class Feedback extends BaseComponent {
>
> @Parameter(name="delegate",required=false,defaultValue="ognl:beans.delegate")
>
> public abstract ValidationDelegate getDelegate();
> ....
>
> }
>
> Thanks,
> -J.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)30 - 6940499
W http://www.cumquat.nl
E Jan.Vissers@cumquat.nl
M +31 6 51 169 556
B http://www.cumquat.nl/technology_atom10.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org