Overwrite controller "CRUD" to realize SaveAndShowListAction.
This commit is contained in:
@@ -11,6 +11,8 @@ import com.yourcompany.babydatenbank.actions.*;
|
|||||||
import java.math.*;
|
import java.math.*;
|
||||||
import java.time.*;
|
import java.time.*;
|
||||||
|
|
||||||
|
// TODO: Change controller order
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@View(members=
|
@View(members=
|
||||||
"name;" +
|
"name;" +
|
||||||
@@ -226,17 +228,4 @@ public class Article {
|
|||||||
public void setDiscount(Integer discount) {
|
public void setDiscount(Integer discount) {
|
||||||
this.discount = discount;
|
this.discount = discount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Stereotype("MONEY")
|
|
||||||
@Calculation("(100 - discount) / 100 * originalPrice")
|
|
||||||
@Column(length=8)
|
|
||||||
public BigDecimal getDiscountedSellPrice() {
|
|
||||||
try {
|
|
||||||
return getOriginalPrice().multiply(BigDecimal.ONE.subtract(new BigDecimal(getDiscount()).divide(new BigDecimal(100), 2, RoundingMode.HALF_EVEN)));
|
|
||||||
} catch(Exception e) {
|
|
||||||
//Log.error(e);
|
|
||||||
return BigDecimal.ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
<?xml version = "1.0" encoding = "ISO-8859-1"?>
|
<?xml version = "1.0" encoding = "ISO-8859-1"?>
|
||||||
@@ -21,9 +21,8 @@
|
|||||||
</action>
|
</action>
|
||||||
</controller>
|
</controller>
|
||||||
-->
|
-->
|
||||||
<controller name="BabydatenbankDefaultController">
|
|
||||||
<extends controller="Typical" excluded-actions="new, save, refresh, delete" />
|
<controller name="CRUD">
|
||||||
|
|
||||||
<action name="new"
|
<action name="new"
|
||||||
class="org.openxava.actions.NewAction"
|
class="org.openxava.actions.NewAction"
|
||||||
image="new.gif"
|
image="new.gif"
|
||||||
@@ -53,6 +52,26 @@
|
|||||||
icon="delete"
|
icon="delete"
|
||||||
available-on-new="false"
|
available-on-new="false"
|
||||||
keystroke="Control D"/>
|
keystroke="Control D"/>
|
||||||
|
<action name="searchByViewKey" hidden="true"
|
||||||
|
class="org.openxava.actions.SearchByViewKeyAction"/>
|
||||||
|
|
||||||
|
<action name="searchExecutingOnChange" hidden="true"
|
||||||
|
class="org.openxava.actions.SearchExecutingOnChangeAction"/>
|
||||||
|
|
||||||
|
<action name="searchReadOnly" hidden="true"
|
||||||
|
class="org.openxava.actions.SearchReadOnlyAction"/>
|
||||||
|
|
||||||
|
<action name="deleteSelected" mode="list" confirm="true"
|
||||||
|
process-selected-items="true"
|
||||||
|
image="delete.gif"
|
||||||
|
icon="delete"
|
||||||
|
class="org.openxava.actions.DeleteSelectedAction"
|
||||||
|
keystroke="Control D"/>
|
||||||
|
|
||||||
|
<action name="deleteRow" mode="NONE" confirm="true"
|
||||||
|
class="org.openxava.actions.DeleteSelectedAction"
|
||||||
|
image="delete.gif"
|
||||||
|
icon="delete"
|
||||||
|
in-each-row="true"/>
|
||||||
</controller>
|
</controller>
|
||||||
|
|
||||||
</controllers>
|
</controllers>
|
||||||
Reference in New Issue
Block a user