This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91167 - Binding editor does not recognise non-binding EL expressions
Summary: Binding editor does not recognise non-binding EL expressions
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: John Baker
URL: http://wiki.java.net/bin/view/Javatoo...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-17 12:07 UTC by yossarian
Modified: 2008-02-27 07:48 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yossarian 2006-12-17 12:07:55 UTC
Summary:  Certain EL expression are useful for non-binding operations.  If you 
check the reference wiki[1] you'll see several examples.  Once entered in the 
VWP property editor they are seen as bound properties and can no long be edited.

Test case:  

*Drop a table onto a Page
*Select the first column in the TableRowGroup
*In the property editor enter this expression for the style property:
#{currentRow.tableRow.rowId%2==1?'background-color: yellow':''}
NOTE: type this into the style field -- do not click the elipsis button.
*Every second row of your table column should be highlighted (correct behavior)
*Now try to edit the style property of the first column.  The property editor 
go into binding mode. 

Behaviour expected:  The property editor should detect that this is not a 
property binding and allow you to edit the expression.  In general any 
expression with mixed text and EL or conforming to the 
#{[condition]?[value]:[value]} pattern should be editable.

Workarounds:

1. Edit the JSP
2. Right click the tablecolumn in the outline and choose "property bindings"

Note: This behaviour is strickly speaking in the grey area between bug and 
RFE.  Because there are easy workarounds I've filed it as an RFE.  The 
workarounds are now documented.  The issue discourages use of EL to its full 
potential resulting in some messy design patterns for a simple problem.

[1] http://wiki.java.net/bin/view/Javatools/ExpressionLanguage
Comment 1 yossarian 2006-12-17 16:38:51 UTC
>In general any 
>expression with mixed text and EL or conforming to the 
>#{[condition]?[value]:[value]} pattern should be editable.

Unfortunately does not include things like #{22/7} etc.  But internally the 
editor is returning an indication that the property is not bound with these 
type of expressions.  When this happens there should be a textfield available 
to edit the expression.