You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kevin J. Menard, Jr. (JIRA)" <ta...@jakarta.apache.org> on 2005/09/06 07:51:30 UTC

[jira] Created: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

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.


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 currently).

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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Kevin J. Menard, Jr. (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=all ]

Kevin J. Menard, Jr. updated TAPESTRY-630:
------------------------------------------

    Attachment: testcase.zip

It may very well be the case that I'm doing something wrong, but I'm pretty sure I'm not.  I've attached a test .html and .java file (with annotations) and the exception page from Tapestry.  Due to not having my selection model and different package structure, you won't be able to run these as are, but they're small enough to illustrate the issue.  Please let me know if you need anything else.

> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Re: [jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by Kevin Menard <km...@servprise.com>.
On Sep 10, 2005, at 3:58 PM, Robert Zeigler wrote:

> 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?

I would want the former actually.  It would let me know right away  
that I had done something wrong.  I think this was actually how it  
worked in T3 too.  I recall having typed "listeners" instead of  
"listener" once and I did not get back an error about an invalid ognl  
property; the text just passed through to the output.  Viewing the  
HTML and seeing the passed through informal parameter, I was able to  
figure out why my listener wasn't being called.  Maybe my memory  
about this is just hazy though.

> 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.

Okay, I think I finally get what you guys were saying, although I had  
to use a test case to illustrate.  I didn't realize then when I did  
provide the listener method that it was passing through a String  
representation of that method.  Apologies for making so much noise.   
I guess I was expecting something that would be more helpful to say  
"hey, using a listener method here doesn't make sense".  Now I see  
how it works though.

-- 
Kevin

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


Re: [jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by Robert Zeigler <rd...@u.arizona.edu>.
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.

Robert

> 
> 
>>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 currently).
>>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


[jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Kevin J. Menard, Jr. (JIRA)" <ta...@jakarta.apache.org>.
    [ 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.

> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Kevin J. Menard, Jr. (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=comments#action_12323101 ] 

Kevin J. Menard, Jr. commented on TAPESTRY-630:
-----------------------------------------------

Then it should not complain if you specify a listener parameter but don't provide a listener as a value.  It should treat it as it would any other informal parameter.  Should I open another bug for this?

> 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

>
> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-630:
-------------------------------------------

    Resolution: Invalid

PropertySelection does not have a formal listener parameter.

> 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

>
> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=comments#action_12323124 ] 

Howard M. Lewis Ship commented on TAPESTRY-630:
-----------------------------------------------

I can't see how it would.  Are you sure you don't have an application override on PropertySelection?  I'd like to see your .page & .html files, and the exception report.

> 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

>
> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=comments#action_12323132 ] 

Howard M. Lewis Ship commented on TAPESTRY-630:
-----------------------------------------------

Tapestry is doing exactly what it should.

In your template:

<html>
<head>Blah</head>

<form jwcid="@Form">
    <select jwcid="@PropertySelection" value="ognl:something" model="ognl:beans.selectionModelManager.countryModel" listener="listener:countryChanged"/>
</form>

</html>

Do, you have bound listener as an informal parameter.

The PropertySelection component will evaluate that informal parameter and convert the value to a string, to create a listener attribute in the <select> element it renders.

The first step is to evaluate listener:countryChanged ... and that's why its failing, because you don't have a countryChanged() method to invoke as a listener.

In Tapestry, a lot of the magic is in the binding objects and binding factories.

> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Assigned: (TAPESTRY-630) PropertySelection "listener" parameter does nothing

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-630?page=all ]

Howard M. Lewis Ship reassigned TAPESTRY-630:
---------------------------------------------

    Assign To: Howard M. Lewis Ship

> 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

>
> 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 currently).
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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