Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
I haven't really used the DataModel class yet, but as described by Brendan in another thread, I have a couple of questions about the concepts behind it... First a simple example... Want to display on a page a list of employees. User should be able to click on employee and brought to an edit page

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 9:22 AMTo: MyFaces DiscussionSubject: Concerning DataModel usage plus overhead?I haven't really used the DataModel class yet, but as described by Brendan in another thread, I have a couple of questions about the concepts behind it...Fi

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Kevin Galligan
MAIL PROTECTED] *Sent:* Monday, August 29, 2005 9:22 AM *To:* MyFaces Discussion *Subject:* Concerning DataModel usage plus overhead? I haven't really used the DataModel class yet, but as described by Brendan in another thread, I have a couple of questions about the conc

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
On 8/29/05, Kevin Galligan <[EMAIL PROTECTED]> wrote:  If you use the standard dataTable, you have tokeep your values in session between the time you show the list and whenthey click on the value.  If you get the values from the db each time,you open the possibility that the index will have changed

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
scussionSubject: Re: Concerning DataModel usage plus overhead?On 8/29/05, Kevin Galligan <[EMAIL PROTECTED]> wrote:  If you use the standard dataTable, you have tokeep your values in session between the time you show the list and whenthey click on the value.  If you ge

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: Yes, you could do your own parameter passing.  It's just that JSF offers the DataModel abstraction such that, when the user clicks on your link, your program just has to ask DataModel for rowIndex to locate the row that was s

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
, August 29, 2005 2:33 PMTo: MyFaces DiscussionSubject: Re: Concerning DataModel usage plus overhead?On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: Yes, you could do your own parameter passing.  It's just that JSF offers the DataModel abstraction

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Kevin Galligan
*From:* Rick Reumann [mailto:[EMAIL PROTECTED] *Sent:* Monday, August 29, 2005 2:09 PM *To:* MyFaces Discussion *Subject:* Re: Concerning DataModel usage plus overhead? On 8/29/05, *Kevin Galligan* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: If yo

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: You set up employee to have a managed reference to employees.  Then, once control reaches Employee.edit(), its reference to employees will have been set up already by JSF. But employee has its managed bean reference to "emplo

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
: users@myfaces.apache.org Subject: Re: Concerning DataModel usage plus overhead? I tried to send this, and I think it failed. Anyway... Rick, "To me the above is just really goofy. Unless, there are security constraints to me it makes sense to get the item you want back based on some key.&

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
: Concerning DataModel usage plus overhead?On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: You set up employee to have a managed reference to employees.  Then, once control reaches Employee.edit(), its reference to employees will have been set up already

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Kevin Galligan
inal Message- From: Kevin Galligan [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 2:50 PM To: users@myfaces.apache.org Subject: Re: Concerning DataModel usage plus overhead? I tried to send this, and I think it failed. Anyway... Rick, "To me the above is just really goofy

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > > I probably just got confused by your naming convention. Can you repeat your > question with clearer names? Sure. Let me change the names and concepts.. First page you come to is a list of cars on "cars.jsp". Cars is populated

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
ay, August 29, 2005 3:23 PM To: MyFaces Discussion Subject: Re: Concerning DataModel usage plus overhead? Hmm. I could, but I'd bet it would be no different. I don't think that takes care of the fundamental problem, which is as follows... *** Get list of entries *** Date Name

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
Subject: Re: Concerning DataModel usage plus overhead? On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > > I probably just got confused by your naming convention. Can you repeat your > question with clearer names? Sure. Let me change the names and concepts..

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
AIL PROTECTED] Sent: Monday, August 29, 2005 3:23 PM To: MyFaces Discussion Subject: Re: Concerning DataModel usage plus overhead? Hmm. I could, but I'd bet it would be no different. I don't think that takes care of the fundamental problem, which is as follows... *** Get list of ent

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
ailto:[EMAIL PROTECTED] > Sent: Monday, August 29, 2005 3:24 PM > To: MyFaces Discussion > Subject: Re: Concerning DataModel usage plus overhead? > > > On 8/29/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > > > > I probably just got confused by your n

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
al Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 4:02 PM To: MyFaces Discussion Subject: Re: Concerning DataModel usage plus overhead? Actually, the MyFaces master/detail example source code is shedding some light on some things. Rather than me waste more o

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
Note that I've defined the beans to be request scope, with the expectation that your JSP will have - Brendan -Original Message- From: CONNER, BRENDAN (SBCSI) Sent: Monday, August 29, 2005 4:21 PM To: 'MyFaces Discussion' Subject: RE: Concerning DataModel usage plus ove

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Kevin Galligan
well as the detail, you'd query the database for that as well. I guess I'd have to have more information to see where the stumbling block is. Maybe I'm not having any issues with it because I'm using . - Brendan -Original Message- From: Kevin Galligan [mailto:[EMAIL

RE: Concerning DataModel usage plus overhead?

2005-08-29 Thread CONNER, BRENDAN \(SBCSI\)
o end of frustration. - Brendan -Original Message- From: Kevin Galligan [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 4:25 PM To: MyFaces Discussion Subject: Re: Concerning DataModel usage plus overhead? There's no stumbling block. I'm saying that if you'r

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread [EMAIL PROTECTED]
AIL PROTECTED] *Sent:* Monday, August 29, 2005 2:09 PM *To:* MyFaces Discussion *Subject:* Re: Concerning DataModel usage plus overhead? On 8/29/05, *Kevin Galligan* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: If you use the standard dataTable,

Re: Concerning DataModel usage plus overhead?

2005-08-29 Thread Rick Reumann
method, you'd have something like: > > public String getCar() { > Car selectedCar = (Car) > getCarListBean().getCarModel().getRowData(); > ... > } > > Hope that helps. > > - Brendan > > -----Original Message- > From: Rick Reumann [m

RE: Concerning DataModel usage plus overhead?

2005-08-30 Thread CONNER, BRENDAN \(SBCSI\)
-Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 7:43 PM To: MyFaces Discussion Subject: Re: Concerning DataModel usage plus overhead? Thanks Brendan! This below looks wonderful. At home now and no time to try it, but will tomorrow from work

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Kevin Galligan
return reportsModel; } In case anyone else is trying out the O'Reilly example, that bug can cause no end of frustration. - Brendan -Original Message- From: Kevin Galligan [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 4:25 PM To: MyFaces Discussion Subject: Re: Concer

RE: Concerning DataModel usage plus overhead?

2005-08-30 Thread CONNER, BRENDAN \(SBCSI\)
lication (that we've found, anyway!). I just wrote a note in my book so I don't repeat that error. - Brendan -Original Message- From: Kevin Galligan [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 30, 2005 11:41 AM To: MyFaces Discussion Subject: Re: Concerning DataModel usage p

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Martin Marinschek
cation (that > we've found, anyway!). I just wrote a note in my book so I don't repeat > that error. > > - Brendan > > -Original Message- > From: Kevin Galligan [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 11:41 AM > To: MyFaces Discussion > Subjec

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Kevin Galligan
reportsModel = new ListDataModel(); } reportsModel.setWrappedData(getReports()); // wrong return reportsModel; } In case anyone in the discussion group is using this example, please note that the above should be changed to: public DataModel getReportsModel() { if (reportsModel

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Rick Reumann
On 8/30/05, Martin Marinschek <[EMAIL PROTECTED]> wrote: > With this, the dataModel of the list is serialized to the client (in > the component state) and will be used for all phases on the postback > until rendering response comes into place - then the new data-model > will be fetched from the d

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Kevin Galligan
Yeah, this is what I was going on about in my post. Lots of hoops on the front end to do something that seems conceptually simple. I think updating several rows at the same time, which might require local copies of the data, and just linking are two different things. They might need two diffe

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Rick Reumann
On 8/30/05, Kevin Galligan <[EMAIL PROTECTED]> wrote: > I think updating several rows at the same time, which might require > local copies of the data, and just linking are two different things. > They might need two different components. With Struts this was a piece of cake. Your ActionForm has

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Kevin Galligan
My brain is very struts centric as well. There's some things I like about the JSF model too though. Thats why I'm probably landing somewhere in between. I generally avoided session scoping anything that didn't need to be, which I guess is my big reservation with JSF. I know exactly what you

Re: Concerning DataModel usage plus overhead?

2005-08-30 Thread Martin Marinschek
Kevin, I am trying to get Sylvain involved in this to explain forceIndexFormula better (hint: this should be in the documentation ;) - but I believe that his solution is somewhat similar to your suggestion! Particularly, you just get the id of the data row as part of the client-id in your action,

Re: Concerning DataModel usage plus overhead?

2005-08-31 Thread Sylvain Vieujot
Hello, I'm not sure I understand your problem, but I'll try to explain what I can : If your problem is that in fields in a table, only the first field is updated, then this has nothing to do with forceIndexFormula, and it might very well be a bug. I had a similar problem, but I didn't take th

Re: Concerning DataModel usage plus overhead?

2005-08-31 Thread Kevin Galligan
I'll take another look. I thought I understood how it worked, and it did funtion just adding that value, so I'm not sure its exactly the same as I've suggested. I did try to look at the code, but to be honest it was late, and my brain wasn't getting around it. I'll have to try that again. P

Re: Concerning DataModel usage plus overhead?

2005-08-31 Thread Kevin Galligan
The problem was really a question of implementation. We were talking basically about linking in JSF applications to lists from a database. The problem with the standard datatable is as follows: 1) Keep your list in the session. This makes sure that when the user clicks the link that they are