I am trying to use bulk editor and I followed your example online
I get a NullPointerException even if I implement bulkEditor in the buttonsPanel or if I add the action of type bulkEdit
I can’t understand if I have to make a different screen for this or bulkEditor should generate the screen automatically
Can anyone explain to me how it could be done?
Thank you
Hi,
Could you share the code snippet that shows how you add a bulk editor action?
Regards,
Gleb
.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd" caption="msg://caption"
messagesPack="com.company.bulktest.web.documente">
<data>
<collection id="documenteDc" class="com.company.bulktest.entity.Documente" view="_local">
<loader id="documenteDl">
<query><![CDATA[select e from bulktest_Documente e]]></query>
</loader>
</collection>
</data>
<layout>
<table id="documenteDcTable" width="50%" dataContainer="documenteDc" multiselect="true">
<actions>
<action id="bulkEdit" type="bulkEdit"/>
</actions>
<columns>
<column id="fisier"/>
<column id="dosar"/>
<column id="volum"/>
<column id="pagina"/>
</columns>
<rowsCount/>
<buttonsPanel id="buttonsPanel">
<bulkEditor id="bulkEditor" for="documenteDcTable"/>
<button id="bulkEditButton" action="documenteDcTable.bulkEdit" caption="Edit bulk"/>
</buttonsPanel>
</table>
</layout>
</window>
.java
package com.company.bulktest.web.documente;
import com.haulmont.cuba.gui.screen.LoadDataBeforeShow;
import com.haulmont.cuba.gui.screen.Screen;
import com.haulmont.cuba.gui.screen.UiController;
import com.haulmont.cuba.gui.screen.UiDescriptor;
@UiController("bulktest_Testscreen")
@UiDescriptor("TestScreen.xml")
@LoadDataBeforeShow
public class Testscreen extends Screen {
}
Remove <bulkEditor id="bulkEditor" for="documenteDcTable"/>
. bulkEditor
is only sutable for legacy screens with datasources.
i had the two trying to test the functionality. indeed, it works, thank you
is there a way i could show the values stored in the database in the textfields?
thank you for your prompt answer
Could you please create a separate topic, since this question isn’t related to this one, and other users with similar questions will find it difficult to find the answer?
ok, thank you again for your help