History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-12353
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Taras Tielkes
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Good code red: using <jsp:attribute> to set a dynamic attribute

Created: 29 Nov 06 19:05   Updated: 01 Dec 06 22:45
Component/s: J2EE.JSP
Fix Version/s: Demetra 6.0.3, Selena 6656

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File attach1.txt (0.2 kb)
2. Text File attach2.txt (0.7 kb)


Build: 6,111
Fixed in build: 6,579


 Description  « Hide
There are basically three ways to use <jsp:attribute>:
1) in concert with <jsp:element>, to dynamically build content
2) as a way to specify (declared) attribute values for custom tags
3) to set dynamic attributes

This last option (3) is not recognized by the JSP editor (as of 5.1.2 and 6.0.2).

Relevant quote from the JSP 2.0 spec, section 5.10:
--------------------
...
The behavior of the <jsp:attribute> standard action varies depending on the type of attribute being specified, as follows:
...
If the custom action accepts dynamic attributes (Section JSP.7.1.8), and the name of the attribute is not one explicitly indicated for the tag, then the container will evaluate the body of <jsp:attribute> and assign the computed value to the attribute using the dynamic attribute machinery. Since the type of the attribute is unknown and the body of <jsp:attribute> evaluates to a String, the container must pass in an instance of String.
...
--------------------
To summarize:
-if <jsp:attribute> is used to set a custom action attribute that is not declared, the editor should accept this if the custom action supports dynamic attributes.



 All   Comments   Work Log   Change History      Sort Order:
Chris Kimpton - 29 Nov 06 20:03
Sample jsp file snippet using jsp:attribute

Chris Kimpton - 29 Nov 06 20:03
Snipped of the related tag file to attachement 1