Return-Path: X-Original-To: apmail-pivot-dev-archive@www.apache.org Delivered-To: apmail-pivot-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BC2B90A9 for ; Mon, 14 Nov 2011 15:58:15 +0000 (UTC) Received: (qmail 79566 invoked by uid 500); 14 Nov 2011 15:58:15 -0000 Delivered-To: apmail-pivot-dev-archive@pivot.apache.org Received: (qmail 79545 invoked by uid 500); 14 Nov 2011 15:58:15 -0000 Mailing-List: contact dev-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pivot.apache.org Delivered-To: mailing list dev@pivot.apache.org Received: (qmail 79537 invoked by uid 99); 14 Nov 2011 15:58:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2011 15:58:15 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2011 15:58:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F1F265940F for ; Mon, 14 Nov 2011 15:57:51 +0000 (UTC) Date: Mon, 14 Nov 2011 15:57:51 +0000 (UTC) From: "Noel Grandin (Resolved) (JIRA)" To: dev@pivot.apache.org Message-ID: <893712795.26992.1321286271999.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <869009191.45876.1320158612323.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (PIVOT-813) BXML annotation should work for JavaBean properties MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PIVOT-813?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Noel Grandin resolved PIVOT-813. -------------------------------- Resolution: Fixed Tested using Sandro's code and launch files, and as far as I can tell this = is fixed. Please re-open with additional test cases if there is still a problem. =20 > BXML annotation should work for JavaBean properties > --------------------------------------------------- > > Key: PIVOT-813 > URL: https://issues.apache.org/jira/browse/PIVOT-813 > Project: Pivot > Issue Type: Improvement > Components: core-beans > Affects Versions: 2.0 > Reporter: Piotr Ko=C5=82aczkowski > Assignee: Sandro Martini > Labels: BXML, BXMLSerializer, access, annotation, field, pro= perty > Fix For: 2.0.1 > > Attachments: custom_panel.bxml.launch, pivot_813 - Applet.launch > > > Consider the following code: > public class MyComponent extends Panel implements Bindable { > @BXML > private String field; > public void setField(String field) {=20 > this.field =3D field; > }=20 > public String getField() { > return field; > } =20 > // ... > } > Current behaviour: the BXML serializer attempts to set the private field = directly, bypassing the public setter. This causes an exception, if the app= lication runs as untrusted code, e.g. as an unsigned applet, because privat= e field access is restricted. > Desired behaviour: call the public setter if it exists, and fall back to = setting the private field directly only if the setter hasn't been defined. = This would be also consistent with other frameworks such as Hibernate or Sp= ring, which use setters and getters to set and get property values. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira