how implement file upload in Spread sheet plugin

Confluence User - 12 Jun, 2024

Can Someone give me the getrows template of the spread sheet or give me the methode of how to remove file from spread sheet ! because i can only add files .

when i click remove then i submit ! the file comeback 


if (mode.equals("Header")) {
                Document headerDoc = Jsoup.parse(html);
                Elements head = headerDoc.select("label");
                String html2 = "";
                for (int i = 0; i < head.size(); i++) {
                    html2 += "<th>" + head.get(i).select("label").first().text() + "</th>\n";
                }

                LogUtil.info("--->read only", getPropertyString("readonly"));

                if (!("true".equals(getPropertyString("readonly")))) {
                    html2 += "<th>Actions</th>\n";
                }
                return html2;
            }

            if (mode.equals("body")) {
                Document bodyDoc = Jsoup.parse(html);
                Elements divs = bodyDoc.select("div.subform-column").select("div.subform-cell");
                String html2 = "<tr" + " class=\"" + cssClass + "\">" + "<div class =\"subform-container no-frame\">"
                        + bodyDoc.select("input[type=hidden]");

                html2 += "<td  style = \"display:none\" class=\"subform_wrapper\">";
                html2 += "<input type=\"hidden\" class=\"unique_value\" name=\"" + elementParamName
                        + "_unique_value\" value=\"" + uniqueValue + "\" />";


                for (int i = 0; i < divs.size(); i++) {
                    divs.get(i).select("label").remove();
                    divs.get(i).attributes().add("style",
                            "display: flex;flex-direction: row;justify-content: center;align-content: center;");

                    m = this.validateMultiRow(divs.get(i).toString(), rowFormData.getPrimaryKeyValue());

                    if (m.isEmpty()) {
                        html2 += "<td><div>" + bodyDoc.select("div.subform-container").select("input[type=hidden]")
                                + divs.get(i) + "<div></td>\n";
                    } else {
                        html2 += "<td><div>" + bodyDoc.select("div.subform-container").select("input[type=hidden]")
                                + divs.get(i)
                                + "<span class=\"form-error-message\" style=\"display: flex; justify-content: center;\">"
                                + m + "</span>" + "</div></td>\n";
                    }
                }

                if (!("true".equals(getPropertyString("readonly")))) {
                    html2 += "<td class=\"repeater-action\">" + bodyDoc.select("a.repeater-action-delete")
                            + "</td>\n </div></tr>";
                }
                return html2;
            }

thank you
Joget DX8

forms;spreadsheet;plugins;fileupload;newplugindevelopment;development

3


12 Jun, 2024
confluenceUser
confluenceUser

hi, If it is possible, you can attach your sample app here so that I can have a better look on what's happening inside your app. 
thank you.

12 Jun, 2024
confluenceUser
confluenceUser

I think you can use the get GridCellValues Javascript API - Knowledge Base for DX 8 - Joget | COMMUNITY

13 Jun, 2024
confluenceUser
confluenceUser

APP_SpreedSheets_ID-1-20240612233210.jwa


This is my app with my plugin ! you can see i can't delete files can you help me to fix it.
Check the update method ! i can only add files , my problem is that i can't remove it 

Thank you ! 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print