Ok, not sure why removing the following works (just want some
clarification so I know):
<binding name="direct" value="ognl:true" />
<binding name="parameters" value="literal:!" />

And of course I realized that what I was returning from the DAO was an
actual object, not a string. So, once I fixed my DAO to look for the
right options and removed those two items from the .page file it now
will generate a drop-down but one odd thing is that I can't select the
drop-down item (just tested with more than one item and it does let me
select, so I guess it's only on a single item select).

Thanks all, this was relatively painless to setup and get working,
very pleased with the components so far!

-warner

On 11/1/06, Warner Onstine <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm working with the snapshot version from nightlies and the js from
> the 4.0.1 lib release on the sf page.
>
> Here is what I have specified:
> NewEvent.page
> <component id="venueAutoCompleter" type="tacos:Autocompleter" >
>                 <binding name="value" value="ognl:event.venue.name"/>
>         <binding name="displayName" value="message:venue_name"/>
>                 <binding name="listSource" value="ognl:searchList" />
>                 <binding name="listener" value="listener:searchVenues" />
>         <binding name="direct" value="ognl:true" />
>         <binding name="parameters" value="literal:!" />
>                 <binding name="validators" value="validators:required"/>
>     </component>
>
> NewEvent.html
> <html jwcid="@Border" title="Tapestry 101 Events Calendar &gt; New Event">
> <style>
>   div.auto_complete {
>     width: 350px;
>     background: #fff;
>   }
>   div.auto_complete ul {
>     border:1px solid #888;
>     margin:0;
>     padding:0;
>     width:100%;
>     list-style-type:none;
>   }
>   div.auto_complete ul li {
>     margin:0;
>     padding:3px;
>   }
>   div.auto_complete ul li.selected {
>     background-color: #ffb;
>   }
>   div.auto_complete ul strong.highlight {
>     color: #800;
>     margin:0;
>     padding:0;
>   }
> </style>
> <form jwcid="[EMAIL PROTECTED]:AjaxForm" success="listener:addEvent"
> delegate="ognl:validationDelegate">
>
>   <fieldset>
>     <legend>Where?</legend>
>         <label jwcid="@FieldLabel" field="component:venueAutoCompleter"
> for="venue_name" accesskey="v">Venue Name</label>
>     <span class="auto_complete" jwcid="venueAutoCompleter"/>
>     <br />
> ...
> </fieldset>
> </form>
> </html>
>
> NewEvent.java (abstract page)
>     @InitialValue("new java.util.ArrayList()")
>     public abstract List getSearchList();
>     public abstract void setSearchList(List list);
>
>     public void searchVenues(String search) {
>         System.out.println("actually calling searchVenues");
>         List list = getPlaceDAO().getPlaceByPlaceName(search);
>         setSearchList(list);
>     }
>
> I know that the AjaxForm is working because I accidentally submitted
> and got the client-side validation message for one of my fields. But
> when I type into the venue name field (venueAutoCompleter) nothing
> happens, it doesn't call my listener method at all.
>
> Any clues what I'm doing wrong?
>
> -warner
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to