I am seeing several questions asking how to pass parameters to JSF methods. With EL2.2 and servlet 3.0, it enables user to pass parameters into a method call. One example: How to pass an argument to method from rendered h:outputText? The question is: In JSF 2.x, each tag attribute is supposed to take either ValueExpression or MethodExpression. In the linked example, "rendered" is supposed to only take ValueExpression. However I do see it still works with MethodExpression if we put () to make it clear it is a method call instead of a property. Is this something the JSF 2.x spec just messed up or am I missing something?
How come JSF 2.x with EL 2.2 allows MethodExpression in place for ValueExpression?
1.1k Views Asked by Baimai Wu At
1
There are 1 best solutions below
Related Questions in JSF-2
- Strange java.lang.ArrayIndexOutOfBoundsException rendering error in jsf application under high load
- Ajax-update only a component attribute, not the whole component nor its children
- How to instantiate a backing bean on page load
- How to add '%' symbol in textbox using jsf and jsp?
- Primefaces datatable duplicate "No records found" while doing column freeze for empty records
- How to provide a file download from a JSF backing bean using af:commandMenuItem?
- Using multiple FluidGrids in one form
- Masks in JSF2 with rich:jQuery?
- IceFaces message not showing
- Add table plugin to primefaces editor
- this.jq.draggable is not a function when using primefaces dialog framework
- Setting f:setPropertyActionListener value with a f:param value
- It is possible to download file on p:poll
- Spring Boot with Jsf views
- JSF, Target unreachable
Related Questions in EL
- IntelliJ warns "Cannot resolve variable" on EL variables declared in parent page of include
- Why am I able to bind <f:actionListener> to an arbitrary method if it's not supported by JSF?
- Is it not possible to directly invoke session.getAttribute() with EL?
- How can I generate a unique JavaScript variable name from a JSF clientId?
- Change fmt:formatDate pattern dynamically
- JSF Composite Component with conditional popup panel
- EL Exception on JSP when passing arguments to liferay-ui:message
- spring annotation getter for isMethod
- How to inject the value of a Struts <s:property /> tag into another tag
- How to access constants in EL?
- <p:graphicImage> throws javax.el.PropertyNotFoundException on #{bean.foo().bar()}, but #{bean.fooAndBar()} works
- How do I invoke a static method in EL
- JSF EL expression compare string value
- EL how to display an array of String items with one statement
- How to do more condition in a ternary operator in my case
Related Questions in RENDERED-ATTRIBUTE
- backingBean doens't receive commandButton action
- JSF ajax render message and redirect
- JSF rendered only if record is null
- Rendered attribute has no effect in dropdown, while it works in input text
- panelGroup rendered tag not working
- JSF Trinidad Rendering not working
- The value of attribute "rendered" associated with [...] must not contain the '<' character
- XPages CSJS gets executed while SSJS does not
- Hide specific <h:selectOneRadio> items
- Rules for checking rendered-attribute for JSF2 custom-component
- Rendering elements in MyFaces 1.1.1
- <a jsf:rendered="#{...}"> is not interpreted as passthrough element
- JSF/Facelets/JSTL conditional display best practices
- primefaces attribute required in combination with rendered not working
- JSF inner datatable not respecting rendered condition of outer table
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Using the new EL 2.2 invoking-methods-with-arguments syntax in a value expression doesn't automagically make it a method expression or something. It's still a value expression. A value expression uses the returned value of the given EL expression as a value. A method expression invokes the given EL expression upon an action event associated with the component.
Whether the EL expression at its own invokes a property getter method or an arbitrary method with arguments really doesn't matter as to how the EL expression at the whole is treated.