You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/02/13 01:03:23 UTC

svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces: component/html/ext/ custom/column/ custom/datalist/ custom/datascroller/ custom/date/ custom/div/ custom/fileupload/ custom/layout/ custom/navigation/ cust...

Author: lu4242
Date: Tue Feb 12 16:03:18 2008
New Revision: 627191

URL: http://svn.apache.org/viewvc?rev=627191&view=rev
Log:
public scope added to possible classes that could fail in reflection call of myfaces core

Removed:
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/column/AbstractHtmlSimpleColumn.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/stylesheet/AbstractStylesheet.java
Modified:
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputSecret.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputTextarea.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessage.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessages.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGrid.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGroup.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectBooleanCheckbox.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyCheckbox.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyListbox.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyMenu.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneListbox.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneMenu.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneRadio.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datascroller/AbstractHtmlDataScroller.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/date/AbstractHtmlInputDate.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/div/AbstractDiv.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/fileupload/AbstractHtmlInputFileUpload.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/layout/AbstractHtmlPanelLayout.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlCommandNavigation.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlPanelNavigation.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/AbstractUINavigationMenuItem.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlCommandNavigationItem.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlPanelNavigationMenu.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/newspaper/AbstractHtmlNewspaperTable.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/popup/AbstractHtmlPopup.java
    myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractUIScheduleBase.java

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputSecret.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputSecret.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputSecret.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputSecret.java Tue Feb 12 16:03:18 2008
@@ -29,7 +29,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlInputSecret
+public abstract class AbstractHtmlInputSecret
         extends javax.faces.component.html.HtmlInputSecret
         implements UserRoleAware, DisplayValueOnlyCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputTextarea.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputTextarea.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputTextarea.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputTextarea.java Tue Feb 12 16:03:18 2008
@@ -29,7 +29,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlInputTextarea
+public abstract class AbstractHtmlInputTextarea
         extends javax.faces.component.html.HtmlInputTextarea
         implements UserRoleAware, DisplayValueOnlyCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessage.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessage.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessage.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessage.java Tue Feb 12 16:03:18 2008
@@ -28,7 +28,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlMessage
+public abstract class AbstractHtmlMessage
         extends javax.faces.component.html.HtmlMessage
         implements UserRoleAware
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessages.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessages.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessages.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlMessages.java Tue Feb 12 16:03:18 2008
@@ -28,7 +28,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlMessages
+public abstract class AbstractHtmlMessages
         extends javax.faces.component.html.HtmlMessages
         implements UserRoleAware
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGrid.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGrid.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGrid.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGrid.java Tue Feb 12 16:03:18 2008
@@ -29,7 +29,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlPanelGrid
+public abstract class AbstractHtmlPanelGrid
         extends javax.faces.component.html.HtmlPanelGrid
         implements UserRoleAware, DisplayValueOnlyCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGroup.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGroup.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGroup.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlPanelGroup.java Tue Feb 12 16:03:18 2008
@@ -29,7 +29,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlPanelGroup
+public abstract class AbstractHtmlPanelGroup
         extends javax.faces.component.html.HtmlPanelGroup
         implements UserRoleAware, DisplayValueOnlyCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectBooleanCheckbox.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectBooleanCheckbox.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectBooleanCheckbox.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectBooleanCheckbox.java Tue Feb 12 16:03:18 2008
@@ -30,7 +30,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectBooleanCheckbox
+public abstract class AbstractHtmlSelectBooleanCheckbox
         extends javax.faces.component.html.HtmlSelectBooleanCheckbox
         implements UserRoleAware, DisplayValueOnlyCapable, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyCheckbox.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyCheckbox.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyCheckbox.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyCheckbox.java Tue Feb 12 16:03:18 2008
@@ -31,7 +31,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectManyCheckbox
+public abstract class AbstractHtmlSelectManyCheckbox
         extends javax.faces.component.html.HtmlSelectManyCheckbox
         implements UserRoleAware, DisplayValueOnlyCapable, ExtendedComponentBase, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyListbox.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyListbox.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyListbox.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyListbox.java Tue Feb 12 16:03:18 2008
@@ -31,7 +31,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectManyListbox
+public abstract class AbstractHtmlSelectManyListbox
         extends javax.faces.component.html.HtmlSelectManyListbox
         implements UserRoleAware, DisplayValueOnlyCapable, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyMenu.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyMenu.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyMenu.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectManyMenu.java Tue Feb 12 16:03:18 2008
@@ -31,7 +31,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectManyMenu
+public abstract class AbstractHtmlSelectManyMenu
         extends javax.faces.component.html.HtmlSelectManyMenu
         implements UserRoleAware, DisplayValueOnlyCapable, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneListbox.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneListbox.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneListbox.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneListbox.java Tue Feb 12 16:03:18 2008
@@ -31,7 +31,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectOneListbox
+public abstract class AbstractHtmlSelectOneListbox
         extends javax.faces.component.html.HtmlSelectOneListbox
         implements UserRoleAware, DisplayValueOnlyCapable, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneMenu.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneMenu.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneMenu.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneMenu.java Tue Feb 12 16:03:18 2008
@@ -31,7 +31,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectOneMenu
+public abstract class AbstractHtmlSelectOneMenu
         extends javax.faces.component.html.HtmlSelectOneMenu
         implements UserRoleAware, DisplayValueOnlyCapable, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneRadio.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneRadio.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneRadio.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlSelectOneRadio.java Tue Feb 12 16:03:18 2008
@@ -44,7 +44,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlSelectOneRadio
+public abstract class AbstractHtmlSelectOneRadio
         extends javax.faces.component.html.HtmlSelectOneRadio
         implements UserRoleAware, DisplayValueOnlyCapable, EscapeCapable
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datalist/AbstractHtmlDataList.java Tue Feb 12 16:03:18 2008
@@ -33,7 +33,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlDataList
+public abstract class AbstractHtmlDataList
         extends org.apache.myfaces.component.html.ext.HtmlDataTableHack
 {
 	private static Log log = LogFactory.getLog(HtmlDataList.class);

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datascroller/AbstractHtmlDataScroller.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datascroller/AbstractHtmlDataScroller.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datascroller/AbstractHtmlDataScroller.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/datascroller/AbstractHtmlDataScroller.java Tue Feb 12 16:03:18 2008
@@ -45,7 +45,7 @@
  * @author Thomas Spiegl (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlDataScroller extends HtmlPanelGroup implements ActionSource, StateHolder
+public abstract class AbstractHtmlDataScroller extends HtmlPanelGroup implements ActionSource, StateHolder
 {
     private static final Log log = LogFactory.getLog(HtmlDataScroller.class);
 

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/date/AbstractHtmlInputDate.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/date/AbstractHtmlInputDate.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/date/AbstractHtmlInputDate.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/date/AbstractHtmlInputDate.java Tue Feb 12 16:03:18 2008
@@ -36,7 +36,7 @@
  * @author Sylvain Vieujot (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlInputDate
+public abstract class AbstractHtmlInputDate
         extends HtmlInputText implements UserRoleAware
 {
 

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/div/AbstractDiv.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/div/AbstractDiv.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/div/AbstractDiv.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/div/AbstractDiv.java Tue Feb 12 16:03:18 2008
@@ -24,7 +24,7 @@
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractDiv
+public abstract class AbstractDiv
         extends HtmlTag
 {
 

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/fileupload/AbstractHtmlInputFileUpload.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/fileupload/AbstractHtmlInputFileUpload.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/fileupload/AbstractHtmlInputFileUpload.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/fileupload/AbstractHtmlInputFileUpload.java Tue Feb 12 16:03:18 2008
@@ -30,7 +30,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlInputFileUpload
+public abstract class AbstractHtmlInputFileUpload
         extends HtmlInputText
         implements UserRoleAware
 {

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/layout/AbstractHtmlPanelLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/layout/AbstractHtmlPanelLayout.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/layout/AbstractHtmlPanelLayout.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/layout/AbstractHtmlPanelLayout.java Tue Feb 12 16:03:18 2008
@@ -26,7 +26,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlPanelLayout extends HtmlPanelGroup
+public abstract class AbstractHtmlPanelLayout extends HtmlPanelGroup
 {
     
     private static final int DEFAULT_BORDER = Integer.MIN_VALUE;

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlCommandNavigation.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlCommandNavigation.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlCommandNavigation.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlCommandNavigation.java Tue Feb 12 16:03:18 2008
@@ -40,7 +40,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlCommandNavigation extends HtmlCommandLink
+public abstract class AbstractHtmlCommandNavigation extends HtmlCommandLink
 {
     private static final Log log = LogFactory.getLog(HtmlCommandNavigation.class);
     

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlPanelNavigation.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlPanelNavigation.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlPanelNavigation.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navigation/AbstractHtmlPanelNavigation.java Tue Feb 12 16:03:18 2008
@@ -39,7 +39,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlPanelNavigation extends HtmlPanelGroup
+public abstract class AbstractHtmlPanelNavigation extends HtmlPanelGroup
 {
  
     private static final Log log = LogFactory.getLog(HtmlPanelNavigation.class);

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/AbstractUINavigationMenuItem.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/AbstractUINavigationMenuItem.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/AbstractUINavigationMenuItem.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/AbstractUINavigationMenuItem.java Tue Feb 12 16:03:18 2008
@@ -40,7 +40,7 @@
 import org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu;
 
 
-abstract class AbstractUINavigationMenuItem extends UISelectItem implements UserRoleAware, ActionSource 
+public abstract class AbstractUINavigationMenuItem extends UISelectItem implements UserRoleAware, ActionSource 
 {
     public void addActionListener(ActionListener listener) {
         addFacesListener(listener);

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlCommandNavigationItem.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlCommandNavigationItem.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlCommandNavigationItem.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlCommandNavigationItem.java Tue Feb 12 16:03:18 2008
@@ -41,7 +41,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlCommandNavigationItem extends HtmlCommandLink
+public abstract class AbstractHtmlCommandNavigationItem extends HtmlCommandLink
 {
 
     private static final Log log = LogFactory.getLog(HtmlCommandNavigationItem.class);

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlPanelNavigationMenu.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlPanelNavigationMenu.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlPanelNavigationMenu.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/AbstractHtmlPanelNavigationMenu.java Tue Feb 12 16:03:18 2008
@@ -40,7 +40,7 @@
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlPanelNavigationMenu extends HtmlPanelGroup
+public abstract class AbstractHtmlPanelNavigationMenu extends HtmlPanelGroup
 {
  
     private static final Log log = LogFactory.getLog(HtmlPanelNavigationMenu.class);

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/newspaper/AbstractHtmlNewspaperTable.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/newspaper/AbstractHtmlNewspaperTable.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/newspaper/AbstractHtmlNewspaperTable.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/newspaper/AbstractHtmlNewspaperTable.java Tue Feb 12 16:03:18 2008
@@ -26,7 +26,7 @@
  *
  * @author <a href="mailto:jesse@odel.on.ca">Jesse Wilson</a>
  */
-abstract class AbstractHtmlNewspaperTable
+public abstract class AbstractHtmlNewspaperTable
         extends HtmlDataTable
 {
     /** the property names */

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/popup/AbstractHtmlPopup.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/popup/AbstractHtmlPopup.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/popup/AbstractHtmlPopup.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/popup/AbstractHtmlPopup.java Tue Feb 12 16:03:18 2008
@@ -27,7 +27,7 @@
  * @author Martin Marinschek (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-abstract class AbstractHtmlPopup
+public abstract class AbstractHtmlPopup
         extends UIComponentBase implements UserRoleAware
 {
     private static final String POPUP_FACET_NAME = "popup";

Modified: myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractUIScheduleBase.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractUIScheduleBase.java?rev=627191&r1=627190&r2=627191&view=diff
==============================================================================
--- myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractUIScheduleBase.java (original)
+++ myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractUIScheduleBase.java Tue Feb 12 16:03:18 2008
@@ -36,7 +36,7 @@
  * @author Jurgen Lust
  * @version $Revision$
  */
-abstract class AbstractUIScheduleBase extends UIComponentBase 
+public abstract class AbstractUIScheduleBase extends UIComponentBase 
         implements ValueHolder, Serializable
 {
     private static final long serialVersionUID = 5702081384947086911L;



Re: myfaces template structure [was: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...]

Posted by Martin Marinschek <ma...@gmail.com>.
> > The only difference the generator has to deal with is that with
> > myfaces-core the component needs to be generated and for tomahawk a
> > simple baseclass with mainly some static int-s to describe the property
> > position within the array. Means, for myfaces-core we have to deal with
> > developing with templates while for tomahawk we can move on with
> > something more comfortable.
> > One than has to extend this baseclass and put in all the getter/setter
> > to access this array list. For the first time the generator might be
> > able to generate this class to, afterwards it needs to be maintained
> > manually which is not thath much work. And the dreaded reflection bug is
> > fixed too.
>
> yes, exactly - I wanted to do something along these lines, and
> therefore I wanted the generator back in place - to easily switch over
> all components to a new state-saving mechanism. If we find out in
> playing around with different possibilities here that we do not need
> the generator at all - the better for us.

P.S.:
we will always need the generator for JSP-tags, tld's,
facelet-taglibs, faces-config metadata, etc. - but it might be ok to
derive it from the component-class in the end, then. We can discuss
this later on.

regards,

Martin

Re: myfaces template structure [was: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...]

Posted by Martin Marinschek <ma...@gmail.com>.
Hi Mario,


> The only difference the generator has to deal with is that with
> myfaces-core the component needs to be generated and for tomahawk a
> simple baseclass with mainly some static int-s to describe the property
> position within the array. Means, for myfaces-core we have to deal with
> developing with templates while for tomahawk we can move on with
> something more comfortable.
> One than has to extend this baseclass and put in all the getter/setter
> to access this array list. For the first time the generator might be
> able to generate this class to, afterwards it needs to be maintained
> manually which is not thath much work. And the dreaded reflection bug is
> fixed too.

yes, exactly - I wanted to do something along these lines, and
therefore I wanted the generator back in place - to easily switch over
all components to a new state-saving mechanism. If we find out in
playing around with different possibilities here that we do not need
the generator at all - the better for us.

regards,

Martin

Re: myfaces template structure [was: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...]

Posted by Sochor Zdeněk <zd...@ataco.cz>.
Hi,

Mario Ivankovits napsal(a):
> Hi!
>
> Being on vacation it is hard to follow the actual discussions, so, sorry
> if I missed something along the lines.
>
> While the fact that Leonardo flipped the object hierarchy can be treated
> as genious idea (kudos!), I am not fully convinced that this is what we
> want in the end.
> Please, let me elaborate about another idea.
>
> With JSF 1.2 in mind you might notice that you'll always see a
> ValueExpressionImpl (for real EL) or a ValueExpressionLiteral for ...
> what a wonder ... for literals.
> Thus, a component in an JSF 1.2+ environment will never have the member
> set to any value if not used programatically, no?
>
> If we backport this strategy to JSF 1.1 (by using something like a
> ValueBindingLiteral) we can get rid of any member on the component.
> This will fix any state saving issue as then the base class can utilize
> the HashMap where all the values are stored.
>
>   
For core components (myfaces-impl) some components' PROPERTIES are 
defined in JSF spec -> they have to
be implemented as local member/getter/setter beast.
All other ATTRIBUTES (e.g. defined by HTML renderkit, enhancements) 
could be treated just in attributes Map.
> If we salt all this with one of Simon's ideas to not to use a HashMap
> but a simple ArrayList it might be even more performant than the
> solution we use today.
> Notice, by today a JSF 1.2 component will always have to lookup a Map to
> get the value. What is normally fast enough will become a performance
> bottleneck if called multiple of hundred times. Admitted, this is not
> very common with JSF components, but, well, it might happen.
>
>   
If the basic attributes map's implementation was enhanced by using cache 
(just another inner Map, but transient)
to resolve EL just once for whole life-cycle (with needed modifications 
from update model) it would be just
overkill to use lists with specific getter/setter pairs.
> Until there it should work with myfaces-core and tomahawk.
>
> The only difference the generator has to deal with is that with
> myfaces-core the component needs to be generated and for tomahawk a
> simple baseclass with mainly some static int-s to describe the property
> position within the array. Means, for myfaces-core we have to deal with
> developing with templates while for tomahawk we can move on with
> something more comfortable.
> One than has to extend this baseclass and put in all the getter/setter
> to access this array list. For the first time the generator might be
> able to generate this class to, afterwards it needs to be maintained
> manually which is not thath much work. And the dreaded reflection bug is
> fixed too.
>
>   
Manual maintain - isn't it on the contrary to our desireed state? Not 
mentioning this approach WAS in effect in old generator.
Even if this idea makes it through, it will end the same way - 
modifications to previously generated stuff and effectivelly
abandoning just another automatic generation :(
> The result might be something like:
>
> class AbstractTreeComponent extends UIComponent
> {
>     final int FIN_VALUE=0;
>     final int FIN_COLLAPSED=1;
>
> ... something more I do not think about yet ....
> }
>
> public class TreeComponent extends AbstractTreeComponent
> {
>     public boolean getCollapsed()
>     {
>         return ComponentUtils.getBoolean(this, FIN_COLLAPSED);
>     }
>     public void setCollapsed(boolean collapsed)
>     {
>         return ComponentUtils.setBoolean(this, FIN_COLLAPSED, collapsed);
>     }
> }
>
> What might not be very transparent at the first glance is, that the
> state will shrink (!) that way. Currently you have to save the attribute
> map AND all the members mostly "null", afterwards you just have to save
> a merge of those both.
>
> With the very minor manual overhead to generate the getter/setter you
> gain a clean, well-known object hierarchy and many of the problems with
> any of the other solutions are fixed. Notice: no one will ever forget to
> implement the getter/setter as otherwise the data is not available
> within the renderer.
>
> Something critical I overlooked?
>
> Ciao,
> Mario
>
>
>   
Regards,
  Zdenek

myfaces template structure [was: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...]

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!

Being on vacation it is hard to follow the actual discussions, so, sorry
if I missed something along the lines.

While the fact that Leonardo flipped the object hierarchy can be treated
as genious idea (kudos!), I am not fully convinced that this is what we
want in the end.
Please, let me elaborate about another idea.

With JSF 1.2 in mind you might notice that you'll always see a
ValueExpressionImpl (for real EL) or a ValueExpressionLiteral for ...
what a wonder ... for literals.
Thus, a component in an JSF 1.2+ environment will never have the member
set to any value if not used programatically, no?

If we backport this strategy to JSF 1.1 (by using something like a
ValueBindingLiteral) we can get rid of any member on the component.
This will fix any state saving issue as then the base class can utilize
the HashMap where all the values are stored.

If we salt all this with one of Simon's ideas to not to use a HashMap
but a simple ArrayList it might be even more performant than the
solution we use today.
Notice, by today a JSF 1.2 component will always have to lookup a Map to
get the value. What is normally fast enough will become a performance
bottleneck if called multiple of hundred times. Admitted, this is not
very common with JSF components, but, well, it might happen.

Until there it should work with myfaces-core and tomahawk.

The only difference the generator has to deal with is that with
myfaces-core the component needs to be generated and for tomahawk a
simple baseclass with mainly some static int-s to describe the property
position within the array. Means, for myfaces-core we have to deal with
developing with templates while for tomahawk we can move on with
something more comfortable.
One than has to extend this baseclass and put in all the getter/setter
to access this array list. For the first time the generator might be
able to generate this class to, afterwards it needs to be maintained
manually which is not thath much work. And the dreaded reflection bug is
fixed too.

The result might be something like:

class AbstractTreeComponent extends UIComponent
{
    final int FIN_VALUE=0;
    final int FIN_COLLAPSED=1;

... something more I do not think about yet ....
}

public class TreeComponent extends AbstractTreeComponent
{
    public boolean getCollapsed()
    {
        return ComponentUtils.getBoolean(this, FIN_COLLAPSED);
    }
    public void setCollapsed(boolean collapsed)
    {
        return ComponentUtils.setBoolean(this, FIN_COLLAPSED, collapsed);
    }
}

What might not be very transparent at the first glance is, that the
state will shrink (!) that way. Currently you have to save the attribute
map AND all the members mostly "null", afterwards you just have to save
a merge of those both.

With the very minor manual overhead to generate the getter/setter you
gain a clean, well-known object hierarchy and many of the problems with
any of the other solutions are fixed. Notice: no one will ever forget to
implement the getter/setter as otherwise the data is not available
within the renderer.

Something critical I overlooked?

Ciao,
Mario


Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by Leonardo Uribe <lu...@gmail.com>.
Simon write
> > That does solve the problem in many cases. But it means that the
> > hand-written class can never itself define any method in the public API.
> > Any code that it implements itself will be overridden by the generated
> > class.
>
Leonardo
> No if we use component-class-excluded and use an xml to reference the
> property. That's what
> I'm doing now.
Simon

Can you please explain this further? I don't understand what you mean..

In the practice the only case that I have in tomahawk is related to t:tree2

This is the code for the workaround:

AbstractHtmlTree.java

public abstract class AbstractHtmlTree extends UITreeData
{
    /* ...................... */

    // Property: varNodeToggler
    private String _varNodeToggler;

    /**
     * Gets
     *
     * @return  the new varNodeToggler value
     */
    public String getVarNodeToggler()
    {
      return _varNodeToggler;
    }

    /**///setVarNodeToggler
    public void setVarNodeToggler(String varNodeToggler)
    {
        _varNodeToggler = varNodeToggler;

        // create a method binding for the expand control
        String bindingString = "#{" + varNodeToggler + ".toggleExpanded}";
        MethodBinding actionBinding =
FacesContext.getCurrentInstance().getApplication().createMethodBinding(bindingString,
null);
        getExpandControl().setAction(actionBinding);
    }

    /*....................*/

}


AbstractHtmlTree2.xml

<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
              xmlns:t="http://myfaces.apache.org/tomahawk"
              xmlns:xi="http://www.w3.org/2001/XInclude">
    <component>
        <!--
        <description>
            This tag renders as an HTML input element.

            Unless otherwise specified, all attributes accept static values
            or EL expressions.
        </description>
         -->

        <component-type>org.apache.myfaces.AbstractHtmlTree2
</component-type>
        <component-class>org.apache.myfaces.custom.tree2.AbstractHtmlTree
</component-class>

        <!-- inherited from superclasses: -->
        <!--   'id' is declared in
javax.faces.webapp.UIComponentClassicTagBase -->
        <!--   'binding' and 'rendered' are declared in
javax.faces.webapp.UIComponentELTag -->
        <property>
            <description></description>
            <property-name>varNodeToggler</property-name>
            <property-class>java.lang.String</property-class>
            <property-extension>
                <mfp:required>false</mfp:required>
                <mfp:literal-only>true</mfp:literal-only>
            </property-extension>
        </property>
        <property>
            <description></description>
            <property-name>clientSideToggle</property-name>
            <property-class>boolean</property-class>
            <default-value>true</default-value>
            <property-extension>
                <mfp:required>false</mfp:required>
            </property-extension>
        </property>

        <component-extension>
            <!--for the Component generation-->
            <mfp:component-family>org.apache.myfaces.HtmlTree2
</mfp:component-family>
            <mfp:component-supertype>org.apache.myfaces.Tree2
</mfp:component-supertype>
            <mfp:component-superclass>
org.apache.myfaces.custom.tree2.UITreeData</mfp:component-superclass>

<mfp:component-class-excluded>true</mfp:component-class-excluded>
        </component-extension>
    </component>
</faces-config>

In other words. For define this component I use the following files

AbstractHtmlTree  //hand written base class
HtmlTree              //generated class

AbstractHtmlTree2.xml // Define properties to be included on faces-config
and tld
HtmlTree2.xml             // Define the generated class properties and all
stuff (his component type extends from
org.apache.myfaces.AbstractHtmlTree2instead UITreeData).

Now I remember why at start I do hand written on top and generated on
bottom. If you do generated on top, you need
to define 2 xml files (one for the generation and one for the real
component). But we could add properties to myfaces-faces plugin to do this
in one only file.

regards

Leonardo Uribe

Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

And can you please comment on this issue raised in the earlier email?

On the email of CodeGeneration?

One fast example is this. Please pay attention on the yellow marks:

abstract class AbstractBuffer extends UIComponentBase
{

    protected abstract String getLocalInto();

    public abstract void setInto(String into);

    void fill(String content, FacesContext facesContext){
        ValueExpression intoVB;

        if (getLocalInto() == null) {
            intoVB = getValueExpression("into");
            setInto(intoVB.getExpressionString());
        } else {
            intoVB = facesContext.getApplication().
            getExpressionFactory().createValueExpression(
                    facesContext.getELContext(), getLocalInto(),
Object.class );
        }

        intoVB.setValue(facesContext.getELContext(), content);
    }
}

public class Buffer extends AbstractBuffer
{

  static public final String COMPONENT_FAMILY =
    "javax.faces.Data";
  static public final String COMPONENT_TYPE =
    "org.apache.myfaces.Buffer";

  /**
   * Construct an instance of the Buffer.
   */
  public Buffer()
  {
    setRendererType("org.apache.myfaces.Buffer");
  }

  // Property: into
  private String _into;

  final protected String getLocalInto()
  {
    return _into;
  }

  /**
   * Gets EL variable for save the components output inside this component
   * <p>
   * This is a required property on the component.
   * </p>
   *
   * @return  the new into value
   */
  public String getInto()
  {
    if (_into != null)
    {
      return _into;
    }
    ValueExpression expression = getValueExpression("into");
    if (expression != null)
    {
      return (String)expression.getValue(getFacesContext().getELContext());
    }
    return null;
  }

  /**
   * Sets EL variable for save the components output inside this component
   * <p>
   * This is a required property on the component.
   *
   * @param into  the new into value
   */
  public void setInto(String into)
  {
    this._into = into;
  }

  @Override
  public Object saveState(FacesContext facesContext)
  {
    Object[] values = new Object[2];
    values[0] = super.saveState(facesContext);
    values[1] = _into;

    return values;
  }

  @Override
  public void restoreState(FacesContext facesContext, Object state)
  {
    Object[] values = (Object[])state;
    super.restoreState(facesContext,values[0]);
    _into = (String)values[1];
  }

  @Override
  public String getFamily()
  {
    return COMPONENT_FAMILY;
  }
}

For one side, I use the generator to create a protected final method to
access the local or inner value. And I make the method available through
abstract methods, defined on the hand written class. The property is defined
on generated class, so reflection code not fail if the base class is package
scope.

regards

Leonardo Uribe

Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Hi Leonardo,

Leonardo Uribe schrieb:
> >So to work around the "cannot use reflection on package-scoped class"
> >problem we discussed earlier, you are proposing to make the hand-written
> >class package-scoped, and generate a public concrete class?
>
> Yes. In many cases all properties are defined on the generated class, so
> for this cases we can put package-scope to the hand written class.
>
>
> >That does solve the problem in many cases. But it means that the
> >hand-written class can never itself define any method in the public API.
> >Any code that it implements itself will be overridden by the generated
> >class.
>
> The solution is create abstract methods to get or set  the values. The
> test does not show
> problems using this approach (using reflection to set or get values).
> I'm not tested this
> fully with tomahawk and myfaces, so I will test it and see what
> happens (I don't believe
> that we have problems, since testing this does not show errors)
What does "create abstract methods" mean?

>
> The fact is that if we put the generated class on top we should make
> this class public.
> So if we continue this approach we have to put all generated classes
> public.
>
> Putting the hand written class on top allow us to set this class
> package scope, and let
> the few cases with problems public.
>
>
> > That does solve the problem in many cases. But it means that the
> > hand-written class can never itself define any method in the public API.
> > Any code that it implements itself will be overridden by the generated
> > class.
>
> No if we use component-class-excluded and use an xml to reference the
> property. That's what
> I'm doing now.

Can you please explain this further? I don't understand what you mean..

And can you please comment on this issue raised in the earlier email?

>>However the hand-written code can never reference any of the generated
methods, except by
>> (ecch) downcasting the "this" pointer! And code on the parent for
method foo() cannot fall
>> back to the default implementation via super.foo(). Aren't these
issues a problem?



Regards,
Simon



Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by Martin Marinschek <ma...@gmail.com>.
Leonardo has been very creative here, and I like the approach.

Applause!

regards,

Martin

On Feb 14, 2008 1:59 AM, Leonardo Uribe <lu...@gmail.com> wrote:
> Hi
>
>
> So to work around the "cannot use reflection on package-scoped class"
> problem we discussed earlier, you are proposing to make the hand-written
>  class package-scoped, and generate a public concrete class?
>
> Yes. In many cases all properties are defined on the generated class, so
> for this cases we can put package-scope to the hand written class.
>
>
> That does solve the problem in many cases. But it means that the
>  hand-written class can never itself define any method in the public API.
> Any code that it implements itself will be overridden by the generated
> class.
>
> The solution is create abstract methods to get or set  the values. The test
> does not show
>  problems using this approach (using reflection to set or get values). I'm
> not tested this
> fully with tomahawk and myfaces, so I will test it and see what happens (I
> don't believe
> that we have problems, since testing this does not show errors)
>
> The fact is that if we put the generated class on top we should make this
> class public.
> So if we continue this approach we have to put all generated classes public.
>
> Putting the hand written class on top allow us to set this class package
> scope, and let
>  the few cases with problems public.
>
>
> That does solve the problem in many cases. But it means that the
> hand-written class can never itself define any method in the public API.
> Any code that it implements itself will be overridden by the generated
>  class.
>
> No if we use component-class-excluded and use an xml to reference the
> property. That's what
> I'm doing now.
>
> Any suggestions are welcome.
>
> regards
>
> Leonardo Uribe
>
>
>



-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

So to work around the "cannot use reflection on package-scoped class"
problem we discussed earlier, you are proposing to make the hand-written
class package-scoped, and generate a public concrete class?

Yes. In many cases all properties are defined on the generated class, so
for this cases we can put package-scope to the hand written class.

That does solve the problem in many cases. But it means that the
hand-written class can never itself define any method in the public API.
Any code that it implements itself will be overridden by the generated
class.

The solution is create abstract methods to get or set  the values. The test
does not show
problems using this approach (using reflection to set or get values). I'm
not tested this
fully with tomahawk and myfaces, so I will test it and see what happens (I
don't believe
that we have problems, since testing this does not show errors)

The fact is that if we put the generated class on top we should make this
class public.
So if we continue this approach we have to put all generated classes public.

Putting the hand written class on top allow us to set this class package
scope, and let
the few cases with problems public.

That does solve the problem in many cases. But it means that the
hand-written class can never itself define any method in the public API.
Any code that it implements itself will be overridden by the generated
class.

No if we use component-class-excluded and use an xml to reference the
property. That's what
I'm doing now.

Any suggestions are welcome.

regards

Leonardo Uribe

Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by simon <si...@chello.at>.
On Wed, 2008-02-13 at 17:09 -0300, Leonardo Uribe wrote:
> Hi
>  
> The problem is if the parent class is generated and has package scope,
> the code that call the setter (setValueExpression) fails. If the
> parent class is generated, this class should be public.

So to work around the "cannot use reflection on package-scoped class"
problem we discussed earlier, you are proposing to make the hand-written
class package-scoped, and generate a public concrete class?

That does solve the problem in many cases. But it means that the
hand-written class can never itself define any method in the public API.
Any code that it implements itself will be overridden by the generated
class.

Or do you look for hand-written methods on the parent and generate a
public method on the concrete class that simply delegates up to the
"real" implementation? Hmm..yes, that looks like it might solve the
reflection issue. It is still impossible to reflectively inspect the
parent class then call methods on it but for any given method name,
there is no implementation on the parent that will not first match a
method on the child.

However the hand-written code can never reference any of the generated
methods, except by (ecch) downcasting the "this" pointer! And code on
the parent for method foo() cannot fall back to the default
implementation via super.foo(). Aren't these issues a problem?

Regards,
Simon


Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

The problem is if the parent class is generated and has package scope, the
code that call the setter (setValueExpression) fails. If the parent class is
generated, this class should be public.
regards

Leonardo Uribe

Re: svn commit: r627191 - in /myfaces/tomahawk/branches/1_2_0/core/src/main/java/...

Posted by simon <si...@chello.at>.
On Wed, 2008-02-13 at 00:03 +0000, lu4242@apache.org wrote:
> Author: lu4242
> Date: Tue Feb 12 16:03:18 2008
> New Revision: 627191
> 
> URL: http://svn.apache.org/viewvc?rev=627191&view=rev
> Log:
> public scope added to possible classes that could fail in reflection call of myfaces core

> Removed:
>     myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/column/AbstractHtmlSimpleColumn.java
>     myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/custom/stylesheet/AbstractStylesheet.java
> Modified:
>     myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputSecret.java
>     myfaces/tomahawk/branches/1_2_0/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputTextarea.java

I'm confused.

I thought the idea was that the concrete classes would be hand-written,
and their parent class would be generated ("generation gap" pattern).

But I've tried out the 1_2_0 stuff, and it seems the other way around:
the parent class is hand-written, and the concrete class is
auto-generated. Is this right?

Regards,

Simon