You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/12/20 22:50:53 UTC
svn commit: r489206 - in
/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form:
Autocompleter.java Autocompleter.script
Author: jkuhnert
Date: Wed Dec 20 13:50:53 2006
New Revision: 489206
URL: http://svn.apache.org/viewvc?view=rev&rev=489206
Log:
Fixes a pretty large bug in the Autcompleter component.
I wasn't correctly using the "<let>" javascript template function to make my javascript variable names
unique and I wasn't passing getClientId() as the component to update for the Autocompleter filter url.
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java?view=diff&rev=489206&r1=489205&r2=489206
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java Wed Dec 20 13:50:53 2006
@@ -245,7 +245,7 @@
public List getUpdateComponents()
{
List comps = new ArrayList();
- comps.add(getId());
+ comps.add(getClientId());
return comps;
}
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script?view=diff&rev=489206&r1=489205&r2=489206
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.script Wed Dec 20 13:50:53 2006
@@ -7,21 +7,23 @@
<input-symbol key="props" required="yes" />
<input-symbol key="form" required="yes" />
<input-symbol key="widget" required="yes" />
+<let key="completer" unique="yes">
+${id}
+</let>
<body>
<unique>
dojo.require("dojo.widget.Manager");
dojo.require("dojo.widget.Select");
-
dojo.require("tapestry.widget.Widget");
</unique>
</body>
<initialization>
- var ${id}prop=${props};
- tapestry.widget.synchronizeWidgetState("${id}", "Select", ${id}prop, ${widget.destroy});
- if (${id}prop["label"] && ${id}prop["value"]){
+ var ${completer}=${props};
+ tapestry.widget.synchronizeWidgetState("${id}", "Select", ${completer}, ${widget.destroy});
+ if (${completer}["label"] && ${completer}["value"]){
var selw=dojo.widget.byId("${id}");
- selw.setValue(${id}prop["value"]);
- selw.setLabel(${id}prop["label"]);
+ selw.setValue(${completer}["value"]);
+ selw.setLabel(${completer}["label"]);
}
</initialization>
</script>
Re: svn commit: r489206 - in /tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form:
Autocompleter.java Autocompleter.script
Posted by andyhot <an...@di.uoa.gr>.
Jesse Kuhnert wrote:
> I know....I was vaguely remembering that as I cursed myself while
> trying to fix this....Good idea! ;)
Well, don't curse yourself... it's only *my* fault that it's still an idea!
>
> On 12/20/06, andyhot <an...@di.uoa.gr> wrote:
>> I did write
>> http://www.nabble.com/ids-in-html-elements-tf2722702.html#a7593091
>> trying to provoke talk on this topic and come up with a uniform
>> solution.
>>
>> I still need to do http://issues.apache.org/jira/browse/TAPESTRY-1196
>> and then I'd consider the current solution as being bulletproof !
>>
>>
>> jkuhnert@apache.org wrote:
>> > Author: jkuhnert
>> > Date: Wed Dec 20 13:50:53 2006
>> > New Revision: 489206
>> >
>> > URL: http://svn.apache.org/viewvc?view=rev&rev=489206
>> > Log:
>> > Fixes a pretty large bug in the Autcompleter component.
>> >
>> > I wasn't correctly using the "<let>" javascript template function
>> to make my javascript variable names
>> > unique and I wasn't passing getClientId() as the component to
>> update for the Autocompleter filter url.
>> >
>> >
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
--
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: svn commit: r489206 - in /tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form: Autocompleter.java Autocompleter.script
Posted by Jesse Kuhnert <jk...@gmail.com>.
I know....I was vaguely remembering that as I cursed myself while
trying to fix this....Good idea! ;)
On 12/20/06, andyhot <an...@di.uoa.gr> wrote:
> I did write
> http://www.nabble.com/ids-in-html-elements-tf2722702.html#a7593091
> trying to provoke talk on this topic and come up with a uniform solution.
>
> I still need to do http://issues.apache.org/jira/browse/TAPESTRY-1196
> and then I'd consider the current solution as being bulletproof !
>
>
> jkuhnert@apache.org wrote:
> > Author: jkuhnert
> > Date: Wed Dec 20 13:50:53 2006
> > New Revision: 489206
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=489206
> > Log:
> > Fixes a pretty large bug in the Autcompleter component.
> >
> > I wasn't correctly using the "<let>" javascript template function to make my javascript variable names
> > unique and I wasn't passing getClientId() as the component to update for the Autocompleter filter url.
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: svn commit: r489206 - in /tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form:
Autocompleter.java Autocompleter.script
Posted by andyhot <an...@di.uoa.gr>.
I did write
http://www.nabble.com/ids-in-html-elements-tf2722702.html#a7593091
trying to provoke talk on this topic and come up with a uniform solution.
I still need to do http://issues.apache.org/jira/browse/TAPESTRY-1196
and then I'd consider the current solution as being bulletproof !
jkuhnert@apache.org wrote:
> Author: jkuhnert
> Date: Wed Dec 20 13:50:53 2006
> New Revision: 489206
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=489206
> Log:
> Fixes a pretty large bug in the Autcompleter component.
>
> I wasn't correctly using the "<let>" javascript template function to make my javascript variable names
> unique and I wasn't passing getClientId() as the component to update for the Autocompleter filter url.
>
>
--
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org