beaneditform and kapcha

2013-08-05 Thread Nikola Vulovic
How to add kapcha to beaneditform?

-- 
Pozdrav Nikola Vulovic


implementation of 'tapestry.hmac-passphrase

2013-08-03 Thread Nikola Vulovic
i get this error message in log and in AlertManager
(ClientDataEncoderImpl.java:61) - The symbol 'tapestry.hmac-passphrase' has
not been configured. This is used to configure hash-based message
authentication of Tapestry data stored in forms, or in the URL. You
application is less secure, and more vulnerable to denial-of-service
attacks, when this symbol is not configured.

I wish to implement tapestry.hmac-passphrase
Hope someone can tell me exactly what to do

-- 
Pozdrav Nikola Vulovic


Re: kaptcha deployment error

2013-08-02 Thread Nikola Vulovic
do not know why?
Services are not very clear to me and documentation is unclear
it worked when I removed line
binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);


On Fri, Aug 2, 2013 at 5:21 AM, Nikola Vulovic nivuk...@gmail.com wrote:

 this is the error:
 java.lang.RuntimeException: Service id 'KaptchaProducer' has already been
 defined by
 org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
 KaptchaProducerImpl.java:34) via
 org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder) (at
 KaptchaModule.java:38) and may not be redefined by
 org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
 KaptchaProducerImpl.java:34) via
 domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33).
 You should rename one of the service builder methods.

 This is appmodule
 import org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl;
 import org.apache.tapestry5.kaptcha.services.KaptchaProducer;

  public static void bind(ServiceBinder binder) {
   // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
   // Make bind() calls on the binder object to define most IoC services.
   // Use service builder methods (example below) when the implementation
   // is provided inline, or requires more initialization than simply
   // invoking the constructor.
   binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
  }
 Added library's
 tapestry-kaptcha-5.3.7.jar
  kaptcha-2.3.2.jar
 kaptcha-2.3.2-jdk14.jar

 What should be renamed?
 Thanks for help

 --
 Pozdrav Nikola Vulovic




-- 
Pozdrav Nikola Vulovic


kaptcha deployment error

2013-08-01 Thread Nikola Vulovic
this is the error:
java.lang.RuntimeException: Service id 'KaptchaProducer' has already been
defined by
org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
KaptchaProducerImpl.java:34) via
org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder) (at
KaptchaModule.java:38) and may not be redefined by
org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
KaptchaProducerImpl.java:34) via
domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33).
You should rename one of the service builder methods.

This is appmodule
import org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl;
import org.apache.tapestry5.kaptcha.services.KaptchaProducer;

 public static void bind(ServiceBinder binder) {
  // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
  // Make bind() calls on the binder object to define most IoC services.
  // Use service builder methods (example below) when the implementation
  // is provided inline, or requires more initialization than simply
  // invoking the constructor.
  binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
 }
Added library's
tapestry-kaptcha-5.3.7.jar
 kaptcha-2.3.2.jar
kaptcha-2.3.2-jdk14.jar

What should be renamed?
Thanks for help

-- 
Pozdrav Nikola Vulovic


formfragment and cant find visible parameter error

2013-05-26 Thread Nikola Vulovic
simple fix form fragment must be written in one line in html
t:formfragment t:id=id visible=showBool
...
/t:formfragment
if its written like
t:formfragment
t:id=id
visible=showBool
...
/t:formfragment
page gets error exeption
-- 
Pozdrav Nikola Vulovic


Re: FormFragment checkbox not working

2013-05-20 Thread Nikola Vulovic
behaviour is completely the same with and with out
(PersistenceConstant.FLASH)


On Sun, May 19, 2013 at 11:10 PM, Nikola Vulovic nivuk...@gmail.com wrote:

 formfragment is shown when checkox renew is not checked



 On Sun, May 19, 2013 at 5:28 PM, Nikola Vulovic nivuk...@gmail.comwrote:

 tml file
 html t:type=layout title=${message:title}
   xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;
   xmlns:p=tapestry:parameter
 !-- Most of the page content, including head, body, etc. tags,
 comes from Layout.tml --


 !-- A Zone is a component that can be updated in place, triggered by
 other components. --
 t:navbar/
 t:finances/
 t:if t:test=clientExists
 t:delegate to=block:addExpenseBlock/
 t:delegate to=block:currencySelectBlock/
 t:delegate to=block:myExpenseListBlock/
 t:delegate to=block:trustedExpenseListBlock/
 t:if t:test=admin
 t:delegate to=block:fullExpenseListBlock/
 /t:if
 /t:if
 t:block id=addExpenseBlock
 t:zone t:id=addExpenseZone
 t:form t:id=addExpenseForm
 table  border=0
 thead
 tr
  th colspan=2
 Add new expense form
 hr/
 /th
 /tr
 /thead
 tbody
 tr
 td
 t:label for=recepient/(*):
 /td
 td
 input t:type=TextField t:id=recepient
 value=recepientValue/
 /td
 /tr
 tr
 td

 t:label for=purposeOfPayment/(*):
 /td
 td
 input t:type=TextField t:id=purposeOfPayment
 value=purposeOfPaymentValue/
 /td
 /tr
 trtd
 t:label for=currency/(*):
 /td
 td
 input t:type=TextField t:id=currency
 value=currencyValue/
 /td
 /tr
 tr
 td
 t:label for=amount/(*):
 /td
 td
 input  type=number step=any
  t:type=TextField t:id=amount value=amountValue/
 /td
 /tr
 tr
 td
 t:label for=renew/:
 /td
 td
 t:checkbox t:id=renew
 t:mixins=triggerfragment fragment=f1/
 /td
 /tr
 t:formfragment t:id=f1 visible=renew hide=fade
 tr
 td colspan=2
 Calculate payment from
 /td
 /tr
 tr
 td
 t:label for=dateOfPayment/(*):
 /td
 td
 input type=date  t:type=TextField
 t:id=dateOfPayment value=dateOfPaymentValue /
 /td
 /tr
 tr
 td colspan=2
 Repeat payment every
 /td
 /tr
 tr
 td
 t:label for=number/(*):
 /td
 td
 input type=number t:type=TextField
 t:id=number  value=numberValue/
 /td
 /tr
 tr
 td
 t:label for=timeUnit/(*):
 /td
 td
 select t:type=Select t:id=timeUnit
 t:model=literal:day,week,month,year t:value=timeUnitValue/
 /td
 /tr
 tr
 td colspan=2
 Calculate payment until
 /td
 /tr
 tr
 td
 t:label for=endDate/(*):
 /td
 td
 input type=date  t:type=TextField
 t:id=endDate value=endDateValue /
 /td
 /tr
 /t:formfragment
 tr
 td

Re: FormFragment checkbox not working

2013-05-20 Thread Nikola Vulovic
component does not work because of table tag works without it.


On Mon, May 20, 2013 at 9:45 AM, Nikola Vulovic nivuk...@gmail.com wrote:

 behaviour is completely the same with and with out
 (PersistenceConstant.FLASH)


 On Sun, May 19, 2013 at 11:10 PM, Nikola Vulovic nivuk...@gmail.comwrote:

 formfragment is shown when checkox renew is not checked



 On Sun, May 19, 2013 at 5:28 PM, Nikola Vulovic nivuk...@gmail.comwrote:

 tml file
 html t:type=layout title=${message:title}
   xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;
   xmlns:p=tapestry:parameter
 !-- Most of the page content, including head, body, etc. tags,
 comes from Layout.tml --


 !-- A Zone is a component that can be updated in place, triggered
 by other components. --
 t:navbar/
 t:finances/
 t:if t:test=clientExists
 t:delegate to=block:addExpenseBlock/
 t:delegate to=block:currencySelectBlock/
 t:delegate to=block:myExpenseListBlock/
 t:delegate to=block:trustedExpenseListBlock/
 t:if t:test=admin
 t:delegate to=block:fullExpenseListBlock/
 /t:if
 /t:if
 t:block id=addExpenseBlock
 t:zone t:id=addExpenseZone
 t:form t:id=addExpenseForm
 table  border=0
 thead
 tr
  th colspan=2
 Add new expense form
 hr/
 /th
 /tr
 /thead
 tbody
 tr
 td
 t:label for=recepient/(*):
 /td
 td
 input t:type=TextField t:id=recepient
 value=recepientValue/
 /td
 /tr
 tr
 td

 t:label for=purposeOfPayment/(*):
 /td
 td
 input t:type=TextField
 t:id=purposeOfPayment value=purposeOfPaymentValue/
 /td
 /tr
 trtd
 t:label for=currency/(*):
 /td
 td
 input t:type=TextField t:id=currency
 value=currencyValue/
 /td
 /tr
 tr
 td
 t:label for=amount/(*):
 /td
 td
 input  type=number step=any
  t:type=TextField t:id=amount value=amountValue/
 /td
 /tr
 tr
 td
 t:label for=renew/:
 /td
 td
 t:checkbox t:id=renew
 t:mixins=triggerfragment
 fragment=f1/
 /td
 /tr
 t:formfragment t:id=f1 visible=renew
 hide=fade
 tr
 td colspan=2
 Calculate payment from
 /td
 /tr
 tr
 td
 t:label for=dateOfPayment/(*):
 /td
 td
 input type=date  t:type=TextField
 t:id=dateOfPayment value=dateOfPaymentValue /
 /td
 /tr
 tr
 td colspan=2
 Repeat payment every
 /td
 /tr
 tr
 td
 t:label for=number/(*):
 /td
 td
 input type=number t:type=TextField
 t:id=number  value=numberValue/
 /td
 /tr
 tr
 td
 t:label for=timeUnit/(*):
 /td
 td
 select t:type=Select t:id=timeUnit
 t:model=literal:day,week,month,year t:value=timeUnitValue/
 /td
 /tr
 tr
 td colspan=2
 Calculate payment until
 /td
 /tr
 tr
 td
 t:label for=endDate/(*):
 /td
 td
 input type=date  t:type=TextField
 t:id=endDate value=endDateValue /
 /td

Re: FormFragment checkbox not working

2013-05-19 Thread Nikola Vulovic
)
private String timeUnitValue;
@Property
@Persist(PersistenceConstants.FLASH)
private String endDateValue;
@Persist
@Property
private boolean renew;
@Property
@Persist
private String tableCurrencyValue;

void onPrepareForRender() {
myExpenseList =
expenseWebService.findMyExpenses(client.getClientUsername(),
tableCurrencyValue);
trustedExpenseList =
expenseWebService.findFriendsExpenses(client.getClientUsername(),
tableCurrencyValue);
fullExpenseList =
expenseWebService.findHomeExpenses(client.getClientUsername(),
tableCurrencyValue);

}

public Boolean getAdmin() {
if (clientExists) {
if (client.getClientType().equals(ClientType.ADMIN)) {
return Boolean.TRUE;
}
}
return Boolean.FALSE;
}

Object onActionFromMyExpenseRemove(String name) {
expenseWebService.destroyExpense(name, tableCurrencyValue,
client.getClientUsername());
return null;
}

void onValidateFromAddExpenseForm() {
}

Object onSuccessFromAddExpenseForm() {
tableCurrencyValue = currencyValue;
if (renew == Boolean.FALSE) {
Money makeExpenseOnce =
expenseWebService.makeExpenseOnce(recepientValue, purposeOfPaymentValue,
client.getClientUsername(), amountValue, currencyValue);
} else {
if (timeUnitValue.equalsIgnoreCase(day)) {
Money makeExpenseDay =
expenseWebService.makeExpenseDay(recepientValue, purposeOfPaymentValue,
client.getClientUsername(), amountValue, currencyValue, dateOfPaymentValue,
endDateValue, numberValue);
} else if (timeUnitValue.equalsIgnoreCase(week)) {
Money makeExpenseWeek =
expenseWebService.makeExpenseWeek(recepientValue, purposeOfPaymentValue,
client.getClientUsername(), amountValue, currencyValue, dateOfPaymentValue,
endDateValue, numberValue);
} else if (timeUnitValue.equalsIgnoreCase(month)) {
Money makeExpenseMonth =
expenseWebService.makeExpenseMonth(recepientValue, purposeOfPaymentValue,
client.getClientUsername(), amountValue, currencyValue, dateOfPaymentValue,
endDateValue, numberValue);
} else if (timeUnitValue.equalsIgnoreCase(year)) {
Money makeExpenseYear =
expenseWebService.makeExpenseYear(recepientValue, purposeOfPaymentValue,
client.getClientUsername(), amountValue, currencyValue, dateOfPaymentValue,
endDateValue, numberValue);
}
}
return null;
}
}


On Sun, May 19, 2013 at 4:17 PM, Nikola Vulovic nivuk...@gmail.com wrote:

 [image: Inline image 1]
 Code is provided attachments
 Some please tell me why is FormFragment displaying

 --
 nkv1




-- 
Pozdrav Nikola Vulovic


Re: FormFragment checkbox not working

2013-05-19 Thread Nikola Vulovic
formfragment is shown when checkox renew is not checked



On Sun, May 19, 2013 at 5:28 PM, Nikola Vulovic nivuk...@gmail.com wrote:

 tml file
 html t:type=layout title=${message:title}
   xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;
   xmlns:p=tapestry:parameter
 !-- Most of the page content, including head, body, etc. tags,
 comes from Layout.tml --


 !-- A Zone is a component that can be updated in place, triggered by
 other components. --
 t:navbar/
 t:finances/
 t:if t:test=clientExists
 t:delegate to=block:addExpenseBlock/
 t:delegate to=block:currencySelectBlock/
 t:delegate to=block:myExpenseListBlock/
 t:delegate to=block:trustedExpenseListBlock/
 t:if t:test=admin
 t:delegate to=block:fullExpenseListBlock/
 /t:if
 /t:if
 t:block id=addExpenseBlock
 t:zone t:id=addExpenseZone
 t:form t:id=addExpenseForm
 table  border=0
 thead
 tr
 th colspan=2
 Add new expense form
 hr/
 /th
 /tr
 /thead
 tbody
 tr
 td
 t:label for=recepient/(*):
 /td
 td
 input t:type=TextField t:id=recepient
 value=recepientValue/
 /td
 /tr
 tr
 td

 t:label for=purposeOfPayment/(*):
 /td
 td
 input t:type=TextField t:id=purposeOfPayment
 value=purposeOfPaymentValue/
 /td
 /tr
 trtd
 t:label for=currency/(*):
 /td
 td
 input t:type=TextField t:id=currency
 value=currencyValue/
 /td
 /tr
 tr
 td
 t:label for=amount/(*):
 /td
 td
 input  type=number step=any
  t:type=TextField t:id=amount value=amountValue/
 /td
 /tr
 tr
 td
 t:label for=renew/:
 /td
 td
 t:checkbox t:id=renew
 t:mixins=triggerfragment fragment=f1/
 /td
 /tr
 t:formfragment t:id=f1 visible=renew hide=fade
 tr
 td colspan=2
 Calculate payment from
 /td
 /tr
 tr
 td
 t:label for=dateOfPayment/(*):
 /td
 td
 input type=date  t:type=TextField
 t:id=dateOfPayment value=dateOfPaymentValue /
 /td
 /tr
 tr
 td colspan=2
 Repeat payment every
 /td
 /tr
 tr
 td
 t:label for=number/(*):
 /td
 td
 input type=number t:type=TextField
 t:id=number  value=numberValue/
 /td
 /tr
 tr
 td
 t:label for=timeUnit/(*):
 /td
 td
 select t:type=Select t:id=timeUnit
 t:model=literal:day,week,month,year t:value=timeUnitValue/
 /td
 /tr
 tr
 td colspan=2
 Calculate payment until
 /td
 /tr
 tr
 td
 t:label for=endDate/(*):
 /td
 td
 input type=date  t:type=TextField
 t:id=endDate value=endDateValue /
 /td
 /tr
 /t:formfragment
 tr
 td
 input t:type=Submit t:id=add value=Add
 expense/
 /td
 td
 input type=reset value