Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [faces-dev] Outstanding enhancement request for Jakarta EL
  • From: Mark Thomas <markt@xxxxxxxxxx>
  • Date: Thu, 4 Feb 2021 17:46:03 +0000
  • Autocrypt: addr=markt@xxxxxxxxxx; prefer-encrypt=mutual; keydata= mQINBEq0DukBEAD4jovHOPJDxoD+JnO1Go2kiwpgRULasGlrVKuSUdP6wzcaqWmXpqtOJKKw W2MQFQLmg7nQ9RjJwy3QCbKNDJQA/bwbQT1F7WzTCz2S6vxC4zxKck4t6RZBq2dJsYKF0CEh 6ZfY4dmKvhq+3istSoFRdHYoOPGWZpuRDqfZPdGm/m335/6KGH59oysn1NE7a2a+kZzjBSEg v23+l4Z1Rg7+fpz1JcdHSdC2Z+ZRxML25eVatRVz4yvDOZItqDURP24zWOodxgboldV6Y88C 3v/7KRR+1vklzkuA2FqF8Q4r/2f0su7MUVviQcy29y/RlLSDTTYoVlCZ1ni14qFU7Hpw43KJ tgXmcUwq31T1+SlXdYjNJ1aFkUi8BjCHDcSgE/IReKUanjHzm4XSymKDTeqqzidi4k6PDD4j yHb8k8vxi6qT6Udnlcfo5NBkkUT1TauhEy8ktHhbl9k60BvvMBP9l6cURiJg1WS77egI4P/8 2oPbzzFiGFqXyJKULVgxtdQ3JikCpodp3f1fh6PlYZwkW4xCJLJucJ5MiQp07HAkMVW5w+k8 Xvuk4i5quh3N+2kzKHOOiQCDmN0sz0XjOE+7XBvM1lvz3+UarLfgSVmW8aheLd7eaIl5ItBk 8844ZJ60LrQ+JiIqvqJemxyIM6epoZvY5a3ZshZpcLilC5hW8QARAQABtCJNYXJrIEUgRCBU aG9tYXMgPG1hcmt0QGFwYWNoZS5vcmc+iQI3BBMBCgAhBQJKtA7pAhsDBQsJCAcDBRUKCQgL BRYCAwEAAh4BAheAAAoJEBDAHFovYFnn2YgQAKN6FLG/I1Ij3PUlC/XNlhasQxPeE3w2Ovtt weOQPYkblJ9nHtGH5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N/JWbOGLiwrcN4ukKNyFntFG5jPaFnJdx9rHfyJNeF9cgv9JlZeFxJ6WqIAhl KOuH3K8/py0SPE6ZOFfRo0YUxvh25K/siOcPLm613aOxyY7YfQ8ME2vgn7I0mAtg9am+YFDa bGqj839odwZdzZv2T2mUHnybFTJFBuMWGWKYstYDS6eZEmhupbPvUKkDug/mO+gdo+pSKF9Y S6DM5RtCdTNJq4NZY50ypBb5RSj+INHPocIp2V/DDTbzySsu6wARAQABiQIfBBgBCgAJBQJK tA7pAhsMAAoJEBDAHFovYFnnLe0P/i34oK5cE2LlqUEITEcTO94x1EX0UmtKokRfQ3AYWK8X eFD8cmSty72hMkL+1c0V//4Qc53SUyLIWXk8FKWF7hdL3zyuBqlRb55721CYC35GA/jR90p0 k1vr701gaat2cNTOVC0/6H9cE5yYXT+zMr9TSiKCDwONhhSbmAJZc6X0fgsmCD7I5xUI5Vri hN/Wx0CZBtrXGUyE4hgFaYSGptZmkY5Ln1e+nI185Bda7bpLwcAIGrI9nYtVXgf71ybGKdPP tFfXIoPXuctn99M7NnWBhNuGDms2YWkOC7eeWBTxKkZDWR3vRmRy52B6GxR7USk/KXs7yqGP kfT/c4CZFfOurZUXXuC3PvOme0DQmqwExtJormoG4Fy6suEFPrfhYMigTy7kSbVTCOBMjQLH +U/FFNshvg9+M/ZvaKT+0lpRvBSuG5ngsC0bO0xWsXhb6qfH2h53g4VcwFvCBL5IfqgAeUbC nGGHNcGWpmwdeb7D7ahrNZSHEUUYR7lTbjkYS01/QDOcEwNZOqDRIJUQOOUq35721VeROkdh ZmMZtFlsQeQJsWoqGrQo/kEYicVlMVOgjmOOzOa5fRb/IqlGlBn4a4me3hWthLLtMy+OOEim 6ENjntVTBQiTP/YqrxWDbCkaD7b2e9wY5N3JlRxMIQHfcHaND3PRdQSn7oHYXmJl
  • Delivered-to: faces-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/faces-dev/>
  • List-help: <mailto:faces-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/faces-dev>, <mailto:faces-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/faces-dev>, <mailto:faces-dev-request@eclipse.org?subject=unsubscribe>
  • User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi Thomas,

Thanks. I think I understand now. The issue is simpler than I realised
from looking at the the Mojarra code.

To summarise this from an EL perspective:

When you create a MethodExpression you can either:
- provide the parameters values; or
- provide the parameter types.

These are used to find the required method.

When you invoke a MethodExpression you can either:
- provide the parameter vales; or
- if parameter values were provided at the point the MethodExpression
  was created you can use those.


What you want to do is insert an additional parameter at the point the
method is invoked.

Does that sound right?

Mark


On 04/02/2021 08:34, Thomas Andraschko wrote:
> Hi Mark,
> 
> the code is exactly the same.
> JSF (MyFaces and Mojarra) always uses createMethodExpression with
> AjaxBehaviorEvent.class as param and invokes it.
> "component" is just some EL, it could also be #{bean.method(bean1,
> bean2, bean3)}
> 
> Everything else is handled by the EL impl and the EL impl asks the
> ELResover for bean1, bean2, bean3?
> 
> Best regards,
> Thomas
> 
> 
> 
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> 	Virenfrei. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> 
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> 
> Am Mi., 3. Feb. 2021 um 19:55 Uhr schrieb Mark Thomas <markt@xxxxxxxxxx
> <mailto:markt@xxxxxxxxxx>>:
> 
>     Hi Thomas,
> 
>     Thanks for the explanation. That helps a lot. I've managed to find the
>     implementation that supports:
> 
>     <f:ajax event="click" listener="#{bean.method}" />
> 
>     in the Mojarra source. I'm struggling a little with this one:
> 
>     <f:ajax event="click" listener="#{bean.method(component)}" />
> 
>     Can you provide me with a few pointers to the code paths that are
>     followed to a) set that listener up and b) execute it?
> 
>     My current thinking is that this is something that would need to be
>     addressed in Mojarra. Whether that would require something like a new
>     implicit object "event", a custom MethodExpression or something else
>     is TBD.
> 
>     At this point I don't think this is something that would require a
>     change in EL but there might be something EL could do to simplify
>     things.
> 
>     Thanks,
> 
>     Mark
> 
> 
>     On 02/02/2021 16:21, Thomas Andraschko wrote:
>     > Hi Mark,
>     >
>     > let me explain the problem a bit, maybe we can create a plain EL
>     > testcase then.
>     > Not even sure if there is a nice way to support this. Maybe its even
>     > only a misuse of EL in JSF.
>     >
>     > Here is a simple XHMTL:
>     > <h:inputText>
>     >     <f:ajax event="click" listener="#{bean.method}" />
>     > </h:inputText>
>     >
>     > In general JSF defines that this method can receive no params or
>     > AjaxBehaviorEvent (or even custom event in PrimeFaces but i will
>     ignore
>     > this fact now).
>     >
>     > java:
>     > @Named
>     > @RequestScoped
>     > public class Bean {
>     >     public void method() { }
>     >     public void method(AjaxBehaviorEvent e) { }
>     > }
>     >
>     > So JSF use createMethodExpression with AjaxBehaviorEvent as parameter
>     > class and then invoke it.
>     > This works when no params or AjaxBehaviorEvent is defined as parameter
>     > in the bean.
>     >
>     >
>     > There is another case how a user can pass custom params to that
>     method:
>     >
>     > <f:ajax event="click" listener="#{bean.method(component)}" />
>     >
>     > public void method(UIComponent component) { }
>     >
>     > In this case "component" is resolved by a custom ELResolver.
>     >
>     >
>     > The issue discussed in the GitHub link is a combination of both.
>     > How can i receive the param from JSF (AjaxBehaviorEvent) and pass my
>     > custom UIComponent?
>     >
>     > <f:ajax event="click" listener="#{bean.method(xxx, component)}" />
>     >
>     > public void method(AjaxBehaviorEvent e, UIComponent component) { }
>     >
>     >
>     > AFAIR someone of the PF users used it like this:
>     > <f:ajax event="click"
>     > listener="#{bean.method(javax.faces.event.AjaxBehaviorEvent,
>     > component)}" />
>     >
>     > But im not sure if this is supposed to work or just a random
>     behavior of
>     > the EL impl?
>     >
>     > Best regards,
>     > Thomas
>     >
>     >
>     > Am Di., 2. Feb. 2021 um 15:52 Uhr schrieb Manfred Riem
>     > <m_riem@xxxxxxxxxxx <mailto:m_riem@xxxxxxxxxxx>
>     <mailto:m_riem@xxxxxxxxxxx <mailto:m_riem@xxxxxxxxxxx>>>:
>     >
>     >     Hi Mark,
>     >
>     >     This issue is still relevant
>     >
>     >     Thanks!
>     >
>     >     Kind regards,
>     >     Manfred Riem
>     >
>     >     -----Original Message-----
>     >     From: faces-dev <faces-dev-bounces@xxxxxxxxxxx
>     <mailto:faces-dev-bounces@xxxxxxxxxxx>
>     >     <mailto:faces-dev-bounces@xxxxxxxxxxx
>     <mailto:faces-dev-bounces@xxxxxxxxxxx>>> On Behalf Of Mark Thomas
>     >     Sent: Tuesday, February 2, 2021 5:05 AM
>     >     To: faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>
>     <mailto:faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>>
>     >     Subject: [faces-dev] Outstanding enhancement request for
>     Jakarta EL
>     >
>     >     Hi all,
>     >
>     >     Now Jakarta EE 9 is done and we can start looking to evolve the
>     >     Jakarta specifications I am working my way through the open issues
>     >     for Jakarta Expression Language where I found this decade plus old
>     >     request:
>     >
>     >     https://github.com/eclipse-ee4j/el-ri/issues/6
>     >
>     >     Is this still something that you are interested in seeing in
>     EL? If
>     >     so, we can look at what we can do for Jakarta EE 10 (and I'll
>     >     probably have a bunch of additional questions). If not, I'll close
>     >     the issue.
>     >
>     >     Thanks,
>     >
>     >     Mark
>     >     _______________________________________________
>     >     faces-dev mailing list
>     >     faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>
>     <mailto:faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>>
>     >     To unsubscribe from this list, visit
>     >     https://www.eclipse.org/mailman/listinfo/faces-dev
>     >     _______________________________________________
>     >     faces-dev mailing list
>     >     faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>
>     <mailto:faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>>
>     >     To unsubscribe from this list, visit
>     >     https://www.eclipse.org/mailman/listinfo/faces-dev
>     >
>     >
>     > _______________________________________________
>     > faces-dev mailing list
>     > faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>
>     > To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/faces-dev
>     >
> 
>     _______________________________________________
>     faces-dev mailing list
>     faces-dev@xxxxxxxxxxx <mailto:faces-dev@xxxxxxxxxxx>
>     To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/faces-dev
> 
> 
> _______________________________________________
> faces-dev mailing list
> faces-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/faces-dev
> 



Back to the top