You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Jesse Kuhnert <jk...@gmail.com> on 2006/05/14 19:42:25 UTC

adding in hard stuff now :)

Starting to do more logic similar to
http://tacos.sourceforge.net/components/AjaxEventSubmit.html, and was
looking for input from people on how they like the interface.

This is what I'm starting with for now..In the pasted in example below I
have one "Autocompleter" component defined on my page, and this listener
method:

/**
     * Invoked when an item is selected from the project
     * selection list.
     */
    @EventListener(events = {"selectOption"},
            targetIds = { "component:projectChoose" })
    public void projectSelected()
    {

    }

Input on anything at all is welcome. Even small detaisl like the naming of
parameters. (targetIds accepts string constant values or OGNL expressions ).
I'm also going to bind it on the client side in such a way that if I had
defined the appropriate String/event parameters to projectSelected() that
the javascript method arguments would also be matched. For example, the
client side event I'm binding to has a function that looks somewhat like:

selectOption: function(evt) {
...
}

I could then change my direct listener method to look something more like:

/**
     * Invoked when an item is selected from the project
     * selection list.
     */
    @EventListener(events = {"selectOption"},
            targetIds = { "component:projectChoose" })
    public void projectSelected(JsEvent event)
    {
        if (event.isMouseClick() || event.foo())
    }

This is an extreme example, as the client function parameter is actually a
js event, but there are many other scnerios where the parameters will be
other things, like Strings / dom nodes /etc,....I don't know....

It's basically going to try and provide as much functionality as makes sense
to encapsulate dojo.event.connect. That means that specifying "before" /
"after" etc style AOP logic will also be possible.

This is a really important feature to get right, so please provide input if
you can :)

-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: adding in hard stuff now :)

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Ok something I have in mind is to bind to JS only events (no Ajax). You 
would create a custom JS function (or use a standard one), and bind it 
on the page, like this:

@EventListener(events = {"selectOption"}, targetIds = 
{"component:projectChoose"})
public IScript getSomeScript();

This would connect this IScript (with the JS function name convention 
you are specifying below) to the HTML component. Perhaps we could have 
some standard scripts, such as:

@EventListener(events = {"onchange"}, targetIds = {"component:someField"})
@InjectScript("scripts/toggleDisabled")
public IScript getToggleDisabledScript();

This would bind a "toggleDisabled" script to the "someField" component. 
So, everytime the "someField" component changes, another component is 
enabled/disabled according to some logic (in this case hardwired into 
toggleDisabled).

With this we can have very rich JS functionality without Ajax.
(The syntax needs more thought, anyway)

-- 
Ing. Leonardo Quijano Vincenzi
DTQ Software
Web Application Design and Programming
http://www.dtqsoftware.com



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: adding in hard stuff now :)

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yes, it's there and working great already. It's called "Autocompleter" .

On 5/15/06, Henri Dupre <he...@gmail.com> wrote:
>
> Jesse, in the new tapestry, is there some chance to see an Ajax
> @PropertySelection?
>
>
> On 5/14/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > Hah....Hadn't even noticed how dojo.event.connect() is already very
> > similar
> > to Howard's direct listener method stuff...As in the parameters are
> > optional
> > but will be automatically filled in for you as you define them...
> >
> > Wish more people realised what kind of innovation has already been
> created
> > in tapestry as it exists today. All of these new features are starting
> to
> > just naturally plop in where they make sense, because the framework was
> > already designed that way. How cool ! :)
> >
> > On 5/14/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > >
> > > Starting to do more logic similar to
> > > http://tacos.sourceforge.net/components/AjaxEventSubmit.html, and was
> > > looking for input from people on how they like the interface.
> > >
> > > This is what I'm starting with for now..In the pasted in example below
> I
> > > have one "Autocompleter" component defined on my page, and this
> listener
> > > method:
> > >
> > > /**
> > >      * Invoked when an item is selected from the project
> > >      * selection list.
> > >      */
> > >     @EventListener(events = {"selectOption"},
> > >             targetIds = { "component:projectChoose" })
> > >     public void projectSelected()
> > >     {
> > >
> > >     }
> > >
> > > Input on anything at all is welcome. Even small detaisl like the
> naming
> > of
> > > parameters. (targetIds accepts string constant values or OGNL
> > expressions ).
> > > I'm also going to bind it on the client side in such a way that if I
> had
> > > defined the appropriate String/event parameters to projectSelected()
> > that
> > > the javascript method arguments would also be matched. For example,
> the
> > > client side event I'm binding to has a function that looks somewhat
> > like:
> > >
> > > selectOption: function(evt) {
> > > ...
> > > }
> > >
> > > I could then change my direct listener method to look something more
> > like:
> > >
> > > /**
> > >      * Invoked when an item is selected from the project
> > >      * selection list.
> > >      */
> > >     @EventListener(events = {"selectOption"},
> > >             targetIds = { "component:projectChoose" })
> > >     public void projectSelected(JsEvent event)
> > >     {
> > >         if (event.isMouseClick() || event.foo())
> > >     }
> > >
> > > This is an extreme example, as the client function parameter is
> actually
> > a
> > > js event, but there are many other scnerios where the parameters will
> be
> > > other things, like Strings / dom nodes /etc,....I don't know....
> > >
> > > It's basically going to try and provide as much functionality as makes
> > > sense to encapsulate dojo.event.connect. That means that specifying
> > > "before" / "after" etc style AOP logic will also be possible.
> > >
> > > This is a really important feature to get right, so please provide
> input
> > > if you can :)
> > >
> > > --
> > > Jesse Kuhnert
> > > Tacos/Tapestry, team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind.
> > >
> >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
> >
>
>
> --
> Thanks,
>
> Henri.
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: adding in hard stuff now :)

Posted by Henri Dupre <he...@gmail.com>.
Jesse, in the new tapestry, is there some chance to see an Ajax
@PropertySelection?


On 5/14/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Hah....Hadn't even noticed how dojo.event.connect() is already very
> similar
> to Howard's direct listener method stuff...As in the parameters are
> optional
> but will be automatically filled in for you as you define them...
>
> Wish more people realised what kind of innovation has already been created
> in tapestry as it exists today. All of these new features are starting to
> just naturally plop in where they make sense, because the framework was
> already designed that way. How cool ! :)
>
> On 5/14/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > Starting to do more logic similar to
> > http://tacos.sourceforge.net/components/AjaxEventSubmit.html, and was
> > looking for input from people on how they like the interface.
> >
> > This is what I'm starting with for now..In the pasted in example below I
> > have one "Autocompleter" component defined on my page, and this listener
> > method:
> >
> > /**
> >      * Invoked when an item is selected from the project
> >      * selection list.
> >      */
> >     @EventListener(events = {"selectOption"},
> >             targetIds = { "component:projectChoose" })
> >     public void projectSelected()
> >     {
> >
> >     }
> >
> > Input on anything at all is welcome. Even small detaisl like the naming
> of
> > parameters. (targetIds accepts string constant values or OGNL
> expressions ).
> > I'm also going to bind it on the client side in such a way that if I had
> > defined the appropriate String/event parameters to projectSelected()
> that
> > the javascript method arguments would also be matched. For example, the
> > client side event I'm binding to has a function that looks somewhat
> like:
> >
> > selectOption: function(evt) {
> > ...
> > }
> >
> > I could then change my direct listener method to look something more
> like:
> >
> > /**
> >      * Invoked when an item is selected from the project
> >      * selection list.
> >      */
> >     @EventListener(events = {"selectOption"},
> >             targetIds = { "component:projectChoose" })
> >     public void projectSelected(JsEvent event)
> >     {
> >         if (event.isMouseClick() || event.foo())
> >     }
> >
> > This is an extreme example, as the client function parameter is actually
> a
> > js event, but there are many other scnerios where the parameters will be
> > other things, like Strings / dom nodes /etc,....I don't know....
> >
> > It's basically going to try and provide as much functionality as makes
> > sense to encapsulate dojo.event.connect. That means that specifying
> > "before" / "after" etc style AOP logic will also be possible.
> >
> > This is a really important feature to get right, so please provide input
> > if you can :)
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>


-- 
Thanks,

Henri.

Re: adding in hard stuff now :)

Posted by Jesse Kuhnert <jk...@gmail.com>.
Hah....Hadn't even noticed how dojo.event.connect() is already very similar
to Howard's direct listener method stuff...As in the parameters are optional
but will be automatically filled in for you as you define them...

Wish more people realised what kind of innovation has already been created
in tapestry as it exists today. All of these new features are starting to
just naturally plop in where they make sense, because the framework was
already designed that way. How cool ! :)

On 5/14/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Starting to do more logic similar to
> http://tacos.sourceforge.net/components/AjaxEventSubmit.html, and was
> looking for input from people on how they like the interface.
>
> This is what I'm starting with for now..In the pasted in example below I
> have one "Autocompleter" component defined on my page, and this listener
> method:
>
> /**
>      * Invoked when an item is selected from the project
>      * selection list.
>      */
>     @EventListener(events = {"selectOption"},
>             targetIds = { "component:projectChoose" })
>     public void projectSelected()
>     {
>
>     }
>
> Input on anything at all is welcome. Even small detaisl like the naming of
> parameters. (targetIds accepts string constant values or OGNL expressions ).
> I'm also going to bind it on the client side in such a way that if I had
> defined the appropriate String/event parameters to projectSelected() that
> the javascript method arguments would also be matched. For example, the
> client side event I'm binding to has a function that looks somewhat like:
>
> selectOption: function(evt) {
> ...
> }
>
> I could then change my direct listener method to look something more like:
>
> /**
>      * Invoked when an item is selected from the project
>      * selection list.
>      */
>     @EventListener(events = {"selectOption"},
>             targetIds = { "component:projectChoose" })
>     public void projectSelected(JsEvent event)
>     {
>         if (event.isMouseClick() || event.foo())
>     }
>
> This is an extreme example, as the client function parameter is actually a
> js event, but there are many other scnerios where the parameters will be
> other things, like Strings / dom nodes /etc,....I don't know....
>
> It's basically going to try and provide as much functionality as makes
> sense to encapsulate dojo.event.connect. That means that specifying
> "before" / "after" etc style AOP logic will also be possible.
>
> This is a really important feature to get right, so please provide input
> if you can :)
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>



-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.