The way that the request-scoped beans work is they are retained throughout an entire request, so if the request-scoped bean pulls some DB data inside its constructor, then that DB call will be made every time that request-scoped bean is constructed (once per request).
The tag would not be ideal
The f:param is an attractive feature. But, considering the value of
the UIData list is maintained for me regardless of anything i do. The
rowData works absolutely fine and is much preferred over the other
solutions that i've seen in this thread. I was able to avoid the
mulitple database hits. I did
do that?
>
> -Original Message-
> From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 14, 2005 2:22 AM
> To: MyFaces Discussion
> Subject: Re: dataTable and commandButton question
>
> okay i solved my own problem.
>
> I didn't realize t
Can you pass the id of the selected object using the . I have never
used the params but sounds like you can do that.
As Heath posted in the mail sith subject "predifined form values"...
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("paramName");
-Srikanth
Out of curiosity, you say you are goint to make sure all access to this page
calls your init message, how are you going to do that?
-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 14, 2005 2:22 AM
To: MyFaces Discussion
Subject: Re: dataTable and
okay i solved my own problem.
I didn't realize that JSF magically retains my state even when my
managed bean is in request mode. Thanks JSF/MyFaces!
All i need to do is intialize my UIData value with a list from the
database the first time i access it.After that i update my UIData
value via the
wow, after looking at all the proposed solutions i wound up coming
back to what i was doing before. Which is exactly what Srikanth
recommended. Is there a reason why the rest of you chose such obscure
routes to the getRowData?
Also it seems that no matter what i do the UIData property that my
data
This rowData works okay, if you are using session... but there are
problems with this. Most of the time you want to query based on the ID
of your object. Not the index of the object location. If you database
changes behind the scenes and you query a list from the database, the
index may produce a d
In your backing bean, you must have access to the model (of your table ), just
call yourModel.getRowData() to get the current row's data or
yourModel.getRowIndex to the currenty row's index.
-Original Message-
From: Ray Clark [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 10
Thank you all for your help. I have plenty of ideas
now to ponder which one will fit my needs best.
Thanks a bunch :)
Ray
--- Grigoras Cristinel <[EMAIL PROTECTED]> wrote:
> Hi,
> In myfaces examples is an example about using
> x:updateActionListener, in
> dataTable.jsp,
> you can set any prop
Hi,
In myfaces examples is an example about using x:updateActionListener, in
dataTable.jsp,
you can set any property you want.
Is working for me.
Here is a small helper class I wrote to do what you are asking.
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
public class UIHelper {
public UIHelper() {
}
public static Object getReqMapObj(String obj) {
return
FacesContext.getCurrentInstance
There are a few ways to do this. The easiest is to get call:
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("var");
where "var" is the name of your datatable's variable.On Apr 6, 2005 9:45 PM, Ray Clark <[EMAIL PROTECTED]> wrote:I'm sure this must have been asked befo
13 matches
Mail list logo