Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB92E3742 for ; Thu, 28 Apr 2011 12:37:49 +0000 (UTC) Received: (qmail 27409 invoked by uid 500); 28 Apr 2011 12:37:48 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 27367 invoked by uid 500); 28 Apr 2011 12:37:48 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 27359 invoked by uid 99); 28 Apr 2011 12:37:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2011 12:37:48 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of SRS0=o9lAWD=XU=gp-informatics.com=crocchio@yourhostingaccount.com designates 65.254.253.44 as permitted sender) Received: from [65.254.253.44] (HELO mailout05.yourhostingaccount.com) (65.254.253.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2011 12:37:42 +0000 Received: from mailscan12.yourhostingaccount.com ([10.1.15.12] helo=mailscan12.yourhostingaccount.com) by mailout05.yourhostingaccount.com with esmtp (Exim) id 1QFQTB-0008I9-5P for users@myfaces.apache.org; Thu, 28 Apr 2011 08:37:21 -0400 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan12.yourhostingaccount.com with esmtp (Exim) id 1QFQTB-0003zV-Cn for users@myfaces.apache.org; Thu, 28 Apr 2011 08:37:21 -0400 Received: from authsmtp05.yourhostingaccount.com ([10.1.18.5]) by impout02.yourhostingaccount.com with NO UCE id d0d81g00C06ZpSa0000000; Thu, 28 Apr 2011 08:37:09 -0400 X-EN-OrigOutIP: 10.1.18.5 X-EN-IMPSID: d0d81g00C06ZpSa0000000 Received: from c-65-96-207-19.hsd1.ma.comcast.net ([65.96.207.19] helo=D9JVF5K1) by authsmtp05.yourhostingaccount.com with esmtpa (Exim) id 1QFQSz-0000Kj-8l for users@myfaces.apache.org; Thu, 28 Apr 2011 08:37:09 -0400 Reply-To: From: "Catherine Rocchio" To: "'MyFaces Discussion'" References: <051501cc0440$31ff8870$95fe9950$@net> In-Reply-To: Subject: RE: Do Trinidad Tables update with new rows in PartialSubmit if a CommandButton outside table does the adding of rows? Date: Thu, 28 Apr 2011 08:37:12 -0400 Organization: GP Informatics Message-ID: <06fe01cc05a1$0070fca0$0152f5e0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcwFk9PhrC6g6R0SRc661h47ZT65wAAC03ZQ Content-Language: en-us X-EN-UserInfo: 7f90b48b50e620e2a2aa698f0a5ec9ef:0edd492c4f9bc68b775191025082a6f6 X-EN-AuthUser: crocchio@gp-informatics.com Sender: "Catherine Rocchio" X-EN-OrigIP: 65.96.207.19 X-EN-OrigHost: c-65-96-207-19.hsd1.ma.comcast.net X-Virus-Checked: Checked by ClamAV on apache.org Hi there, Thanks for writing back - both you and Sandeep. First off - I do believe the partial trigger is being found - because if = I use the notation "triggername" - I get a warning that I am using = deprecated syntax - (I am using Myfaces 2.0, Trinidad 2.0) - but it is = only a WARNING. I also get "Trigger not found" if I use something wrong = like ::::triggername. But.. I get no warnings with "::triggername" - = but in all of the combinations I have used, I haven't gotten the table = to update. My wprolelist is a vector - and is Session scoped I believe. I have tried going after this programmatically - binding the table = object (I THINK!).. and having this code: public void addAction(ActionEvent event) { =09 wprolelist.add(new RoleList("test person", "True", "True", "True")); UIXTable table =3D getTable(); RequestContext.getCurrentInstance().addPartialTarget(table); RequestContext.getCurrentInstance().partialUpdateNotify(table); FacesContext.getCurrentInstance().renderResponse(); =09 }=20 public void setTable(UIXTable table) { _table =3D table; } public UIXTable getTable() { return _table; } private UIXTable _table; =20 But it hasn't worked either. I can try the hack you mentioned Walter - = and part of me wonders if I somehow need to be updating a different = layer? I know that Trinidad tables use a model - and maybe somehow I am = just updating the raw data behind the model - but - to get a PPR/AJAX = type update - I have to poke the MODEL itself? =20 Anyway.. I am still working on it. Latest page snippet is this: 1. TABLEDEF (I hope I am doing this binding right...) 3. Latest addAction is above...=20 Status: No errors that I can see - but still the add button does = nothing :)... though when I do a full page refresh, of course things are = fine because my vector gets updated... 4. Oh.. and I am using a session page - @SessionScoped in the beginning = of the Java. Thanks for any hints...I am willing to believe that the table needs to = be nudged to update programmatically, because the Trinidad documentation = DOES say that if you are trying to do a PPR update of a table row from = any place OTHER than "that row" (i.e. not calling something while IN = that row) - you need to force the update programmatically. BUT.. I = would imagine that this should work - people must have inline tables = that need to get updated without a full page update. It must just be me!!! THANKS! Catherine -----Original Message----- From: Walter Mour=C3=A3o [mailto:walter.mourao@gmail.com]=20 Sent: Thursday, April 28, 2011 7:02 AM To: MyFaces Discussion Subject: Re: Do Trinidad Tables update with new rows in PartialSubmit if = a CommandButton outside table does the adding of rows? It should work but... I had some issues regarding the table updates. What is the scope of 'wprolelist' ? In some cases I had to use the following method to 'force' the update, = since the value attribute hasn't changed really changed (the list continues = the same). private void updateTableValue(RequestContext requestContext, = UIComponent viewRoot, String id, Object value) { UIComponent component =3D ComponentUtils.findRelativeComponent(viewRoot, id); if(component instanceof UIXIterator)//just in case the view was changed { ((UIXIterator) component).setValue(value); } } But I think it is a hack... :-) Cheers, Walter Mour=C3=A3o http://waltermourao.com.br http://arcadian.com.br http://oriens.com.br On Tue, Apr 26, 2011 at 3:31 PM, Catherine Rocchio = wrote: > Hi there, > > > > I am trying to achieve a Partial Submit update of a Trinidad Table = upon > submit of a Command Button (called "Add Row"). The bean behind the = table > is > definitely getting updated because when I do an overall page refresh, = I see > my new rows getting added - but I can't seem to get the table to = refresh on > its own with the partialTriggers on it. > > > > So.. I guess my question is - should something like this work? Or.. = do > tables need to be programmatically poked for partial submits? This = seems > pretty basic - but - it just isn't working for me. I guess I will = feel > better if I know it SHOULD work - and I will keep trying. > > > > I am using Trinidad 2 and Myfaces 2. > > > > Sorry!!!! > > > > Thanks for help! > > Catherine > > > > actionListener=3D"#{createworkplan.addAction}" /> > > > > My addAction is just boring - but adds a row to a vector which is = behind > the > table. > > > > public void addAction(ActionEvent event) { > > > > wprolelist.add(new RoleList("test person", "True", > "True", "True")); > > } > > > > And my table has the specification of the partialTrigger. > > value=3D"#{createworkplan.wprolelist}" var=3D"row" width =3D "800" > > styleClass=3D"order-table" > > partialTriggers=3D"::test" > > headerClass=3D"order-table-header" > > rowClasses=3D"order-table-odd-row,order-table-even-row" > > > > > > > > > > >