Commit 558d52a0 by Tuukka Kivilahti, TKffTK

Merge branch 'master' of codecrew.fi:bortal

Conflicts:
	code/LanBortalWeb/WebContent/permissionDenied.xhtml
	code/LanBortalWeb/WebContent/resources/cditools/bills/list.xhtml
2 parents 139d54b3 b8065ab6
......@@ -7,7 +7,7 @@
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_05">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
......
......@@ -8,7 +8,7 @@
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_05">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
......
......@@ -13,10 +13,10 @@
<ui:define name="content">
<h1>#{i18n['permissiondenied.header']}</h1>
<p>
<h:outputText rendered="#{!sessionHandler.loggedIn}" value="#{i18n['permissiondenied.notLoggedIn']}" />
<h:outputText rendered="#{not sessionHandler.loggedIn}" value="#{i18n['permissiondenied.notLoggedIn']}" />
<h:outputText rendered="#{sessionHandler.loggedIn}" value="#{i18n['permissiondenied.alreadyLoggedIn']}" />
</p>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
</html>
......@@ -12,14 +12,14 @@
<h:outputText rendered="#{billListView.bills.rowCount le 0}" value="#{i18n['bills.noBills']}" />
<h:form rendered="#{billListView.bills.rowCount gt 0}">
<h:dataTable styleClass="bordertable" id="billList" value="#{billListView.bills}" var="bill">
<h:column rendered="#{billListView.canWriteBill()}">
<h:column rendered="#{billListView.canWriteBill}">
<f:facet name="header">
<h:outputText value="${i18n['bill.payer']}" />
</f:facet>
<h:link rendered="#{billListView.canWriteBill()}" outcome="/useradmin/edit" value="#{bill.addr1}">
<h:link rendered="#{billListView.canWriteBill}" outcome="/useradmin/edit" value="#{bill.addr1}">
<f:param name="userid" value="#{bill.user.user.id}" />
</h:link>
<h:outputText rendered="#{!billListView.canWriteBill}" value="#{bill.addr1}" />
<h:outputText rendered="#{not billListView.canWriteBill}" value="#{bill.addr1}" />
</h:column>
<h:column>
<f:facet name="header">
......@@ -59,12 +59,12 @@
<f:param name="billid" value="#{bill.id}" />
</h:link>
</h:column>
<h:column rendered="#{billListView.canWriteBill()}">
<h:column rendered="#{billListView.canWriteBill}">
<h:link outcome="/bill/edit" value="#{i18n['bill.edit']}">
<f:param name="billid" value="#{bill.id}" />
</h:link>
</h:column>
<h:column rendered="#{billListView.canWriteBill()}">
<h:column rendered="#{billListView.canWriteBill}">
<h:commandButton rendered="#{bill.paidDate == null}" action="#{billListView.markPaid()}" value="#{i18n['bill.markPaid']}">
<f:ajax render="@form" />
</h:commandButton>
......
......@@ -45,19 +45,19 @@
<f:facet name="header">
<h:outputText id="count" value="${i18n['product.cart.count']}" />
</f:facet>
<h:commandButton action="#{foodShopView.add(-10)}" value="#{i18n['productshop.minusTen']}">
<h:commandButton action="#{foodShopView.addMinusTen}" value="#{i18n['productshop.minusTen']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{foodShopView.add(-1)}" value="#{i18n['productshop.minusOne']}">
<h:commandButton action="#{foodShopView.addMinusOne}" value="#{i18n['productshop.minusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:inputText size="4" id="cartcount" value="#{cart.count}">
<f:ajax render="@form" event="valueChange" />
</h:inputText>
<h:commandButton action="#{foodShopView.add(1)}" value="#{i18n['productshop.plusOne']}">
<h:commandButton action="#{foodShopView.addOne}" value="#{i18n['productshop.plusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{foodShopView.add(10)}" value="#{i18n['productshop.plusTen']}">
<h:commandButton action="#{foodShopView.addTen}" value="#{i18n['productshop.plusTen']}">
<f:ajax render="@form" />
</h:commandButton>
</h:column>
......
......@@ -45,19 +45,19 @@
<f:facet name="header">
<h:outputText id="count" value="${i18n['product.cart.count']}" />
</f:facet>
<h:commandButton action="#{foodShopView.add(-10)}" value="#{i18n['productshop.minusTen']}">
<h:commandButton action="#{foodShopView.addMinusTen}" value="#{i18n['productshop.minusTen']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{foodShopView.add(-1)}" value="#{i18n['productshop.minusOne']}">
<h:commandButton action="#{foodShopView.addMinusOne}" value="#{i18n['productshop.minusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:inputText size="4" id="cartcount" value="#{cart.count}">
<f:ajax render="@form" event="valueChange" />
</h:inputText>
<h:commandButton action="#{foodShopView.add(1)}" value="#{i18n['productshop.plusOne']}">
<h:commandButton action="#{foodShopView.addOne}" value="#{i18n['productshop.plusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{foodShopView.add(10)}" value="#{i18n['productshop.plusTen']}">
<h:commandButton action="#{foodShopView.addTen}" value="#{i18n['productshop.plusTen']}">
<f:ajax render="@form" />
</h:commandButton>
</h:column>
......
......@@ -46,20 +46,20 @@
<f:facet name="header">
<h:outputText id="count" value="${i18n['product.cart.count']}" />
</f:facet>
<h:commandButton action="#{productShopView.add(-10)}" value="#{i18n['productshop.minusTen']}">
<h:commandButton action="#{productShopView.addMinusTen}" value="#{i18n['productshop.minusTen']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{productShopView.add(-1)}" value="#{i18n['productshop.minusOne']}">
<h:commandButton action="#{productShopView.addMinusOne}" value="#{i18n['productshop.minusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:inputText size="4" id="cartcount" value="#{cart.count}">
<f:convertNumber maxIntegerDigits="2" minFractionDigits="0"/>
<f:ajax render="@form" event="valueChange" listener="#{productShopView.updateCartLimits}"/>
</h:inputText>
<h:commandButton action="#{productShopView.add(1)}" value="#{i18n['productshop.plusOne']}">
<h:commandButton action="#{productShopView.addOne}" value="#{i18n['productshop.plusOne']}">
<f:ajax render="@form" />
</h:commandButton>
<h:commandButton action="#{productShopView.add(10)}" value="#{i18n['productshop.plusTen']}">
<h:commandButton action="#{productShopView.addTen}" value="#{i18n['productshop.plusTen']}">
<f:ajax render="@form" />
</h:commandButton>
</h:column>
......
......@@ -125,7 +125,9 @@ public class MapManageView extends GenericCDIView {
}
public String createMap() {
map = eventmapBean.create(getMapname());
return "edit";
}
......@@ -183,6 +185,7 @@ public class MapManageView extends GenericCDIView {
map = eventmapBean.saveMap(map);
logger.debug("places in map merge {}", map.getPlaces().size());
return null;
}
......
......@@ -84,7 +84,7 @@ public class BillListView extends GenericCDIView {
return bills;
}
public boolean canWriteBill() {
public boolean isCanWriteBill() {
return writeBill;
}
......
......@@ -83,7 +83,27 @@ public class FoodShopView extends GenericCDIView {
item.setCount(item.getCount().add(BigDecimal.valueOf(count)));
return null;
}
public String addOne()
{
return add(1);
}
public String addMinusOne()
{
return add(-1);
}
public String addTen()
{
return add(10);
}
public String addMinusTen()
{
return add(-10);
}
public BigDecimal getAccountBalance()
{
BigDecimal ret = user.getAccountBalance();
......
......@@ -96,6 +96,26 @@ public class ProductShopView extends GenericCDIView {
return null;
}
public String addOne()
{
return add(1);
}
public String addMinusOne()
{
return add(-1);
}
public String addTen()
{
return add(10);
}
public String addMinusTen()
{
return add(-10);
}
public void updateCartLimits(ProductShopItem item) {
......
......@@ -32,7 +32,7 @@ public class AuthView extends GenericCDIView {
@Inject
private NavigationHandler navihandler;
@EJB
private transient BootstrapBeanLocal bootStrapBean;
......@@ -59,12 +59,12 @@ public class AuthView extends GenericCDIView {
}
public void executeLogin() {
public String executeLogin() {
bootStrapBean.saneDefaults();
if (login == null || password == null || login.isEmpty() || password.isEmpty()) {
return;
return null;
}
HttpServletRequest request = getRequest();
......@@ -99,7 +99,8 @@ public class AuthView extends GenericCDIView {
}
}
return;
return null;
}
public String getLogin() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!