Ticket #5359 (closed enhancement: invalid)
portlet support in selectors
| Reported by: | ivan_ra | Owned by: | john |
|---|---|---|---|
| Priority: | low | Milestone: | 1.5 |
| Component: | selector | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Current version does not support identifiers generated for portlets. Typical element identifier in portlet is: formId:elementId:...:subelementId or formId:elementId:...:x:...:subelementId - for table elements (where x is number). Current regexp quickExpr = /[<]*(<(.|\s)+>)[>]*$|#([\w-]+)$/ does not recognise portlet identifiers. I suggest to add ":" symbol followed by any word in expression: quickExpr = /[<]*(<(.|\s)+>)[>]*$|#([\w-(:\w)]+)$/
Change History
comment:2 Changed 4 years ago by ivan_ra
Sorry, its not relate only to portlets, but to every java server faces application. I did not find specification about naming in JSF, but found reference to it in JavaDoc for Apache MyFaces realization of JSF: http://myfaces.apache.org/core12/myfaces-api/apidocs/index.html?javax/faces/component/NamingContainer.html
comment:3 Changed 3 years ago by ivan_ra
You can download official JSF specifications (JSR 252) from page http://www.jcp.org/en/jsr/detail?id=252 or search it on https://javaserverfaces-spec-public.dev.java.net or maybe on http://java.sun.com/javaee/javaserverfaces/. Just download PDF file and search for 'NamingContainer' or simply open section 3.2.3
My changes for quickExpr works more than 2 month in live project. Its rely only for selectors like '#componentId' where componentId can contain ':' character
comment:4 Changed 3 years ago by rwaldron
- Priority changed from trivial to low
- Milestone changed from 1.4 to 1.5
http://www.w3.org/TR/html5/elements.html#the-id-attribute
Reproduced and fixed with jQuery ID escaping from FAQ:
I think jQuery could benefit from doing this escaping internally.
Have a look at this from the jQuery FAQ: http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_by_an_ID_that_has_characters_used_in_CSS_notation.3F
comment:5 Changed 3 years ago by snover
- Status changed from new to closed
- Resolution set to invalid
Is it not a valid CSS string if you are trying to match ID with an unescaped :. : is a reserved character in CSS meaning “pseudo-selector”. #foo:bar:baz:qoox is a selector for an element with the id foo and the pseudo-selectors bar, baz, and qoox.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Can you provide a url for the portlets standard?