3 Replies Latest reply on Nov 1, 2007 1:47 PM by Jose Rubio

    s:fileUpload+trinidad = no Renderer for component family org

    Leo Newbie

      Guys,

      I am getting
      WARNING: Renderer 'javax.faces.Text' not found for component family 'org.jboss.seam.ui.FileUpload'
      on log.

      My fileUpload is returning null for fileName and fileData.

      It was working before (1.2.1 and jboss 4.0.2).

      Since I migrated to seam cvs and jboss 4.2 it is not working anymore.

      Any ideia ?

      thks in advanced.


        • 1. Re: s:fileUpload+trinidad = no Renderer for component family
          Leo Newbie

          Does anyone using s:fileUpload w/ trinidad on JBoss 4.2 and seam cvs ?

          rgds

          • 2. Re: s:fileUpload+trinidad = no Renderer for component family
            Leo Newbie

            Guys,

            I simply can not get it working... please HELLLLLLLP ME..

            from my code:

            <h:form id="task" styleClass="edit" enctype="multipart/form-data">
            ...
            <s:decorate id="fileToUploadDecoration">
             <s:fileUpload id="fileToUpload" style="size:60" accept=""
             data="#{fileHome.filedata}" fileName="#{fileHome.filename}"
             readonly="#{readonly}" />
             </s:decorate>
            


            components.xml
             <web:multipart-filter create-temp-files="true"
             max-request-size="1000000" url-pattern="*.seam" />
            



            from log, lots and lots of: (when i submit the form)
            18:03:42,093 ERROR [STDERR] 08/06/2007 18:03:42 org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
            WARNING: Renderer 'javax.faces.Text' not found for component family 'org.jboss.seam.ui.FileUpload'
            



            My Bean:
            package org.bit.etask.home;
            
            import static javax.faces.application.FacesMessage.SEVERITY_INFO;
            
            import java.io.IOException;
            import java.util.ArrayList;
            import java.util.List;
            
            import org.bit.etask.AbstractEntityHome;
            import org.bit.etask.Authenticator;
            import org.bit.etask.Constants;
            import org.bit.etask.FileHelper;
            import org.bit.etask.domain.Activity;
            import org.bit.etask.domain.File;
            import org.jboss.seam.annotations.In;
            import org.jboss.seam.annotations.Name;
            
            @Name("fileHome")
            public class FileHome extends AbstractEntityHome<File> {
            
             private byte[] filedata;
            
             private String filename;
            
             private String fileUploadFrom;
            
             @In(create = true)
             Authenticator authenticator;
            
             @In(create = true)
             TaskHome taskHome;
            
             private List<File> files = new ArrayList<File>(0);
            
             public TaskHome getTaskHome() {
             return taskHome;
             }
            
             public void setTaskHome(TaskHome taskHome) {
             this.taskHome = taskHome;
             }
            
             public void setFileId(Integer id) {
             setId(id);
             }
            
             public Integer getFileId() {
             return (Integer) getId();
             }
            
             @Override
             protected File createInstance() {
             File file = new File();
             return file;
             }
            
             public File getDefinedInstance() {
             return isIdDefined() ? getInstance() : null;
             }
            
             public String uploadThis() {
            //FILE NAME AND FILEDATA ARE NULL EVERYTIME
            
             if (getFilename() == null
             || getFilename().equals("")
             || getInstance().getDescription() == null
             || getInstance().getDescription().equals("")) {
             return Constants.ERROR;
             }
            
             File file = new File();
             file.setFilename(FileHelper.getJustFileName(getFilename()));
             file.setDescription(getInstance().getDescription());
             file.setFiledata(getFiledata());
             files.add(file);
             getInstance().setDescription(null);
             try {
             FileHelper.saveFile(file, taskHome, authenticator.getLoggedActor());
             } catch (IOException e) {
             getFacesMessages().addFromResourceBundleOrDefault(SEVERITY_INFO, getMessageKeyPrefix() + "_upload",
             "Error uploading file: #0", e.getMessage());
             return Constants.ERROR;
             }
             return Constants.SUCCESS;
             }
            
             public String uploadIsDone() {
             if (FileHelper.isFromTaskEdit()) {
             taskHome.getInstance().getCurrentActivity().getFiles().clear();
             taskHome.getInstance().getCurrentActivity().getFiles().addAll(files);
             return "backToTaskEdit";
             } else {
             return "backToActorEdit";
             }
             }
            
             public String getFileUrl() {
             Activity activity = taskHome.getInstance().getCurrentActivity();
             String server = "../etask_uploaded/";
             String url = FileHelper.getUrlPath(activity.getActor(), taskHome);
             return server + url;
             }
            
             public void deattach(File file) {
             getFiles().remove(file);
             FileHelper.removeFile(file, taskHome, authenticator.getLoggedActor());
             if (FileHelper.isFromTaskEdit()) {
             taskHome.getInstance().getCurrentActivity().getFiles().clear();
             taskHome.getInstance().getCurrentActivity().getFiles().addAll(getFiles());
             }
             }
            
             public byte[] getFiledata() {
             return filedata;
             }
            
             public void setFiledata(byte[] filedata) {
             this.filedata = filedata;
             }
            
             public String getFilename() {
             return filename;
             }
            
             public void setFilename(String filename) {
             this.filename = filename;
             }
            
            
            
            
            }
            


            • 3. Re: s:fileUpload+trinidad = no Renderer for component family
              Jose Rubio Newbie

              Did you find a solution to this? I'm getting the data = null.

              The multipart filter is being called and it's recognizing it as a multi part request. It gets the content size of the file right, but then I see no data when the bean is called.

              I heard it might be an issue with Trinidad, but I haven't heard a confirmation.