Re: Autocomplete providecompletions + extra parameter

2008-04-29 Thread Josh Canfield
> Is it possible to add an extra context parameter to the providecompletions
> method?

You can change the content that is sent for the list by extending the
Autocomplete mixin and override the generateResponseMarkup method.

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/corelib/mixins/Autocomplete.html#generateResponseMarkup(org.apache.tapestry.MarkupWriter,
java.util.List)

But getting at any attributes or nodes you've added to the  is
more difficult, assuming you wanted to update two fields with the same
autocomplete item (e.g. the id and the name).

Josh

On Tue, Apr 29, 2008 at 4:59 AM, Leon Derks <[EMAIL PROTECTED]> wrote:
> Hello
>
> Is it possible to add an extra context parameter to the providecompletions
> method?
>
> For example like this:
>
> List onProvideCompletionsFromAccountName(Long categoryId, String
> partial) {
>List matches =
> productDAO.findByPartialNameInCategory(partial, categoryId);
>...
> }
>
> How can I do this without an @Persist on my categoryId?
>
> Leon
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
--
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]



Autocomplete providecompletions + extra parameter

2008-04-29 Thread Leon Derks

Hello

Is it possible to add an extra context parameter to the 
providecompletions method?


For example like this:

List onProvideCompletionsFromAccountName(Long categoryId, String 
partial) {
List matches = productDAO.findByPartialNameInCategory(partial, 
categoryId);
...
}

How can I do this without an @Persist on my categoryId?

Leon

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