Thursday, June 16, 2011

How to pass multiple parameters to a Bean method from JSF

Having used to java operations, we sometimes find the realm of EL Expression a little short of easy utilities in sending parameters directly from JSF.

This example, while it might not be a standard solution, can provide some easy wins in some situation.

Anyway, here's the code solution.

First thing we need to do is make our own Dummy map which basically implements all of the Map interfaces less the Map.get(Object)

So from this Map, we will try to achieve this :)

So, let's start with the Single Parameter input (I'm just going to show codes from here on since it's pretty straightforward):

And here's its Multiple Parameter counterpart. As you can notice, the more parameters you are handling, the more complicated it can possibly be.

No comments:

Post a Comment