Hi,
I have created a different window for the create action. I thought I could open a different window by specifying the windowType in XML but it does not seem to work. How can I specify that a different window than the standard edit window should be opened?
<actions>
<action id="create"
windowId="qms$Organization.new"/>
<action id="edit"/>
<action id="remove"/>
</actions>
Regards, Edwin.
1 Like
Sorry, this does work. I somehow had the controller extending AbstractWindow instead of AbstractEditor.
This also works although I prefer the declarative way:
/*
* Copyright (c) 2016 qms
*/
package com.xl2build.qms.web.organization;
import java.util.Map;
import javax.inject.Named;
import com.haulmont.cuba.gui.components.AbstractLookup;
import com.haulmont.cuba.gui.components.actions.CreateAction;
/**
* @author Edwin
*/
public class OrganizationBrowse extends AbstractLookup {
@Named("organizationsTable.create")
private CreateAction orgCreate;
@Override
public void init(Map<String, Object> params) {
orgCreate.setWindowId("qms$Organization.new");
}
}
iskandarov
(Rostislav Iskandarov)
May 1, 2016, 4:47pm
#3
Hello.
It is possible to define custom windowId in the screen controller.
The code below should work.
@Named("someEntitiesTable.create")
private CreateAction someEntitiesTableCreate;
@Override
public void init(Map<String, Object> params) {
someEntitiesTableCreate.setWindowId("project$customeditorscreen");
super.init(params);
}
tommeacham
(Thomas Meacham)
September 26, 2017, 6:31pm
#4
Is it possible to have multiple edit actions, each opening their own screen? All the examples I have seen so far seem to replace the create/edit action.
1 Like