use of org.entando.entando.aps.system.services.guifragment.GuiFragment in project entando-core by entando.
the class GuiFragmentAction method save.
public String save() {
try {
int strutsAction = this.getStrutsAction();
GuiFragment guiFragment = this.createGuiFragment();
if (ApsAdminSystemConstants.ADD == strutsAction) {
this.getGuiFragmentManager().addGuiFragment(guiFragment);
} else if (ApsAdminSystemConstants.EDIT == strutsAction) {
this.getGuiFragmentManager().updateGuiFragment(guiFragment);
}
} catch (Throwable t) {
_logger.error("error in save", t);
return FAILURE;
}
return SUCCESS;
}
use of org.entando.entando.aps.system.services.guifragment.GuiFragment in project entando-core by entando.
the class GuiFragmentAction method edit.
public String edit() {
try {
GuiFragment guiFragment = this.getGuiFragmentManager().getGuiFragment(this.getCode());
if (null == guiFragment) {
this.addActionError(this.getText("error.guiFragment.null"));
return INPUT;
}
this.populateForm(guiFragment);
this.setStrutsAction(ApsAdminSystemConstants.EDIT);
} catch (Throwable t) {
_logger.error("error in edit", t);
return FAILURE;
}
return SUCCESS;
}
use of org.entando.entando.aps.system.services.guifragment.GuiFragment in project entando-core by entando.
the class GuiFragmentAction method showDetail.
public String showDetail() {
try {
if (null == this.getCode()) {
this.addActionError(this.getText("error.guiFragment.null"));
return "guiFragmentsList";
}
GuiFragment guiFragment = this.getGuiFragmentManager().getGuiFragment(this.getCode());
if (null == guiFragment) {
this.addActionError(this.getText("error.guiFragment.null"));
return "guiFragmentsList";
}
this.populateForm(guiFragment);
this.extractReferencingObjects(this.getCode());
} catch (Throwable t) {
_logger.error("error in showDetail", t);
return FAILURE;
}
return SUCCESS;
}
use of org.entando.entando.aps.system.services.guifragment.GuiFragment in project entando-core by entando.
the class GuiFragmentAction method createGuiFragment.
private GuiFragment createGuiFragment() throws Throwable {
GuiFragment guiFragment = null;
int strutsAction = this.getStrutsAction();
if (ApsAdminSystemConstants.ADD == strutsAction) {
guiFragment = new GuiFragment();
guiFragment.setCode(this.getCode());
} else {
guiFragment = this.getGuiFragmentManager().getGuiFragment(this.getCode());
}
// GuiFragment guiFragment = new GuiFragment();
// guiFragment.setWidgetTypeCode(this.getWidgetTypeCode());
// guiFragment.setPluginCode(this.getPluginCode());
guiFragment.setGui(this.getGui());
return guiFragment;
}
use of org.entando.entando.aps.system.services.guifragment.GuiFragment in project entando-core by entando.
the class JAXBGuiFragment method getGuiFragment.
@XmlTransient
public GuiFragment getGuiFragment() {
GuiFragment guiFragment = new GuiFragment();
guiFragment.setCode(this.getCode());
guiFragment.setWidgetTypeCode(this.getWidgetTypeCode());
guiFragment.setPluginCode(this.getPluginCode());
guiFragment.setGui(this.getGui());
guiFragment.setDefaultGui(this.getDefaultGui());
guiFragment.setLocked(this.isLocked());
return guiFragment;
}
Aggregations