You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Frank W. Zammetti" <fz...@omnytex.com> on 2006/07/27 01:01:14 UTC

[ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Hi everyone,

I've gotten a number of requests for an article on AjaxParts Taglib, and 
I finally got around to writing it :)  You can check it out here:

http://www.omnytex.com/articles

If you have never heard of AjaxParts Taglib before, in brief, AjaxParts 
Taglib, a component of the Java Web Parts Project 
(http://javawebparts.sourceforge.net), is a taglib that allows for easy, 
declarative, event-driven AJAX, allowing a developer to add AJAX 
capabilities to existing or new webapps without the need to write ANY 
JavaScript at all!  This article demonstrates how it works, explains the 
benefits, and goes into some details about the capabilities it offers 
out-of-the-box, as well as the ways in which it can be extended to 
fulfill far more advanced users.

Hope it is helpful, and take care!

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Thanks Michael, I appreciate you taking the time to look!

Excellent question... the answer is that the code that APT writes into 
the onClick handler for the button will append itself onto whatever is 
there already, it WILL NOT overwrite your existing code.  This wasn't 
always true, but is as of a couple of versions ago :)

FYI, if you were going where I think you might have been going... you 
can't use this to abort the request.  For instance, you might expect that...

if (!shouldAJAXRequestFire())) { return; }

...would stop the request form firing, since the APT code would follow 
this.  But, it doesn't work.  I'm actually a little surprised by that, I 
had to go try it to be sure... I guess the JS interpreter doesn't treat 
what's in onClick like a function, it's instead just a collection of 
statements that it interprets, return not aborting that interpretation.

However, it is already on our to-do list to provide this ability... we 
already have the preProc that gets called before the request, we'll 
probably examine the return from that and if false, abort the request. 
We also were thinking of adding an <if> child element under the <event> 
element where you could put a Javascript snippet, and if it returns 
false, that aborts the request.  Not sure which way we'll go yet (maybe 
both)... there is a feature request on the SF site, if anyone has an 
opinion, I'd love to have it recorded :)

Frank

Michael Jouravlev wrote:
> On 7/26/06, Frank W. Zammetti <fz...@omnytex.com> wrote:
>> Hi everyone,
>>
>> I've gotten a number of requests for an article on AjaxParts Taglib, and
>> I finally got around to writing it :)  You can check it out here:
>>
>> http://www.omnytex.com/articles
>>
>> If you have never heard of AjaxParts Taglib before, in brief, AjaxParts
>> Taglib, a component of the Java Web Parts Project
>> (http://javawebparts.sourceforge.net), is a taglib that allows for easy,
>> declarative, event-driven AJAX, allowing a developer to add AJAX
>> capabilities to existing or new webapps without the need to write ANY
>> JavaScript at all!  This article demonstrates how it works, explains the
>> benefits, and goes into some details about the capabilities it offers
>> out-of-the-box, as well as the ways in which it can be extended to
>> fulfill far more advanced users.
>>
>> Hope it is helpful, and take care!
>>
>> Frank
> 
> Frank,
> 
> great stuff! I haven't read the whole article yet :-) so just a quick 
> question:
> 
> say I have this button:
> 
> <input type="button" value="Click me for AJAX"><ajax:event
> ajaxRef="MyFunctions/Button1" />
> 
> and I defined the "onclick" event in <ajaxConfig>.
> 
> What will happen if I define another onclick handler right in the
> "input" element like
> 
> <input type="button" value="Click me for AJAX" onclick="return
> doMyCustomStuff();"><ajax:event ajaxRef="MyFunctions/Button1" />
> 
> Basically, how do you handle custom Javascript?
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Posted by Michael Jouravlev <jm...@gmail.com>.
On 7/26/06, Frank W. Zammetti <fz...@omnytex.com> wrote:
> Hi everyone,
>
> I've gotten a number of requests for an article on AjaxParts Taglib, and
> I finally got around to writing it :)  You can check it out here:
>
> http://www.omnytex.com/articles
>
> If you have never heard of AjaxParts Taglib before, in brief, AjaxParts
> Taglib, a component of the Java Web Parts Project
> (http://javawebparts.sourceforge.net), is a taglib that allows for easy,
> declarative, event-driven AJAX, allowing a developer to add AJAX
> capabilities to existing or new webapps without the need to write ANY
> JavaScript at all!  This article demonstrates how it works, explains the
> benefits, and goes into some details about the capabilities it offers
> out-of-the-box, as well as the ways in which it can be extended to
> fulfill far more advanced users.
>
> Hope it is helpful, and take care!
>
> Frank

Frank,

great stuff! I haven't read the whole article yet :-) so just a quick question:

say I have this button:

<input type="button" value="Click me for AJAX"><ajax:event
ajaxRef="MyFunctions/Button1" />

and I defined the "onclick" event in <ajaxConfig>.

What will happen if I define another onclick handler right in the
"input" element like

<input type="button" value="Click me for AJAX" onclick="return
doMyCustomStuff();"><ajax:event ajaxRef="MyFunctions/Button1" />

Basically, how do you handle custom Javascript?

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
On Thu, July 27, 2006 12:34 pm, Monkeyden wrote:
> The statement "This just goes to show, patenting every idea you ever
> have..." just seemed to imply that you were the first with the idea.  My
> apologies if I perceived it the wrong way.

Gotcha.  No, I don't think you really perceived it wrong... At the time I
was doing that application I mentioned, the idea of things like partial
page  rendering and RIAs were just kind of being played with (not just by
me, as I mentioned).  To be honest about it, the approach seemed natural
and logical, it never even occurred to me that it might be anything
special!  That's what I was saying there... I know I wasn't the first, but
I was certainly there early on, and had it dawned on me that what I was
doing, 6-7 years later, might be seen as a paradigm shift, as AJAX/RIAs is
for a lot of people today, it might have entered my mind to really develop
the concept and publicize it.  I'm not sure there was ever anything
patentable there, but it would have been nice to have even considered it,
and I didn't.  That's happened to me a couple of times in my life, as you
say later, it probably has to many of us.  Realizing you *might* have
"missed the boat" with something big sucks, that's really all I meant :)

> Realizing that you're ahead of the curve: I don't doubt that many of us
> have
> a few "might have beens" in our careers.  There are few among us,
> however, who would have realized the value of an "Internet", like Al Gore
> did.  :)

Hehe :)  The man sure is a genius!!

(Then again, as an artificial lifeform, he'd have to be)

Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Posted by Monkeyden <mo...@gmail.com>.
The statement "This just goes to show, patenting every idea you ever
have..." just seemed to imply that you were the first with the idea.  My
apologies if I perceived it the wrong way.  I certainly don't claim that I
was the first either.  I was just a code monkey at the time, but Coach may
well have been.  He was a runner up in the MIT Entrepreneur competition in
1999 for this project.

http://ajax.sys-con.com/read/185642.htm

Realizing that you're ahead of the curve: I don't doubt that many of us have
a few "might have beens" in our careers.  There are few among us,
however, who would have realized the value of an "Internet", like Al Gore
did.  :)


On 7/27/06, Frank W. Zammetti <fz...@omnytex.com> wrote:
>
> On Thu, July 27, 2006 11:59 am, Monkeyden wrote:
> > You may have a battle with my former co-worker, Coach Wei at Nexaweb, to
> > lay
> > claim to the first "Ajax-like" application.  He is widely referred to as
> > an
> > Ajax pioneer.  We were doing this in '99-2000 and he was well into it
> > before
> > I got involved.
>
> I'm not really sure where I said anything like that... could you point it
> out?
>
> I can tell you that I did write an application in the '99-2000 timeframe
> as well that was definitely "Ajax-like"... most of the application was
> client-side and loaded once initially, and requests after that were made
> targetting a hidden frame.  The responses were XML, which were then parsed
> and the UI updated based on that data.  The server never rendered anything
> other than XML after that initial load.  I'm sure I described that
> application somewhere.  Is that what your referring to perhaps?
>
> In any case, that is in *no way* trying to lay claim to anything, other
> than the fact that I was playing with these kinds of ideas years ago, as
> were many other people.  Had I connected those ideas with clean products I
> might now be famous :)  But I didn't.  I have no problem believing others
> did even more advanced things than I did, even back then.
>
> Frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
On Thu, July 27, 2006 11:59 am, Monkeyden wrote:
> You may have a battle with my former co-worker, Coach Wei at Nexaweb, to
> lay
> claim to the first "Ajax-like" application.  He is widely referred to as
> an
> Ajax pioneer.  We were doing this in '99-2000 and he was well into it
> before
> I got involved.

I'm not really sure where I said anything like that... could you point it
out?

I can tell you that I did write an application in the '99-2000 timeframe
as well that was definitely "Ajax-like"... most of the application was
client-side and loaded once initially, and requests after that were made
targetting a hidden frame.  The responses were XML, which were then parsed
and the UI updated based on that data.  The server never rendered anything
other than XML after that initial load.  I'm sure I described that
application somewhere.  Is that what your referring to perhaps?

In any case, that is in *no way* trying to lay claim to anything, other
than the fact that I was playing with these kinds of ideas years ago, as
were many other people.  Had I connected those ideas with clean products I
might now be famous :)  But I didn't.  I have no problem believing others
did even more advanced things than I did, even back then.

Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [ANNOUNCE] New article: The AjaxParts Taglib from Java Web Parts: AJAX for Java Developers the Easy (yet powerful) Way!

Posted by Monkeyden <mo...@gmail.com>.
You may have a battle with my former co-worker, Coach Wei at Nexaweb, to lay
claim to the first "Ajax-like" application.  He is widely referred to as an
Ajax pioneer.  We were doing this in '99-2000 and he was well into it before
I got involved.  Our initial approach was pretty unique, however.  We
stripped out the guts of Swing and wrote an XML Platform Look and Feel
(PLAF), much like Windows or Motif, following the MVC conventions of Swing.
This means that the View of the Swing widgets was in fact an XML string.
That XML was sent to an ActiveX conrol at the time, for rendering on the
client.  The platform was fully capable of handling remote events.  When you
consider the architecture, it's essentially a Swing application running on
the server, handling events from the client.

On 7/26/06, Frank W. Zammetti <fz...@omnytex.com> wrote:
>
> Hi everyone,
>
> I've gotten a number of requests for an article on AjaxParts Taglib, and
> I finally got around to writing it :)  You can check it out here:
>
> http://www.omnytex.com/articles
>
> If you have never heard of AjaxParts Taglib before, in brief, AjaxParts
> Taglib, a component of the Java Web Parts Project
> (http://javawebparts.sourceforge.net), is a taglib that allows for easy,
> declarative, event-driven AJAX, allowing a developer to add AJAX
> capabilities to existing or new webapps without the need to write ANY
> JavaScript at all!  This article demonstrates how it works, explains the
> benefits, and goes into some details about the capabilities it offers
> out-of-the-box, as well as the ways in which it can be extended to
> fulfill far more advanced users.
>
> Hope it is helpful, and take care!
>
> Frank
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Java Web Parts -
> http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>