On 5/5/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 5/5/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> Therefore, I personally consider JSR-168 a big mistake, and I would
> prefer it to die peacefully.
Consider the way the world was before JSR-168 happened ... every portal
server had their own completely different API for building portlets, and
bunches of folks who come out the web application world think that "almost
portlet" solutions[1] are enough -- seemingly without caring that they just
added yet another incompatible API to the mix :-)
Craig
[1] http://www.theserverside.com/news/thread.tss?thread_id=40274
Um... Err... Well, I wanted to [re]use the infrastructure that already
was there, instead of creating the notion of request lifecycle from
scratch. I've heard that some frameworks have as many as six phases in
the request/response cycle :-)
Also, I don't think that four measly JSP tags could be counted as an
API. If you took a look at the "Integrating with an Action Framework"
section of the article, you could see that it is possible to use
Struts action with only one change: returning null instead of
ActionMapping. Using <c:import> instead of <jsp:include> should allow
to avoid using JSP as mini-controller and to return to traditional
Struts approach with action forwarding to JSP, so action would not
need _any_ changes.
And I am not saying that my stuff is functionally richer or more
complete than portlet API, of course it is not. I just wanted:
* to have a simple solution for page fragments' aggregation
* to reuse existing Struts action->JSP fixtures as first class page components
* to show that portlet API could be easily built on top JSP spec
This sample
http://superinterface.com/jspcontrols/login-struts-fragment-ajax/index.jsp
uses a regular Struts action for event processing:
<jc:component id="LoginComponent">
<jc:handler>
<jsp:include page="/logincomponent.do" />
</jc:handler>
<jc:reload/>
<jc:prerender/>
<c:if test='${empty USER}'>
<h3>"Log In" subview</h3>
...
</c:if>
<c:if test='${not empty USER}'>
<h3>"Log Out" subview</h3>
...
</c:if>
</jc:component>
Try this too:
http://superinterface.com/jspcontrols/tabcontrol/index.jsp
In this sample tabbed notebooks are separate components, they do not
know about each other. Works with Javascript turned on and off.
On the other hand, with Javascript becoming mainstream, the dual-mode
feature loses its attractiveness. Ajax seems to become the one and
only way of doing UI, so stuff like AjaxTags seems a simpler
alternative.
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]