Are you binding your EventListener to the form in question? If you do that
your input value will be set for you before your listener is invoked.

Regarding question number 2, you can do this many ways of course...The
easiest may be to just use the disabled="true|false" that these components
should support already and specify the form as the component to update.

The second is, like you said - using javascript. Perhaps the easiest would
be to use a @Script template that you can pass in parameters of which form
input fields to enable/disable on the response.  You can either have a
@Script reference in your html page that you specify getting updated using
updateComponent("your script template id"), or you can call and execute the
Script template inside your component/page during render..(the way that
components using them normally do..Using PageRenderSupport ..For a page I
think you'd have to implement renderComponent - don't forget to call
super.renderComponent() - and do your script stuff there..)

On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:

Hi there Jesse. Let me post some examples :

There's a form, with some fields (let's say an invoce form). All
fields are marked as read only  but the invoice number.
User enters the invoice number and hits TAB
There's an onchange listener for that component, the listener is
called (so far is everything ok), question is, how do I retreive the
value from the input? If I use getInvoice.getId() inside the listener
it returns null. Would be possible to bind the values from the view to
the model when activating the listener?

2nd. So, I get a response, (filling all the values from the invoice
form). Now a JS function is called so all fields should be not marked
as readonly anymore :)

Was I clear on my state?

Best Regards

Vinicius

On 9/12/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> To answer number 1, I'm not sure...I guess that depends on what you are
> trying to send. Since this isn't a direct component used it is harder to
> find a good way to provide DirectLink parameters to the listener. If you
> have a specific example in mind I can be more helpful.
>
> For number 2, is this something you wanted to invoke globally after all
> async calls or only specific to this particular event listener call?
It's
> very easy to add "things" to be updated to a request from within a
listener
> method(getResponseBuilder().updateComponent()), but  I want to be sure
you
> didn't want some sort of client side UI effect for requests instead.
>
> On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
> >
> > Hello there! I've seen examples (and tried it, really cool, I'm still
> > amazed, and all my co-workers with your job Jesse) using the
> > EventListener. I'd like to know if it is possible to send some values
> > to the listener? Also, is there a way, maybe a callback or something,
> > to interact within it? I mean, after calling the ajax function that
> > sends the values to the server, call a javascript function provided by
> > the developer?
> >
> > Best Regards
> >
> > Vinicius
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>

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




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to