Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 36148 invoked from network); 7 Oct 2008 16:43:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Oct 2008 16:43:11 -0000 Received: (qmail 512 invoked by uid 500); 7 Oct 2008 16:43:08 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 404 invoked by uid 500); 7 Oct 2008 16:43:08 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Delivered-To: moderator for dev@myfaces.apache.org Received: (qmail 6816 invoked by uid 99); 6 Oct 2008 21:41:21 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=0 a=BuUrCKgfRM9xUfWwhFQA:9 a=Yl6YCr2hijne4MpMJRcA:7 a=w6lCtOWqvHnUYVlZ-HIK0BiMzyUA:4 a=I3XyG3QmDN0A:10 a=W47fGdt9H_gA:10 Message-ID: <48EA8596.8020507@mayet.ca> Date: Mon, 06 Oct 2008 16:39:34 -0500 From: Shane Petroff User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: dev@myfaces.apache.org Subject: Re: [jira] Commented: (TRINIDAD-1226) CoreShowDetails doesn't function when created programatically References: <1645726033.1221233384303.JavaMail.jira@brutus> <48CA96B9.7070006@mayet.ca> In-Reply-To: <48CA96B9.7070006@mayet.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080630-1, 06/30/2008), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Shane Petroff wrote: > Andrew Robinson (JIRA) wrote: >> You are clearing the children component on every single get call. > Every _set_, but regardless, I have to take a look to make sure I > haven't gotten my example out of synch with the real code. Did the explanation below make sense to anyone? Given the choice of generating a single page via java code which is then re-built for each submission, vs 1K+ very similar pages vs 100+ large pages making judicious use of the rendered property, I chose the first option. The 2 use cases also driving this decision were the need to navigate essentially randomly through the various details and the need to alter page contents without developer or designer intervention. > That said, I do need to rebuild the entire page after submission > (hence the getChildren().clear()). This is a 'detail' page whose > content is not know at design time. There are thousands of possible > combinations of components which make up this page, and those > combinations change from time to time, so it is not reasonable to > develop a normal page per combination. As a user iterates through > objects (examining their details) the same page is reconstructed based > on metadata describing the particular instance they happen to be > looking at. User instances which are adjacent in the list which is > being traversed, can have radically different profiles, so I just > reconstruct the page. > >> I would suggest that you try to alter your code to make sure the >> component is only created once (use an attribute on the parent >> component). > > I want to recreate components once per submission in this case. I realize that this isn't a 'normal' approach, but I'm not sure how else I could have structured things. The only thing that seems to be 'required' (found through experimentation, not spec) is that component id's need to be allocated in a deterministic way. The show detail seems not to like id's 'duplicated' in distinct naming containers, but it too behaves when names are deterministic and consistent. Am I going to be in trouble in the future with this approach? -- Shane