1 Reply Latest reply on Jul 5, 2010 4:26 PM by Brian Abston

    Problems passing parameters in JBoss EL. Please Help.

    Brian Abston Newbie

      I am having problems passing parameters to the method via the Jboss EL. Below is the view and bean. What am I doing wrong? Any help would be appreciated.


      BTW...When I use strings as the parameters it works.




      View


      <rich:dataTable id="itemList" var="_item" value="#{itemList.resultList}" rendered="#{not empty itemList.resultList}">
        <h:column>
          <s:graphicImage rendered="true" value="#{fileManager.getFileByPathAndName(_item.photos[0].photoPath, _item.photos[0].photoFileName)}"
              fileName ="#{_item.photos[0].photoFileName}">
            <s:transformImageSize width="200" maintainRatio="true" />          
          </s:graphicImage>
        </h:column>
      </rich:dataTable>



      Bean


      @Name("fileManager")
      @Scope(ScopeType.APPLICATION)
      @AutoCreate
      public class FileManager {
      
           private String uploadRootPath;
      
           @Create
           public void create() {
                uploadRootPath = Constants.UPLOAD_ROOT_PATH;
           }
      
           public File getFileByPathAndName(String path, String fileName) {
                String fullPath = this.uploadRootPath + "\\" + path + "\\" + fileName;
                System.out.println(path);
                File result = new File(fullPath);
                return result;
           }
      }