atom feed35 messages in net.java.dev.ajax.devRe: component.getClientId only unique...
FromSent OnAttachments
Gregory MurrayApr 10, 2007 10:44 pm 
Norbert TruchsessApr 11, 2007 12:03 am 
Norbert TruchsessApr 11, 2007 12:05 am 
Gregory MurrayApr 11, 2007 12:26 am 
Gregory MurrayApr 11, 2007 12:48 am 
Craig McClanahanApr 11, 2007 12:58 am 
Craig McClanahanApr 11, 2007 1:19 am 
Ed BurnsApr 11, 2007 6:32 pm 
Ed BurnsApr 11, 2007 7:52 pm 
Craig McClanahanApr 11, 2007 7:53 pm 
Ed BurnsApr 11, 2007 8:28 pm 
Craig McClanahanApr 11, 2007 9:41 pm 
Craig McClanahanApr 11, 2007 9:44 pm 
Craig McClanahanApr 11, 2007 9:51 pm 
Norbert TruchsessApr 11, 2007 10:08 pm 
Norbert TruchsessApr 11, 2007 10:15 pm 
Craig McClanahanApr 12, 2007 12:19 am 
Norbert TruchsessApr 12, 2007 1:19 pm 
Norbert TruchsessApr 12, 2007 2:54 pm 
Norbert TruchsessApr 12, 2007 3:43 pm 
Gregory MurrayApr 14, 2007 4:56 pm 
Gregory MurrayApr 14, 2007 5:03 pm 
Craig McClanahanApr 14, 2007 5:06 pm 
Ed BurnsApr 16, 2007 8:18 am 
Gregory MurrayApr 16, 2007 8:32 am 
Ed BurnsApr 16, 2007 8:55 am 
Gregory MurrayApr 16, 2007 9:09 am 
Norb...@t-online.deApr 16, 2007 9:21 am 
Ed BurnsApr 17, 2007 9:59 am 
Craig McClanahanApr 17, 2007 10:23 am 
Norbert TruchsessApr 17, 2007 1:05 pm 
Craig McClanahanApr 17, 2007 3:30 pm 
Gregory MurrayApr 18, 2007 1:54 am 
Norb...@t-online.deApr 18, 2007 4:44 am 
Norbert TruchsessApr 19, 2007 1:40 pm 
Subject:Re: component.getClientId only unique to a given page. / ValueExpression+value-attribute
From:Norbert Truchsess (norb@t-online.de)
Date:Apr 11, 2007 10:15:36 pm
List:net.java.dev.ajax.dev

Craig McClanahan schrieb:

Ed Burns wrote:

On Wed, 11 Apr 2007 19:53:46 -0700, Craig McClanahan <Crai@Sun.COM> said:

CM> Ed Burns wrote:

On Tue, 10 Apr 2007 22:45:16 -0700, Gregory Murray <Greg@Sun.COM> said:

EB> When using jMaki with JSF, IF there is no "service" attribute but there EB> is a "value" attribute on the a:widget tag, AND the value of the "value" EB> attribute is an EL ValueExpression, THEN there should be no service EB> handed to the widget. Rather, the system should make it so that the EB> postback happens to the regular JSF page.

CM> Ed, does this really cover all the use cases?

CM> Consider an autocomplete text field ... the fact that I might use a CM> value binding expression on the "value" property is orthogonal to the CM> fact that the widget *also* needs some sort of service callback to get CM> the set of valid options as the user types keystrokes. If I am reading CM> your proposed functionality description right, it would seem to prohibit CM> this kind of combination.

Yes. I see. You need the ValueExpression when you render the page, and when the form is actually submitted (via Ajax or otherwise). You need the service only when doing autocomplete *before* the form is submitted. However, as I stated my above rule (which is the same rule for this I've been stating for at least a year) I'm addressing the case where *there is no service attribute* and there is a value attribute. Another clause on the rule is necessary to handle your case.

Let me restate my rule to consider your case.

if (using jMaki with JSF) {

if (no service attribute on tag) {

I am not omfortable with this restriction.

For a JSF based autocomplete component, the URL that would be specified is normally an implementation detail of the component, not something the application developer should care about. Consider the way we implemented this in the Blueprints Auto Complete Text Field ... the renderer creates the callback URL (the moral equivalent of the "service" property for jMaki) that maps to an internal (to the component) class that actually does the lookups. The fact that the component-provided code delegates to application-provided code via a method binding expression is, again, an implementation detail. The key point is that the *component* should own setting this URL, not the *developer*.

This seems like a pattern I would expect to see everywhere in JSF components that wrap jMaki widgets which have asynchronous callbacks to the server. Indeed, having this level of detail handled for you seems like part of why you'd bother using JSF components for this use case in the first place.

Craig

Generally speaking - I totally agree with Ed, that if a ValueExpression is bound to the value-attribute, dies ValueBinding should actually be bound to the UIComponent and any Value submitted by the Widget (for saving it's state) should be posted back to the page itself (if not - and this is how it's currently with the phaselistener - it bypasses the JSF-lifecycle and does not trigger any Events and Validations associated with that).

- Norbert

if (there is a value attribute) {

the value of the widget "service" property must be the fully qualified URL of the JSF page in which the tag is a component in the view. } else {

either value or service is required. a TagLibraryValidator error?

}

} else {

use the value of the service attribute as the value of the "service" property on the widget.

}

}