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 Menard (JIRA)" <de...@tapestry.apache.org> on 2007/12/14 15:31:45 UTC
[jira] Created: (TAPESTRY-1978) When passing in empty parameter,
indicate problem parameter in error message.
When passing in empty parameter, indicate problem parameter in error message.
-----------------------------------------------------------------------------
Key: TAPESTRY-1978
URL: https://issues.apache.org/jira/browse/TAPESTRY-1978
Project: Tapestry
Issue Type: Improvement
Components: Framework
Affects Versions: 5.0.7
Reporter: Kevin Menard
Priority: Minor
While prototyping a page recently, I decided to hold off on passing in parameters until I had a good sense of what their names should be. So, I had something similar to:
<t:textfield value=""/>
Clearly this is a broken construct and Tapestry generally recognized it. I was greeted with the following error message:
"Parameter expression was null or contained only whitespace."
And a highlighted block of my template. Unfortunately, the highlighted block is not where the problem was. Likewise, the error message really didn't indicate what parameter was broken of what component. After a little bit of guess-and-check, I caught the obvious error. It'd be nice if Tapestry handled this for me though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1978) When supplying an empty parameter
binding, indicate problem parameter in error message.
Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Menard updated TAPESTRY-1978:
-----------------------------------
Summary: When supplying an empty parameter binding, indicate problem parameter in error message. (was: When passing in empty parameter, indicate problem parameter in error message.)
> When supplying an empty parameter binding, indicate problem parameter in error message.
> ---------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1978
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1978
> Project: Tapestry
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 5.0.7
> Reporter: Kevin Menard
> Assignee: Kevin Menard
> Priority: Minor
>
> While prototyping a page recently, I decided to hold off on passing in parameters until I had a good sense of what their names should be. So, I had something similar to:
> <t:textfield value=""/>
> Clearly this is a broken construct and Tapestry generally recognized it. I was greeted with the following error message:
> "Parameter expression was null or contained only whitespace."
> And a highlighted block of my template. Unfortunately, the highlighted block is not where the problem was. Likewise, the error message really didn't indicate what parameter was broken of what component. After a little bit of guess-and-check, I caught the obvious error. It'd be nice if Tapestry handled this for me though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1978) When passing in empty parameter,
indicate problem parameter in error message.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569445#action_12569445 ]
Howard M. Lewis Ship commented on TAPESTRY-1978:
------------------------------------------------
There's no essential reason to use Defense.notBlank() if a more custom error message would be more useable. I'm just surprised that a blank expression could make it that far; i.e., I'd expect an earlier check, before we invoke BindingSource.
> When passing in empty parameter, indicate problem parameter in error message.
> -----------------------------------------------------------------------------
>
> Key: TAPESTRY-1978
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1978
> Project: Tapestry
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 5.0.7
> Reporter: Kevin Menard
> Priority: Minor
>
> While prototyping a page recently, I decided to hold off on passing in parameters until I had a good sense of what their names should be. So, I had something similar to:
> <t:textfield value=""/>
> Clearly this is a broken construct and Tapestry generally recognized it. I was greeted with the following error message:
> "Parameter expression was null or contained only whitespace."
> And a highlighted block of my template. Unfortunately, the highlighted block is not where the problem was. Likewise, the error message really didn't indicate what parameter was broken of what component. After a little bit of guess-and-check, I caught the obvious error. It'd be nice if Tapestry handled this for me though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-1978) When supplying an empty parameter
binding, indicate problem parameter in error message.
Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Menard closed TAPESTRY-1978.
----------------------------------
Resolution: Fixed
Fix Version/s: 5.0.11
I was able to convey the location information by wrapping up in a custom Tapestry exception. I avoided an interface change by using the "description" parameter to my advantage. Since it's largely an open-ended value describing the binding, I confined it in my case to the actual parameter name. I couldn't find any place that this narrowing meaning would affect and all existing tests pass, so I'm going with it. If it turns out we need to actually split the description from the parameter name, we can do it when it becomes an actual problem.
> When supplying an empty parameter binding, indicate problem parameter in error message.
> ---------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1978
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1978
> Project: Tapestry
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 5.0.7
> Reporter: Kevin Menard
> Assignee: Kevin Menard
> Priority: Minor
> Fix For: 5.0.11
>
>
> While prototyping a page recently, I decided to hold off on passing in parameters until I had a good sense of what their names should be. So, I had something similar to:
> <t:textfield value=""/>
> Clearly this is a broken construct and Tapestry generally recognized it. I was greeted with the following error message:
> "Parameter expression was null or contained only whitespace."
> And a highlighted block of my template. Unfortunately, the highlighted block is not where the problem was. Likewise, the error message really didn't indicate what parameter was broken of what component. After a little bit of guess-and-check, I caught the obvious error. It'd be nice if Tapestry handled this for me though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1978) When passing in empty parameter,
indicate problem parameter in error message.
Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569348#action_12569348 ]
Kevin Menard commented on TAPESTRY-1978:
----------------------------------------
I've just delved into the issue a bit more. The source of the problem is:
BindingSourceImpl:50
notBlank(expression, "expression");
While the error message is technically accurate, it lacks any context to help the user figure out what's wrong.
The description value supplied includes the source parameter that is in error, but it is appended to the string "parameter " in PageElementFactoryImpl:305. A hackish way of dealing with this is to do a substring to extract what we want. That's highly caller dependent, however. What we really should do is pass the parameter name as a separate parameter, which would necessitate either an interface change or addition.
It should be noted that the location value would help immensely as well, although it only shows the component in error, not the parameter value. Due to the fail fast nature of notBlank, the location value is essentially discarded. So, that should be wrapped up nicely as well.
> When passing in empty parameter, indicate problem parameter in error message.
> -----------------------------------------------------------------------------
>
> Key: TAPESTRY-1978
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1978
> Project: Tapestry
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 5.0.7
> Reporter: Kevin Menard
> Priority: Minor
>
> While prototyping a page recently, I decided to hold off on passing in parameters until I had a good sense of what their names should be. So, I had something similar to:
> <t:textfield value=""/>
> Clearly this is a broken construct and Tapestry generally recognized it. I was greeted with the following error message:
> "Parameter expression was null or contained only whitespace."
> And a highlighted block of my template. Unfortunately, the highlighted block is not where the problem was. Likewise, the error message really didn't indicate what parameter was broken of what component. After a little bit of guess-and-check, I caught the obvious error. It'd be nice if Tapestry handled this for me though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Assigned: (TAPESTRY-1978) When passing in empty parameter,
indicate problem parameter in error message.
Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Menard reassigned TAPESTRY-1978:
--------------------------------------
Assignee: Kevin Menard
> When passing in empty parameter, indicate problem parameter in error message.
> -----------------------------------------------------------------------------
>
> Key: TAPESTRY-1978
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1978
> Project: Tapestry
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 5.0.7
> Reporter: Kevin Menard
> Assignee: Kevin Menard
> Priority: Minor
>
> While prototyping a page recently, I decided to hold off on passing in parameters until I had a good sense of what their names should be. So, I had something similar to:
> <t:textfield value=""/>
> Clearly this is a broken construct and Tapestry generally recognized it. I was greeted with the following error message:
> "Parameter expression was null or contained only whitespace."
> And a highlighted block of my template. Unfortunately, the highlighted block is not where the problem was. Likewise, the error message really didn't indicate what parameter was broken of what component. After a little bit of guess-and-check, I caught the obvious error. It'd be nice if Tapestry handled this for me though.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org