tapestry 5.3.6 using autocomplete component problem

2013-05-01 Thread Shuu Johnny
When I want to do the tapestry autocomplete example, I face these trouble.

start-
An unexpected application exception has occurred.

Method
example.hellotapestry.pages.AutoCompleteComp.onProvideCompletionsFromCompInput(java.lang.String)
references component id 'CompInput' which does not exist.

---end---

the using tapestry version is 5.3.6.
the using jars is:

the java code is :

--start
package example.hellotapestry.pages;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;

public class AutoCompleteComp {


@Property
private String component;

private ListString components;


ListString onProvideCompletionsFromCompInput(String key) {

   ListString matches = new ArrayListString();

   IteratorString it=components.iterator();
   while (it.hasNext())
   {
   String element = it.next();
   if (element.startsWith(key))
   {
   matches.add(element);
   }
   }

   return matches;
  }


 public void pageLoaded(){

 components = new ArrayListString();
 components.add(AbstractField);

 }
}
--end
the tml is :
---start---
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3_6.xsd;
form 
input t:type=textfield type=input  t:value=component
  t:id=compInput t:mixins=autocomplete /
 /form
 /html
---end---

And when I remove t:mixins=autocomplete in

input t:type=textfield type=input  t:value=component
  t:id=compInput t:mixins=autocomplete /

and comment out the method  onProvideCompletionsFromCompIn
put(String key)  in Java code.
Then  run the application, the testField could be rendered well.
 It seems the autocomplete don't work.

Have I missed on something here?

Thanks in advance.

/Johnny


Re: tapestry 5.3.6 using autocomplete component problem

2013-05-01 Thread Emmanuel DEMEY
The xsd file you are using seems wrong. Can you use
tapestry_5_3.xsdhttp://tapestry.apache.org/schema/tapestry_5_3.xsd
 instead.
I am not sure it is the solution to your problem.
Manu


2013/5/1 Shuu Johnny johnnys...@gmail.com

 When I want to do the tapestry autocomplete example, I face these trouble.

 start-
 An unexpected application exception has occurred.

 Method

 example.hellotapestry.pages.AutoCompleteComp.onProvideCompletionsFromCompInput(java.lang.String)
 references component id 'CompInput' which does not exist.

 ---end---

 the using tapestry version is 5.3.6.
 the using jars is:

 the java code is :

 --start
 package example.hellotapestry.pages;

 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;

 import org.apache.tapestry5.annotations.Persist;
 import org.apache.tapestry5.annotations.Property;

 public class AutoCompleteComp {


 @Property
 private String component;

 private ListString components;


 ListString onProvideCompletionsFromCompInput(String key) {

ListString matches = new ArrayListString();

IteratorString it=components.iterator();
while (it.hasNext())
{
String element = it.next();
if (element.startsWith(key))
{
matches.add(element);
}
}

return matches;
   }


  public void pageLoaded(){

  components = new ArrayListString();
  components.add(AbstractField);

  }
 }
 --end
 the tml is :
 ---start---
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3_6.xsd;
 form 
 input t:type=textfield type=input  t:value=component
   t:id=compInput t:mixins=autocomplete /
  /form
  /html
 ---end---

 And when I remove t:mixins=autocomplete in

 input t:type=textfield type=input  t:value=component
   t:id=compInput t:mixins=autocomplete /

 and comment out the method  onProvideCompletionsFromCompIn
 put(String key)  in Java code.
 Then  run the application, the testField could be rendered well.
  It seems the autocomplete don't work.

 Have I missed on something here?

 Thanks in advance.

 /Johnny




-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emman...@gmail.com
http://emmanueldemey.fr/

Twitter : @EmmanuelDemey


Re: T5: How to use the Autocomplete component?

2010-10-13 Thread ael

Guys 

Check this out hehehe

http://lombok.demon.co.uk/tapestry5Demo/test/autocomplete/onesource

I hope Tapestry  Its developers make documents like this ^_^.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-How-to-use-the-Autocomplete-component-tp2413813p3210127.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Autocomplete component

2008-05-21 Thread Marcus
Hi,

Using autocomplete mixin, how do we know, if an option of the list provided
was selected, or if user has entered another text?

Would be great if some event was fired on server side when user select one
of option provided by mixin.

Thanks,

Marcus


Autocomplete component

2008-05-20 Thread Manuel Corrales
Hi, i have s doubt about autocomplete component. According to the
documentation, you can return a list of any objects on the
onProvideCompletions, my question is, when i choose a value, this value is
going to be the object from that list? or just a string and i have to make a
match beetwen the string and the real object?

Thanks very much!


Re: Autocomplete component

2008-05-20 Thread Josh Canfield
The Autocomplete calls toString on each of the objects that you
return, and that is the value that is set into your input box.

You can check out the source for the component it's pretty short.
http://tapestry.apache.org/tapestry5/apidocs/src-html/org/apache/tapestry/corelib/mixins/Autocomplete.html

If you want more complex data to be displayed then you can extend the
class and implement the generateResponseMarkup method. As of 5.0.11
extending the client side behavior when the user chooses a value is
not possible, as far as I could find.


Josh

On Tue, May 20, 2008 at 4:06 PM, Manuel Corrales
[EMAIL PROTECTED] wrote:
 Hi, i have s doubt about autocomplete component. According to the
 documentation, you can return a list of any objects on the
 onProvideCompletions, my question is, when i choose a value, this value is
 going to be the object from that list? or just a string and i have to make a
 match beetwen the string and the real object?

 Thanks very much!




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



Re: Autocomplete component

2008-05-20 Thread Manuel Corrales
Ok, thanks!

On Tue, May 20, 2008 at 8:25 PM, Josh Canfield [EMAIL PROTECTED]
wrote:

 The Autocomplete calls toString on each of the objects that you
 return, and that is the value that is set into your input box.

 You can check out the source for the component it's pretty short.

 http://tapestry.apache.org/tapestry5/apidocs/src-html/org/apache/tapestry/corelib/mixins/Autocomplete.html

 If you want more complex data to be displayed then you can extend the
 class and implement the generateResponseMarkup method. As of 5.0.11
 extending the client side behavior when the user chooses a value is
 not possible, as far as I could find.


 Josh

 On Tue, May 20, 2008 at 4:06 PM, Manuel Corrales
 [EMAIL PROTECTED] wrote:
  Hi, i have s doubt about autocomplete component. According to the
  documentation, you can return a list of any objects on the
  onProvideCompletions, my question is, when i choose a value, this value
 is
  going to be the object from that list? or just a string and i have to
 make a
  match beetwen the string and the real object?
 
  Thanks very much!
 



 --
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.

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




Re: T5: How to use the Autocomplete component?

2007-12-28 Thread Joshua Jackson
Dear all,

I would like to recall that Autocompleter works on IE. Has anyone
tried it on Firefox or any other browser?

Thanks in advance.

On 12/28/07, Joshua Jackson [EMAIL PROTECTED] wrote:
 Dear all,

 I already try to follow what's written on the document regarding how
 to use Autocomplete component, but still can not get it working.

 Here's what I've done:
 Template:
 input t:type=TextField t:value=prop:clientName t:mixins=autocomplete /

 Page:
private String clientName;

String[] onProvideCompletionsFromClientName(String input)
{
logger.info(Inside Autocompletion Event Handler);
return null;
}

 Have I missed on something here?

 Thanks in advance.

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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



Re: T5: How to use the Autocomplete component?

2007-12-28 Thread Joshua Jackson
I know. Perhaps this is due to the incompatibility of scriptaculous library.

:(
:sigh:

On 12/28/07, Angelo Chen [EMAIL PROTECTED] wrote:

 Hi Joshua,

 I tried your sample, it does not work in IE/Firefox/Safari, maybe I miss
 something, I can see calls to the server :
 http://localhost:8080/myapp/testajax.textfield:autocomplete? here is what I
 did:

  public ListString onProvideCompletionsFromClientName(String input)
{
ListString result = new ArrayListString();
result.add(test1);
result.add(test2);
System.out.println(Inside Autocompletion Event Handler);
return result;
}

  t:form
input t:type=TextField t:value=prop:clientName
 t:mixins=autocomplete  /
/t:form

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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



Re: T5: How to use the Autocomplete component?

2007-12-28 Thread Mohammad Shamsi
Hi Joshua,

i think that your method names is wrong, your textfield on template has no
t:id,
try it with  t:id=clientName

onProvideCompletionsFromClientName




On Dec 28, 2007 2:25 PM, Joshua Jackson [EMAIL PROTECTED] wrote:

 I know. Perhaps this is due to the incompatibility of scriptaculous
 library.

 :(
 :sigh:

 On 12/28/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
  Hi Joshua,
 
  I tried your sample, it does not work in IE/Firefox/Safari, maybe I miss
  something, I can see calls to the server :
  http://localhost:8080/myapp/testajax.textfield:autocomplete? here is
 what I
  did:
 
   public ListString onProvideCompletionsFromClientName(String input)
 {
 ListString result = new ArrayListString();
 result.add(test1);
 result.add(test2);
 System.out.println(Inside Autocompletion Event Handler);
 return result;
 }
 
   t:form
 input t:type=TextField t:value=prop:clientName
  t:mixins=autocomplete  /
 /t:form

 --
 I'm a coder not a drag-n-dropper

 Blog: http://joshuajava.wordpress.com/

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




-- 
sincerely yours
M. H. Shamsi


Re: T5: How to use the Autocomplete component?

2007-12-28 Thread Mohammad Shamsi
when web application has a context other that ROOT, i got this error.

i test this sample with ROOT context, in FireFox successful. but when if i
set any context name instead of  / i got this  java script error :

Tapestry.onDOMLoaded is not a function

it seems that .js files path is incorrect.

here is my rendere page with context named app :

html
headlink href=/app/assets/tapestry/default.css
rel=stylesheet type=text/css
titleStart Page/title
/head
bodyscript src=/app/assets/scriptaculous/prototype.js
type=text/javascript/scriptscript
src=/app/assets/scriptaculous/scriptaculous.js
type=text/javascript/scriptscript
src=/app/assets/scriptaculous/effects.js
type=text/javascript/scriptscript
src=/app/assets/tapestry/tapestry.js
type=text/javascript/scriptscript
src=/app/assets/scriptaculous/controls.js
type=text/javascript/script
h1Start Page/h1

p This is the start page for this application, a good place
to start your modifications.
Just to prove this is live: /p

p The current time is: Fri Dec 28 17:00:52 GMT 2007. /p

form action=/app/start.form id=form method=post
name=formdiv class=t-invisibleinput name=t:formdata
type=hidden 
value=H4sIAFvzloG1nJuBM7gksajEKjG5pLiIwSq/KF0vsSAxOSNVrySxILW4pKhSLzm/KDUnM0kvKbE4Vc8xCSgGVOyWmZqTohKcWlJa4Jhckpmfpxp6mPuh6PE/TAyMPgw88ak5qbmpeSV+ibmpJQxCPlmJZYn6OYl56frBJUWZeenWFQUlDMxAc9Bd4EaiCwKK8pNTi4uDS5NyM4uLge6AuObwuhSTtG/zzjExMFQUAAB3U2qw6g==/div
   !-- input t:type=TextField
t:value=prop:clientName  t:mixins=autocomplete  / --
   input id=act name=act type=text value=img
alt=[Error] class=t-error-icon t-invisible id=act:icon
src=/app/assets/tapestry/field-error-marker.pngimg
class=t-invisible id=act:loader
src=/app/assets/tapestry/ajax-loader.gifdiv
class=t-autocomplete-menu id=act:menu/div

   /form


p
[a href=/app/start id=pagelinkrefresh/a]
/p
script type=text/javascript
!--
Tapestry.onDOMLoaded(function() {
new Ajax.Autocompleter('act', 'act:menu',
'/app/start.act:autocomplete',
{indicator:act:loader,paramName:t:input});
Tapestry.registerForm('form', {});
});
// --
/script/body

/html







 On Dec 28, 2007 7:32 PM, Howard Lewis Ship  [EMAIL PROTECTED] wrote:

  This kind of error looks too easy to make.  The Autocompleter mixin
  should complain if it is triggered from the client browser and no
  event handler for its providecompletions event is found.
 
  On Dec 28, 2007 7:48 AM, Mohammad Shamsi  [EMAIL PROTECTED] wrote:
   Hi Joshua,
  
   i think that your method names is wrong, your textfield on template
  has no
   t:id,
   try it with  t:id=clientName
  
   onProvideCompletionsFromClientName
  
  
  
  
  
   On Dec 28, 2007 2:25 PM, Joshua Jackson [EMAIL PROTECTED] wrote:
  
I know. Perhaps this is due to the incompatibility of scriptaculous
library.
   
:(
:sigh:
   
On 12/28/07, Angelo Chen  [EMAIL PROTECTED] wrote:

 Hi Joshua,

 I tried your sample, it does not work in IE/Firefox/Safari, maybe
  I miss
 something, I can see calls to the server :
 http://localhost:8080/myapp/testajax.textfield:autocomplete? here
  is
what I
 did:

  public ListString onProvideCompletionsFromClientName(String
  input)
{
ListString result = new ArrayListString();
 result.add(test1);
result.add(test2);
System.out.println(Inside Autocompletion Event Handler);
return result;
}

  t:form
input t:type=TextField t:value=prop:clientName
 t:mixins=autocomplete  /
/t:form
   
--
I'm a coder not a drag-n-dropper
   
Blog: http://joshuajava.wordpress.com/
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   sincerely yours
   M. H. Shamsi
  
 
 
 
  --
  Howard M. Lewis Ship
 
  Creator Apache Tapestry and Apache HiveMind
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --

 sincerely yours
 M. H. Shamsi




-- 
sincerely yours
M. H. Shamsi


Re: T5: How to use the Autocomplete component?

2007-12-28 Thread Angelo Chen

Hi Dalahoo,

Good, that's the problem. ok, it works now in Firefox and Safari, but i
notice one problem in Safari:

you can not navigate in the drop down list with arrow keys like we can do
with Firefox, any ideal? thanks

A.C.


dalahoo wrote:
 
 Hi Joshua,
 
 i think that your method names is wrong, your textfield on template has no
 t:id,
 try it with  t:id=clientName
 
 onProvideCompletionsFromClientName
 
 
 
 
 On Dec 28, 2007 2:25 PM, Joshua Jackson [EMAIL PROTECTED] wrote:
 
 I know. Perhaps this is due to the incompatibility of scriptaculous
 library.

 :(
 :sigh:

 On 12/28/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
  Hi Joshua,
 
  I tried your sample, it does not work in IE/Firefox/Safari, maybe I
 miss
  something, I can see calls to the server :
  http://localhost:8080/myapp/testajax.textfield:autocomplete? here is
 what I
  did:
 
   public ListString onProvideCompletionsFromClientName(String input)
 {
 ListString result = new ArrayListString();
 result.add(test1);
 result.add(test2);
 System.out.println(Inside Autocompletion Event Handler);
 return result;
 }
 
   t:form
 input t:type=TextField t:value=prop:clientName
  t:mixins=autocomplete  /
 /t:form

 --
 I'm a coder not a drag-n-dropper

 Blog: http://joshuajava.wordpress.com/

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


 
 
 -- 
 sincerely yours
 M. H. Shamsi
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-How-to-use-the-Autocomplete-component--tp14522247p14533231.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5: How to use the Autocomplete component?

2007-12-27 Thread Joshua Jackson
Dear all,

I already try to follow what's written on the document regarding how
to use Autocomplete component, but still can not get it working.

Here's what I've done:
Template:
input t:type=TextField t:value=prop:clientName t:mixins=autocomplete /

Page:
private String clientName;

String[] onProvideCompletionsFromClientName(String input)
{
logger.info(Inside Autocompletion Event Handler);
return null;
}

Have I missed on something here?

Thanks in advance.

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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