You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeff Keene (JIRA)" <my...@incubator.apache.org> on 2005/05/27 05:34:52 UTC

[jira] Created: (MYFACES-258) build/codegen ant generate-all-components-components fails FileNotFoundException

build/codegen ant generate-all-components-components fails FileNotFoundException
--------------------------------------------------------------------------------

         Key: MYFACES-258
         URL: http://issues.apache.org/jira/browse/MYFACES-258
     Project: MyFaces
        Type: Bug
    Versions: Nightly Build    
 Environment: WinXP, JDK 1.4.2_08, Ant 1.6.4
    Reporter: Jeff Keene
    Priority: Minor


Trying to build from sources, generating components was failing on FileNotFoundException when using the generate-all-components-components target.  Also failed on any of the targets in build/codegen/build.xml where multiple includes were selected.  Adjusted logic in ComponentGeneratorTask, patch appended.  Reran, found some code duplication post generation in HtmlDataTable and HtmlInputTextarea, patches appended.

-------------------------------

Index: ComponentGeneratorTask.java
===================================================================
--- ComponentGeneratorTask.java	(revision 178731)
+++ ComponentGeneratorTask.java	(working copy)
@@ -86,25 +86,20 @@
 
         ComponentGenerator generator = new ComponentGenerator(_destdir, _velocityLoaderPath);
 
-        if(_includes==null)
+        DirectoryScanner ds = getDirectoryScanner(_basedir);
+        if (_includes != null)
         {
-            DirectoryScanner ds = getDirectoryScanner(_basedir);
-            ds.scan();
-
-            String[] files = ds.getIncludedFiles();
-            for (int i = 0; i < files.length; i++)
-            {
-                String xmlFileName = files[i];
-                log.info("on xmlFileName : "+files[i]);
-                generator.generate(new File(_basedir, xmlFileName));
-            }
+            ds.setIncludes(_includes.split(","));
         }
-        else
-        {
-            //_includes = _includes.replace('/','\\');
 
-            log.info("on xmlFileName : "+_basedir+"/"+_includes);
-            generator.generate(new File(_basedir, _includes));
+        ds.scan();
+
+        String[] files = ds.getIncludedFiles();
+        for (int i = 0; i < files.length; i++)
+        {
+            String xmlFileName = files[i];
+            log.info("on xmlFileName : "+files[i]);
+            generator.generate(new File(_basedir, xmlFileName));
         }
     }
 



Index: HtmlDataTable.java
===================================================================
--- HtmlDataTable.java	(revision 178731)
+++ HtmlDataTable.java	(working copy)
@@ -61,8 +61,6 @@
 
     private String _sortColumn = null;
     private Boolean _sortAscending = null;
-    private String _rowOnMouseOver = null;
-    private String _rowOnMouseOut = null;
 
     public void setValue(Object value)
     {
@@ -659,51 +657,11 @@
         return v != null ? v.booleanValue() : DEFAULT_SORTASCENDING;
     }
 
-    public void setRowOnMouseOver(String rowOnMouseOver)
-    {
-        _rowOnMouseOver = rowOnMouseOver;
-        // update model is necessary here, because processUpdates is never called
-        // reason: HtmlCommandSortHeader.isImmediate() == true
-        ValueBinding vb = getValueBinding("rowOnMouseOver");
-        if (vb != null)
-        {
-            vb.setValue(getFacesContext(), _rowOnMouseOver);
-            _rowOnMouseOver = null;
-        }
-    }
-
-    public String getRowOnMouseOver()
-    {
-        if (_rowOnMouseOver != null) return _rowOnMouseOver;
-        ValueBinding vb = getValueBinding("rowOnMouseOver");
-        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
-    }
-
-    public void setRowOnMouseOut(String rowOnMouseOut)
-    {
-        _rowOnMouseOut = rowOnMouseOut;
-        // update model is necessary here, because processUpdates is never called
-        // reason: HtmlCommandSortHeader.isImmediate() == true
-        ValueBinding vb = getValueBinding("rowOnMouseOut");
-        if (vb != null)
-        {
-            vb.setValue(getFacesContext(), _rowOnMouseOut);
-            _rowOnMouseOut = null;
-        }
-    }
-
-    public String getRowOnMouseOut()
-    {
-        if (_rowOnMouseOut != null) return _rowOnMouseOut;
-        ValueBinding vb = getValueBinding("rowOnMouseOut");
-        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
-    }
-
     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
 
     public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlDataTable";
     private static final boolean DEFAULT_PRESERVEDATAMODEL = false;
-    private static final boolean DEFAULT_PRESERVESORT = true;
+    private static final boolean DEFAULT_PRESERVESORT = false;
     private static final boolean DEFAULT_RENDEREDIFEMPTY = true;
 
     private Boolean _preserveDataModel = null;
@@ -714,6 +672,8 @@
     private String _rowIndexVar = null;
     private String _rowCountVar = null;
     private String _previousRowDataVar = null;
+    private String _rowOnMouseOver = null;
+    private String _rowOnMouseOut = null;
 
     public HtmlDataTable()
     {
@@ -733,6 +693,15 @@
         return v != null ? v.booleanValue() : DEFAULT_PRESERVEDATAMODEL;
     }
 
+
+    public boolean isSetPreserveDataModel()
+    {
+        if (_preserveDataModel != null) return true;
+        ValueBinding vb = getValueBinding("preserveDataModel");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null;
+    }
+
     public void setPreserveSort(boolean preserveSort)
     {
         _preserveSort = Boolean.valueOf(preserveSort);
@@ -746,6 +715,15 @@
         return v != null ? v.booleanValue() : DEFAULT_PRESERVESORT;
     }
 
+
+    public boolean isSetPreserveSort()
+    {
+        if (_preserveSort != null) return true;
+        ValueBinding vb = getValueBinding("preserveSort");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null;
+    }
+
     public void setEnabledOnUserRole(String enabledOnUserRole)
     {
         _enabledOnUserRole = enabledOnUserRole;
@@ -783,6 +761,15 @@
         return v != null ? v.booleanValue() : DEFAULT_RENDEREDIFEMPTY;
     }
 
+
+    public boolean isSetRenderedIfEmpty()
+    {
+        if (_renderedIfEmpty != null) return true;
+        ValueBinding vb = getValueBinding("renderedIfEmpty");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null;
+    }
+
     public void setRowIndexVar(String rowIndexVar)
     {
         _rowIndexVar = rowIndexVar;
@@ -819,7 +806,31 @@
         return vb != null ? (String)vb.getValue(getFacesContext()) : null;
     }
 
+    public void setRowOnMouseOver(String rowOnMouseOver)
+    {
+        _rowOnMouseOver = rowOnMouseOver;
+    }
 
+    public String getRowOnMouseOver()
+    {
+        if (_rowOnMouseOver != null) return _rowOnMouseOver;
+        ValueBinding vb = getValueBinding("rowOnMouseOver");
+        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
+    }
 
+    public void setRowOnMouseOut(String rowOnMouseOut)
+    {
+        _rowOnMouseOut = rowOnMouseOut;
+    }
+
+    public String getRowOnMouseOut()
+    {
+        if (_rowOnMouseOut != null) return _rowOnMouseOut;
+        ValueBinding vb = getValueBinding("rowOnMouseOut");
+        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
+    }
+
+
+
     //------------------ GENERATED CODE END ---------------------------------------
 }



Index: HtmlInputTextarea.java
===================================================================
--- HtmlInputTextarea.java	(revision 178731)
+++ HtmlInputTextarea.java	(working copy)
@@ -51,8 +51,8 @@
     private String _enabledOnUserRole = null;
     private String _visibleOnUserRole = null;
     private Boolean _displayValueOnly = null;
-	private String _displayValueOnlyStyle = null;
-	private String _displayValueOnlyStyleClass = null;
+    private String _displayValueOnlyStyle = null;
+    private String _displayValueOnlyStyleClass = null;
 
     public HtmlInputTextarea()
     {
@@ -83,7 +83,6 @@
         return vb != null ? (String)vb.getValue(getFacesContext()) : null;
     }
 
-
     public boolean isRendered()
     {
         if (!UserRoleUtils.isVisibleOnUserRole(this)) return false;


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-258) build/codegen ant generate-all-components-components fails FileNotFoundException

Posted by "sean schofield (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-258?page=comments#action_66454 ]
     
sean schofield commented on MYFACES-258:
----------------------------------------

I still must confess I do not understand why we need the source code generator.  Maybe the MyFaces veterans can explain this to me?  My thinking was that this helped to generate a lot of the duplicate source code between components back when that source code did not yet exist.  Do we still need it.

Also, please make sure that the setRowOnMouseOver methods, etc. don't ultimately disappear from HtmlDataTable as a result of the fix.  It looks like its being replaced with a auto generated version but I can't understand the advantage of doing it that way.

> build/codegen ant generate-all-components-components fails FileNotFoundException
> --------------------------------------------------------------------------------
>
>          Key: MYFACES-258
>          URL: http://issues.apache.org/jira/browse/MYFACES-258
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>  Environment: WinXP, JDK 1.4.2_08, Ant 1.6.4
>     Reporter: Jeff Keene
>     Priority: Minor

>
> Trying to build from sources, generating components was failing on FileNotFoundException when using the generate-all-components-components target.  Also failed on any of the targets in build/codegen/build.xml where multiple includes were selected.  Adjusted logic in ComponentGeneratorTask, patch appended.  Reran, found some code duplication post generation in HtmlDataTable and HtmlInputTextarea, patches appended.
> -------------------------------
> Index: ComponentGeneratorTask.java
> ===================================================================
> --- ComponentGeneratorTask.java	(revision 178731)
> +++ ComponentGeneratorTask.java	(working copy)
> @@ -86,25 +86,20 @@
>  
>          ComponentGenerator generator = new ComponentGenerator(_destdir, _velocityLoaderPath);
>  
> -        if(_includes==null)
> +        DirectoryScanner ds = getDirectoryScanner(_basedir);
> +        if (_includes != null)
>          {
> -            DirectoryScanner ds = getDirectoryScanner(_basedir);
> -            ds.scan();
> -
> -            String[] files = ds.getIncludedFiles();
> -            for (int i = 0; i < files.length; i++)
> -            {
> -                String xmlFileName = files[i];
> -                log.info("on xmlFileName : "+files[i]);
> -                generator.generate(new File(_basedir, xmlFileName));
> -            }
> +            ds.setIncludes(_includes.split(","));
>          }
> -        else
> -        {
> -            //_includes = _includes.replace('/','\\');
>  
> -            log.info("on xmlFileName : "+_basedir+"/"+_includes);
> -            generator.generate(new File(_basedir, _includes));
> +        ds.scan();
> +
> +        String[] files = ds.getIncludedFiles();
> +        for (int i = 0; i < files.length; i++)
> +        {
> +            String xmlFileName = files[i];
> +            log.info("on xmlFileName : "+files[i]);
> +            generator.generate(new File(_basedir, xmlFileName));
>          }
>      }
>  
> Index: HtmlDataTable.java
> ===================================================================
> --- HtmlDataTable.java	(revision 178731)
> +++ HtmlDataTable.java	(working copy)
> @@ -61,8 +61,6 @@
>  
>      private String _sortColumn = null;
>      private Boolean _sortAscending = null;
> -    private String _rowOnMouseOver = null;
> -    private String _rowOnMouseOut = null;
>  
>      public void setValue(Object value)
>      {
> @@ -659,51 +657,11 @@
>          return v != null ? v.booleanValue() : DEFAULT_SORTASCENDING;
>      }
>  
> -    public void setRowOnMouseOver(String rowOnMouseOver)
> -    {
> -        _rowOnMouseOver = rowOnMouseOver;
> -        // update model is necessary here, because processUpdates is never called
> -        // reason: HtmlCommandSortHeader.isImmediate() == true
> -        ValueBinding vb = getValueBinding("rowOnMouseOver");
> -        if (vb != null)
> -        {
> -            vb.setValue(getFacesContext(), _rowOnMouseOver);
> -            _rowOnMouseOver = null;
> -        }
> -    }
> -
> -    public String getRowOnMouseOver()
> -    {
> -        if (_rowOnMouseOver != null) return _rowOnMouseOver;
> -        ValueBinding vb = getValueBinding("rowOnMouseOver");
> -        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> -    }
> -
> -    public void setRowOnMouseOut(String rowOnMouseOut)
> -    {
> -        _rowOnMouseOut = rowOnMouseOut;
> -        // update model is necessary here, because processUpdates is never called
> -        // reason: HtmlCommandSortHeader.isImmediate() == true
> -        ValueBinding vb = getValueBinding("rowOnMouseOut");
> -        if (vb != null)
> -        {
> -            vb.setValue(getFacesContext(), _rowOnMouseOut);
> -            _rowOnMouseOut = null;
> -        }
> -    }
> -
> -    public String getRowOnMouseOut()
> -    {
> -        if (_rowOnMouseOut != null) return _rowOnMouseOut;
> -        ValueBinding vb = getValueBinding("rowOnMouseOut");
> -        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> -    }
> -
>      //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
>  
>      public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlDataTable";
>      private static final boolean DEFAULT_PRESERVEDATAMODEL = false;
> -    private static final boolean DEFAULT_PRESERVESORT = true;
> +    private static final boolean DEFAULT_PRESERVESORT = false;
>      private static final boolean DEFAULT_RENDEREDIFEMPTY = true;
>  
>      private Boolean _preserveDataModel = null;
> @@ -714,6 +672,8 @@
>      private String _rowIndexVar = null;
>      private String _rowCountVar = null;
>      private String _previousRowDataVar = null;
> +    private String _rowOnMouseOver = null;
> +    private String _rowOnMouseOut = null;
>  
>      public HtmlDataTable()
>      {
> @@ -733,6 +693,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_PRESERVEDATAMODEL;
>      }
>  
> +
> +    public boolean isSetPreserveDataModel()
> +    {
> +        if (_preserveDataModel != null) return true;
> +        ValueBinding vb = getValueBinding("preserveDataModel");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setPreserveSort(boolean preserveSort)
>      {
>          _preserveSort = Boolean.valueOf(preserveSort);
> @@ -746,6 +715,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_PRESERVESORT;
>      }
>  
> +
> +    public boolean isSetPreserveSort()
> +    {
> +        if (_preserveSort != null) return true;
> +        ValueBinding vb = getValueBinding("preserveSort");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setEnabledOnUserRole(String enabledOnUserRole)
>      {
>          _enabledOnUserRole = enabledOnUserRole;
> @@ -783,6 +761,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_RENDEREDIFEMPTY;
>      }
>  
> +
> +    public boolean isSetRenderedIfEmpty()
> +    {
> +        if (_renderedIfEmpty != null) return true;
> +        ValueBinding vb = getValueBinding("renderedIfEmpty");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setRowIndexVar(String rowIndexVar)
>      {
>          _rowIndexVar = rowIndexVar;
> @@ -819,7 +806,31 @@
>          return vb != null ? (String)vb.getValue(getFacesContext()) : null;
>      }
>  
> +    public void setRowOnMouseOver(String rowOnMouseOver)
> +    {
> +        _rowOnMouseOver = rowOnMouseOver;
> +    }
>  
> +    public String getRowOnMouseOver()
> +    {
> +        if (_rowOnMouseOver != null) return _rowOnMouseOver;
> +        ValueBinding vb = getValueBinding("rowOnMouseOver");
> +        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> +    }
>  
> +    public void setRowOnMouseOut(String rowOnMouseOut)
> +    {
> +        _rowOnMouseOut = rowOnMouseOut;
> +    }
> +
> +    public String getRowOnMouseOut()
> +    {
> +        if (_rowOnMouseOut != null) return _rowOnMouseOut;
> +        ValueBinding vb = getValueBinding("rowOnMouseOut");
> +        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> +    }
> +
> +
> +
>      //------------------ GENERATED CODE END ---------------------------------------
>  }
> Index: HtmlInputTextarea.java
> ===================================================================
> --- HtmlInputTextarea.java	(revision 178731)
> +++ HtmlInputTextarea.java	(working copy)
> @@ -51,8 +51,8 @@
>      private String _enabledOnUserRole = null;
>      private String _visibleOnUserRole = null;
>      private Boolean _displayValueOnly = null;
> -	private String _displayValueOnlyStyle = null;
> -	private String _displayValueOnlyStyleClass = null;
> +    private String _displayValueOnlyStyle = null;
> +    private String _displayValueOnlyStyleClass = null;
>  
>      public HtmlInputTextarea()
>      {
> @@ -83,7 +83,6 @@
>          return vb != null ? (String)vb.getValue(getFacesContext()) : null;
>      }
>  
> -
>      public boolean isRendered()
>      {
>          if (!UserRoleUtils.isVisibleOnUserRole(this)) return false;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (MYFACES-258) build/codegen ant generate-all-components-components fails FileNotFoundException

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-258.
------------------------------------

    Resolution: Invalid

This issue is no longer valid, due to latest changes on myfaces component generation

> build/codegen ant generate-all-components-components fails FileNotFoundException
> --------------------------------------------------------------------------------
>
>                 Key: MYFACES-258
>                 URL: https://issues.apache.org/jira/browse/MYFACES-258
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: build process
>    Affects Versions: 1.1.0
>         Environment: WinXP, JDK 1.4.2_08, Ant 1.6.4
>            Reporter: Jeff Keene
>            Assignee: Manfred Geiler
>            Priority: Minor
>
> Trying to build from sources, generating components was failing on FileNotFoundException when using the generate-all-components-components target.  Also failed on any of the targets in build/codegen/build.xml where multiple includes were selected.  Adjusted logic in ComponentGeneratorTask, patch appended.  Reran, found some code duplication post generation in HtmlDataTable and HtmlInputTextarea, patches appended.
> -------------------------------
> Index: ComponentGeneratorTask.java
> ===================================================================
> --- ComponentGeneratorTask.java	(revision 178731)
> +++ ComponentGeneratorTask.java	(working copy)
> @@ -86,25 +86,20 @@
>  
>          ComponentGenerator generator = new ComponentGenerator(_destdir, _velocityLoaderPath);
>  
> -        if(_includes==null)
> +        DirectoryScanner ds = getDirectoryScanner(_basedir);
> +        if (_includes != null)
>          {
> -            DirectoryScanner ds = getDirectoryScanner(_basedir);
> -            ds.scan();
> -
> -            String[] files = ds.getIncludedFiles();
> -            for (int i = 0; i < files.length; i++)
> -            {
> -                String xmlFileName = files[i];
> -                log.info("on xmlFileName : "+files[i]);
> -                generator.generate(new File(_basedir, xmlFileName));
> -            }
> +            ds.setIncludes(_includes.split(","));
>          }
> -        else
> -        {
> -            //_includes = _includes.replace('/','\\');
>  
> -            log.info("on xmlFileName : "+_basedir+"/"+_includes);
> -            generator.generate(new File(_basedir, _includes));
> +        ds.scan();
> +
> +        String[] files = ds.getIncludedFiles();
> +        for (int i = 0; i < files.length; i++)
> +        {
> +            String xmlFileName = files[i];
> +            log.info("on xmlFileName : "+files[i]);
> +            generator.generate(new File(_basedir, xmlFileName));
>          }
>      }
>  
> Index: HtmlDataTable.java
> ===================================================================
> --- HtmlDataTable.java	(revision 178731)
> +++ HtmlDataTable.java	(working copy)
> @@ -61,8 +61,6 @@
>  
>      private String _sortColumn = null;
>      private Boolean _sortAscending = null;
> -    private String _rowOnMouseOver = null;
> -    private String _rowOnMouseOut = null;
>  
>      public void setValue(Object value)
>      {
> @@ -659,51 +657,11 @@
>          return v != null ? v.booleanValue() : DEFAULT_SORTASCENDING;
>      }
>  
> -    public void setRowOnMouseOver(String rowOnMouseOver)
> -    {
> -        _rowOnMouseOver = rowOnMouseOver;
> -        // update model is necessary here, because processUpdates is never called
> -        // reason: HtmlCommandSortHeader.isImmediate() == true
> -        ValueBinding vb = getValueBinding("rowOnMouseOver");
> -        if (vb != null)
> -        {
> -            vb.setValue(getFacesContext(), _rowOnMouseOver);
> -            _rowOnMouseOver = null;
> -        }
> -    }
> -
> -    public String getRowOnMouseOver()
> -    {
> -        if (_rowOnMouseOver != null) return _rowOnMouseOver;
> -        ValueBinding vb = getValueBinding("rowOnMouseOver");
> -        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> -    }
> -
> -    public void setRowOnMouseOut(String rowOnMouseOut)
> -    {
> -        _rowOnMouseOut = rowOnMouseOut;
> -        // update model is necessary here, because processUpdates is never called
> -        // reason: HtmlCommandSortHeader.isImmediate() == true
> -        ValueBinding vb = getValueBinding("rowOnMouseOut");
> -        if (vb != null)
> -        {
> -            vb.setValue(getFacesContext(), _rowOnMouseOut);
> -            _rowOnMouseOut = null;
> -        }
> -    }
> -
> -    public String getRowOnMouseOut()
> -    {
> -        if (_rowOnMouseOut != null) return _rowOnMouseOut;
> -        ValueBinding vb = getValueBinding("rowOnMouseOut");
> -        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> -    }
> -
>      //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
>  
>      public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlDataTable";
>      private static final boolean DEFAULT_PRESERVEDATAMODEL = false;
> -    private static final boolean DEFAULT_PRESERVESORT = true;
> +    private static final boolean DEFAULT_PRESERVESORT = false;
>      private static final boolean DEFAULT_RENDEREDIFEMPTY = true;
>  
>      private Boolean _preserveDataModel = null;
> @@ -714,6 +672,8 @@
>      private String _rowIndexVar = null;
>      private String _rowCountVar = null;
>      private String _previousRowDataVar = null;
> +    private String _rowOnMouseOver = null;
> +    private String _rowOnMouseOut = null;
>  
>      public HtmlDataTable()
>      {
> @@ -733,6 +693,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_PRESERVEDATAMODEL;
>      }
>  
> +
> +    public boolean isSetPreserveDataModel()
> +    {
> +        if (_preserveDataModel != null) return true;
> +        ValueBinding vb = getValueBinding("preserveDataModel");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setPreserveSort(boolean preserveSort)
>      {
>          _preserveSort = Boolean.valueOf(preserveSort);
> @@ -746,6 +715,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_PRESERVESORT;
>      }
>  
> +
> +    public boolean isSetPreserveSort()
> +    {
> +        if (_preserveSort != null) return true;
> +        ValueBinding vb = getValueBinding("preserveSort");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setEnabledOnUserRole(String enabledOnUserRole)
>      {
>          _enabledOnUserRole = enabledOnUserRole;
> @@ -783,6 +761,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_RENDEREDIFEMPTY;
>      }
>  
> +
> +    public boolean isSetRenderedIfEmpty()
> +    {
> +        if (_renderedIfEmpty != null) return true;
> +        ValueBinding vb = getValueBinding("renderedIfEmpty");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setRowIndexVar(String rowIndexVar)
>      {
>          _rowIndexVar = rowIndexVar;
> @@ -819,7 +806,31 @@
>          return vb != null ? (String)vb.getValue(getFacesContext()) : null;
>      }
>  
> +    public void setRowOnMouseOver(String rowOnMouseOver)
> +    {
> +        _rowOnMouseOver = rowOnMouseOver;
> +    }
>  
> +    public String getRowOnMouseOver()
> +    {
> +        if (_rowOnMouseOver != null) return _rowOnMouseOver;
> +        ValueBinding vb = getValueBinding("rowOnMouseOver");
> +        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> +    }
>  
> +    public void setRowOnMouseOut(String rowOnMouseOut)
> +    {
> +        _rowOnMouseOut = rowOnMouseOut;
> +    }
> +
> +    public String getRowOnMouseOut()
> +    {
> +        if (_rowOnMouseOut != null) return _rowOnMouseOut;
> +        ValueBinding vb = getValueBinding("rowOnMouseOut");
> +        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> +    }
> +
> +
> +
>      //------------------ GENERATED CODE END ---------------------------------------
>  }
> Index: HtmlInputTextarea.java
> ===================================================================
> --- HtmlInputTextarea.java	(revision 178731)
> +++ HtmlInputTextarea.java	(working copy)
> @@ -51,8 +51,8 @@
>      private String _enabledOnUserRole = null;
>      private String _visibleOnUserRole = null;
>      private Boolean _displayValueOnly = null;
> -	private String _displayValueOnlyStyle = null;
> -	private String _displayValueOnlyStyleClass = null;
> +    private String _displayValueOnlyStyle = null;
> +    private String _displayValueOnlyStyleClass = null;
>  
>      public HtmlInputTextarea()
>      {
> @@ -83,7 +83,6 @@
>          return vb != null ? (String)vb.getValue(getFacesContext()) : null;
>      }
>  
> -
>      public boolean isRendered()
>      {
>          if (!UserRoleUtils.isVisibleOnUserRole(this)) return false;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-258) build/codegen ant generate-all-components-components fails FileNotFoundException

Posted by "sean schofield (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-258?page=comments#action_12317419 ] 

sean schofield commented on MYFACES-258:
----------------------------------------

Is this issue still valid?  Now that we've done the SVN reorg I doubt this patch will work in its current form ...

> build/codegen ant generate-all-components-components fails FileNotFoundException
> --------------------------------------------------------------------------------
>
>          Key: MYFACES-258
>          URL: http://issues.apache.org/jira/browse/MYFACES-258
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>  Environment: WinXP, JDK 1.4.2_08, Ant 1.6.4
>     Reporter: Jeff Keene
>     Priority: Minor

>
> Trying to build from sources, generating components was failing on FileNotFoundException when using the generate-all-components-components target.  Also failed on any of the targets in build/codegen/build.xml where multiple includes were selected.  Adjusted logic in ComponentGeneratorTask, patch appended.  Reran, found some code duplication post generation in HtmlDataTable and HtmlInputTextarea, patches appended.
> -------------------------------
> Index: ComponentGeneratorTask.java
> ===================================================================
> --- ComponentGeneratorTask.java	(revision 178731)
> +++ ComponentGeneratorTask.java	(working copy)
> @@ -86,25 +86,20 @@
>  
>          ComponentGenerator generator = new ComponentGenerator(_destdir, _velocityLoaderPath);
>  
> -        if(_includes==null)
> +        DirectoryScanner ds = getDirectoryScanner(_basedir);
> +        if (_includes != null)
>          {
> -            DirectoryScanner ds = getDirectoryScanner(_basedir);
> -            ds.scan();
> -
> -            String[] files = ds.getIncludedFiles();
> -            for (int i = 0; i < files.length; i++)
> -            {
> -                String xmlFileName = files[i];
> -                log.info("on xmlFileName : "+files[i]);
> -                generator.generate(new File(_basedir, xmlFileName));
> -            }
> +            ds.setIncludes(_includes.split(","));
>          }
> -        else
> -        {
> -            //_includes = _includes.replace('/','\\');
>  
> -            log.info("on xmlFileName : "+_basedir+"/"+_includes);
> -            generator.generate(new File(_basedir, _includes));
> +        ds.scan();
> +
> +        String[] files = ds.getIncludedFiles();
> +        for (int i = 0; i < files.length; i++)
> +        {
> +            String xmlFileName = files[i];
> +            log.info("on xmlFileName : "+files[i]);
> +            generator.generate(new File(_basedir, xmlFileName));
>          }
>      }
>  
> Index: HtmlDataTable.java
> ===================================================================
> --- HtmlDataTable.java	(revision 178731)
> +++ HtmlDataTable.java	(working copy)
> @@ -61,8 +61,6 @@
>  
>      private String _sortColumn = null;
>      private Boolean _sortAscending = null;
> -    private String _rowOnMouseOver = null;
> -    private String _rowOnMouseOut = null;
>  
>      public void setValue(Object value)
>      {
> @@ -659,51 +657,11 @@
>          return v != null ? v.booleanValue() : DEFAULT_SORTASCENDING;
>      }
>  
> -    public void setRowOnMouseOver(String rowOnMouseOver)
> -    {
> -        _rowOnMouseOver = rowOnMouseOver;
> -        // update model is necessary here, because processUpdates is never called
> -        // reason: HtmlCommandSortHeader.isImmediate() == true
> -        ValueBinding vb = getValueBinding("rowOnMouseOver");
> -        if (vb != null)
> -        {
> -            vb.setValue(getFacesContext(), _rowOnMouseOver);
> -            _rowOnMouseOver = null;
> -        }
> -    }
> -
> -    public String getRowOnMouseOver()
> -    {
> -        if (_rowOnMouseOver != null) return _rowOnMouseOver;
> -        ValueBinding vb = getValueBinding("rowOnMouseOver");
> -        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> -    }
> -
> -    public void setRowOnMouseOut(String rowOnMouseOut)
> -    {
> -        _rowOnMouseOut = rowOnMouseOut;
> -        // update model is necessary here, because processUpdates is never called
> -        // reason: HtmlCommandSortHeader.isImmediate() == true
> -        ValueBinding vb = getValueBinding("rowOnMouseOut");
> -        if (vb != null)
> -        {
> -            vb.setValue(getFacesContext(), _rowOnMouseOut);
> -            _rowOnMouseOut = null;
> -        }
> -    }
> -
> -    public String getRowOnMouseOut()
> -    {
> -        if (_rowOnMouseOut != null) return _rowOnMouseOut;
> -        ValueBinding vb = getValueBinding("rowOnMouseOut");
> -        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> -    }
> -
>      //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
>  
>      public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlDataTable";
>      private static final boolean DEFAULT_PRESERVEDATAMODEL = false;
> -    private static final boolean DEFAULT_PRESERVESORT = true;
> +    private static final boolean DEFAULT_PRESERVESORT = false;
>      private static final boolean DEFAULT_RENDEREDIFEMPTY = true;
>  
>      private Boolean _preserveDataModel = null;
> @@ -714,6 +672,8 @@
>      private String _rowIndexVar = null;
>      private String _rowCountVar = null;
>      private String _previousRowDataVar = null;
> +    private String _rowOnMouseOver = null;
> +    private String _rowOnMouseOut = null;
>  
>      public HtmlDataTable()
>      {
> @@ -733,6 +693,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_PRESERVEDATAMODEL;
>      }
>  
> +
> +    public boolean isSetPreserveDataModel()
> +    {
> +        if (_preserveDataModel != null) return true;
> +        ValueBinding vb = getValueBinding("preserveDataModel");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setPreserveSort(boolean preserveSort)
>      {
>          _preserveSort = Boolean.valueOf(preserveSort);
> @@ -746,6 +715,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_PRESERVESORT;
>      }
>  
> +
> +    public boolean isSetPreserveSort()
> +    {
> +        if (_preserveSort != null) return true;
> +        ValueBinding vb = getValueBinding("preserveSort");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setEnabledOnUserRole(String enabledOnUserRole)
>      {
>          _enabledOnUserRole = enabledOnUserRole;
> @@ -783,6 +761,15 @@
>          return v != null ? v.booleanValue() : DEFAULT_RENDEREDIFEMPTY;
>      }
>  
> +
> +    public boolean isSetRenderedIfEmpty()
> +    {
> +        if (_renderedIfEmpty != null) return true;
> +        ValueBinding vb = getValueBinding("renderedIfEmpty");
> +        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
> +        return v != null;
> +    }
> +
>      public void setRowIndexVar(String rowIndexVar)
>      {
>          _rowIndexVar = rowIndexVar;
> @@ -819,7 +806,31 @@
>          return vb != null ? (String)vb.getValue(getFacesContext()) : null;
>      }
>  
> +    public void setRowOnMouseOver(String rowOnMouseOver)
> +    {
> +        _rowOnMouseOver = rowOnMouseOver;
> +    }
>  
> +    public String getRowOnMouseOver()
> +    {
> +        if (_rowOnMouseOver != null) return _rowOnMouseOver;
> +        ValueBinding vb = getValueBinding("rowOnMouseOver");
> +        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> +    }
>  
> +    public void setRowOnMouseOut(String rowOnMouseOut)
> +    {
> +        _rowOnMouseOut = rowOnMouseOut;
> +    }
> +
> +    public String getRowOnMouseOut()
> +    {
> +        if (_rowOnMouseOut != null) return _rowOnMouseOut;
> +        ValueBinding vb = getValueBinding("rowOnMouseOut");
> +        return vb != null ? (String)vb.getValue(getFacesContext()) : null;
> +    }
> +
> +
> +
>      //------------------ GENERATED CODE END ---------------------------------------
>  }
> Index: HtmlInputTextarea.java
> ===================================================================
> --- HtmlInputTextarea.java	(revision 178731)
> +++ HtmlInputTextarea.java	(working copy)
> @@ -51,8 +51,8 @@
>      private String _enabledOnUserRole = null;
>      private String _visibleOnUserRole = null;
>      private Boolean _displayValueOnly = null;
> -	private String _displayValueOnlyStyle = null;
> -	private String _displayValueOnlyStyleClass = null;
> +    private String _displayValueOnlyStyle = null;
> +    private String _displayValueOnlyStyleClass = null;
>  
>      public HtmlInputTextarea()
>      {
> @@ -83,7 +83,6 @@
>          return vb != null ? (String)vb.getValue(getFacesContext()) : null;
>      }
>  
> -
>      public boolean isRendered()
>      {
>          if (!UserRoleUtils.isVisibleOnUserRole(this)) return false;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira