Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8316777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:26:08+00:00 2026-06-08T21:26:08+00:00

I have a treetable with a multiple file upload component. If i upload 1

  • 0

I have a treetable with a multiple file upload component. If i upload 1 file, it correctly updates my treetable with that file.

If i try and upload multiple files at the same time (lets say file1 and file2), it only updates the tree table with file 1. If i then upload another file (file3), it then updates the tree table with file1, file2, and file3 so it seems to be an issue with updating.

Does anyone have any insight into this or know if it’s a bug?

<h:form id="attachmentsForm" enctype="multipart/form-data">
    <p:treeTable value="#{contentEditorBacking.attachments}" var="node">
        <p:column>
            <f:facet name="header">Name</f:facet>
            <h:outputLink value="#{node.link}" target="_blank" disabled="#{node.disabled}">
                <h:outputText value="#{node.displayName}"/>
            </h:outputLink>
        </p:column>

        <p:column>
            <f:facet name="header">Size</f:facet>
            <h:outputText value="#{node.size}" />
        </p:column>

        <p:column>
            <f:facet name="header">Modified By</f:facet>
            <h:outputText value="#{node.modifier}" />
        </p:column>

        <p:column>
            <f:facet name="header">Delete</f:facet>
            <p:commandLink styleClass="ui-icon ui-icon-trash" id="deleteProperty" actionListener="#{contentEditorBacking.deleteAttachment}" 
                    rendered="#{node.canDelete}" update="attachmentsForm">
                    <f:attribute name="filename" value="#{node.displayName}" />
                </p:commandLink>
        </p:column>
    </p:treeTable>
    &nbsp;&nbsp;
    <p:fileUpload fileUploadListener="#{contentEditorBacking.handleFileUpload}"
        mode="advanced" sizeLimit="#{contentEditorBacking.fileSizeLimit}"
        invalidSizeMessage="#{contentEditorBacking.fileSizeMessage}"
        allowTypes="#{contentEditorBacking.allowedFileTypes}" update=":controlTabs:attachmentsForm" />
</h:form>

Backer

public void handleFileUpload(FileUploadEvent event) throws Exception{

        UploadedFile toSave = event.getFile();
        System.out.println("fileName = "+event.getFile());  
        String fileName = toSave.getFileName();
        String downloadLink = "";
        Long size = event.getFile().getSize();
        long version = 1;
        User user = cm.getUser();
        String creator = user.getUserName();
        Date modDate = new Date();
        boolean canDelete = true;
        boolean canUpdate = true;
        String displayName = fileName + "- pending";

        new DefaultTreeNode(new Attachment(downloadLink,size,version,creator,modDate,canDelete,canUpdate,displayName,true), attachRoot);
        addNeedToSaveMessage();
    }

EDIT

I added an id to the treeTable and changed my fileUpload update to the id of the treeTable rather than the id of the form tag and then solved my problem.

I always thought that by updating a parent element, it should update all of its children. Is that not true or are there exceptions to this as in the treeTable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:26:09+00:00Added an answer on June 8, 2026 at 9:26 pm

    Apparently for the file upload component, i had to update the actual tree table rather its parent form tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

--EDIT-- I believe this is a valid question that may have multiple answers (as
I have heard that LINQ2SQL has been written to support multiple database vendor providers
I have the following table and values: create table TreeTable ( ID int primary
I have content management system application that uses a polymorphic tree table as the
have written this little class, which generates a UUID every time an object of
Have deployed numerous report parts which reference the same view however one of them
Is it posible to set sortproperty in a TreeTable in ADF? I have a
I have to implement an algorithm that generates a timetable for a university. I've
I'm in a project that takes the Single Responsibility Principle pretty seriously. We have
I have a page operation that uses something like: $('#thetable tbody').replaceWith(newtbody); in an ajax

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.