tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Zeigler <rdzei...@u.arizona.edu>
Subject Re: [jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing
Date Sat, 10 Sep 2005 19:58:46 GMT
Kevin J. Menard, Jr. (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=comments#action_12323134
> Kevin J. Menard, Jr. commented on TAPESTRY-630:
> -----------------------------------------------
> Okay, I may very well be doing something wrong, but I still don't get the Tapestry behavior.
 If it is not going to call the listener method if I provide one, then it should not complain
if I don't give it a valid listener as a value for that parameter.  That is, if it's going
to do nothing with listener at all, then the value should be passed through as a String and
not be interpereted at all.  At least then, I can see the 'listener="listener:countryChanged'
in my rendered HTML and realize that it's not a formal parameter for this component.  The
current error message is leading me to believe that all I need to do is provide a listener
method and then things will work, which it will not call, bringing me to submit this as a
bug in the first place.
> I realize that was a bit confusing.  If you need me to clarify, I can take another stab
at it.

Hm... I agree with Howard on this one...
Suppose you had put:
<select jwcid="@PropertySelection" ... class="ognl:htmlClass"/>

Would you want tapestry to print out:

<select ... class="ognl:htmlClass"/>, or would you want tapestry to
print out the result returned by evaluating htmlClass?
It's the same concept, albeit slightly obfuscated by the fact
that we /do/ have listeners, and listeners normally don't cause anything
to be printed in the html. Be that as it may, since it's an informal
parameter, the expectation on tapestry's part is that you want a string
printed.  It's entirely consistent, and the message is equally
equivalent with:

class="ognl:dynamicClass" throwing a "property not found" exception if
getDynamicClass can't be found.


>>PropertySelection "listener" parameter does nothing
>>         Key: TAPESTRY-630
>>         URL: http://issues.apache.org/jira/browse/TAPESTRY-630
>>     Project: Tapestry
>>        Type: Bug
>>    Versions: 4.0
>>    Reporter: Kevin J. Menard, Jr.
>>    Assignee: Howard M. Lewis Ship
>> Attachments: testcase.zip
>>The formal "listener" parameter for the PropertySelection listener seems to not do
much.  Specifying the parameter but not having the actual listener method will generate an
error as expected.  However, if a listener is supplied, it is simply never called.  I tested
this by setting onchange="javascript:this.form.events.refresh();" and onchange="javascript:this.form.submit();"
(I did not try this.form.events.submit() since there is a bug with that not actually submitting
>>Anyway, it would be nice if the listener would get called.  Changes to PropertySelection
components are often used to update form contents.  Another nicety would be if specifying
a listener automatically provided an onchange value.

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

View raw message