Autocomplete in new.dryml

8 views
Skip to first unread message

norguir

unread,
Aug 14, 2008, 2:59:39 AM8/14/08
to Hobo Users
Hi,

I can get autocomplete work OK on already created project, as Agility
shows, but run into problems when trying to apply it while creating a
new object. It seems that my usage of autocomplete only works on
existing object, or maybe autocomplete itself only works with existing
object.

Here's the dryml code I use (directly taken from Agility):

...
<section:destinations class="destinations">
<h2><count label="Contacts" part="contact-count"/></h2>
<collection part="contacts">
<card:><delete-button: update="contact-count"/></card:>
</collection>

<form:new update="contacts, contact-count" reset-form refocus-
form>
<div>
Add a recipient: <name-one:contact complete-
target="&@message" completer="new_contact_firstname"/>
</div>
</form:new>

</section:destinations>
...
If used in a view/message/show.dryml, it works like charm but in a
views/message/new.dryml the <name-one:contact line produces the
following:

<input class="autocompleter destination_contact complete-
on:nil:new_contact_firstname" name="destination[contact]" type="text" /
>

The 'nil' in complete-on:nil:new_contact_firstname in turn produces an
error in hobo_rapid.js:620 and prevents the creation of the java
Autocompleter. The rest of the Java code relies on the existence of an
object id number, which does not exist yet...

Any idea on how to get Hobo completion to work in this case or do I
need to switch to Rails 2.0 auto_complete plugin for that ?

Many thanks,

norguir
Reply all
Reply to author
Forward
0 new messages