ARGH!
Simon, you just pointed out my mistake!
I was using:
getRequestMap().put(#{User}, new User(id));
While I really should have bean using:
getRequestMap().put(User, new User(id));
Notice, the EL notation.. As you said, this last line is equivalent to
below line when you use request beans:
Simon, Mike,
Thanks for the explanation.
I was able to make it work by using below code:
FacesContext ctx = FacesContext.getCurrentInstance();
ValueBinding binding = ctx.getApplication().createValueBinding(#{User});
binding.setValue(ctx, new User(id));
Trying to put the User bean in the
Yannick Le Teigner wrote:
Simon, Mike,
Thanks for the explanation.
I was able to make it work by using below code:
FacesContext ctx = FacesContext.getCurrentInstance();
ValueBinding binding = ctx.getApplication().createValueBinding(#{User});
binding.setValue(ctx, new User(id));
Trying to put
Hi.
Simon, Mike,
Thanks for the explanation.
I was able to make it work by using below code:
FacesContext ctx = FacesContext.getCurrentInstance();
ValueBinding binding = ctx.getApplication().createValueBinding(#{User});
binding.setValue(ctx, new User(id));
Trying to put the User bean
Hello,
I am trying to remove as many beans as possible from the session scope,
and I am facing some difficulties with drilldown pages.
Let's say I have a page listing some users in a dataTable. Clicking on a
user (commandLink), will bring you to a page where you can edit some
parameters
Yannick Le Teigner wrote:
Hello,
I am trying to remove as many beans as possible from the session scope,
and I am facing some difficulties with drilldown pages.
Let's say I have a page listing some users in a dataTable. Clicking on a
user (commandLink), will bring you to a page where you
Simon,
The problem I face with the saveState component, is that when I place it
on the master (1st) page, it is, as expected, initialized with no value
(because the user has yet to click on a row in the datatable to edit a
user/item.)
Once the user click on a row, the detail page is
Hi Yannick,
t:saveState performs two actions:
At the very end of the rendering phase, it looks up the object specified
by its value attribute and serializes it.
During the restore view phase, it deserializes its associated object,
then evaluates its value attribute and assigns the recreated
If you want to use saveState this way, you can. I don't remember how
the examples provide an alternative, but I have used savestate like
this.
// Could acquire a reference to your data backing bean some
other way if you want
ValueBinding binding =
9 matches
Mail list logo