Which is the best way to manage the visibility of a component?

2012-07-29 Thread Alberto
Hi,

I'm using wicket 1.5.7 and I have the following scenario.
A page with two DropDownChoice that we will call A and B. Values of B
depend on value of A and are updated by Ajax.
Then a WebMarkupContainer component that we will call C. The visibility
of C depends on value of B.
I added in the method onUpdate of
AjaxFormComponentUpdatingBehavior(onchange) of B some statements  to
check the value of B and set the visibility of C accordingly.
But it's triggered only when the user change the value of B. That value
can be changed by ajax when the user change the value of A.
So, which is the best practice to deal with this kind of problem?
I have to add the same code in the
AjaxFormComponentUpdatingBehavior(onchange) of A too? Is there a
better solution avoiding duplication of code?

Best regards

Alberto

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Which is the best way to manage the visibility of a component?

2012-07-29 Thread kshitiz
You can write the code in a separate method and call that method from A and
B...



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Which-is-the-best-way-to-manage-the-visibility-of-a-component-tp4650853p4650854.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Which is the best way to manage the visibility of a component?

2012-07-29 Thread Dan Retzlaff
You could override C's onConfigure() to set its visibility based on B, and
override C's onEvent() to add C to the ART if it's current visibility is
wrong.
https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-Defaultajaxevent

On Sun, Jul 29, 2012 at 6:17 AM, Alberto abros...@ogs.trieste.it wrote:

 Hi,

 I'm using wicket 1.5.7 and I have the following scenario.
 A page with two DropDownChoice that we will call A and B. Values of B
 depend on value of A and are updated by Ajax.
 Then a WebMarkupContainer component that we will call C. The visibility
 of C depends on value of B.
 I added in the method onUpdate of
 AjaxFormComponentUpdatingBehavior(onchange) of B some statements  to
 check the value of B and set the visibility of C accordingly.
 But it's triggered only when the user change the value of B. That value
 can be changed by ajax when the user change the value of A.
 So, which is the best practice to deal with this kind of problem?
 I have to add the same code in the
 AjaxFormComponentUpdatingBehavior(onchange) of A too? Is there a
 better solution avoiding duplication of code?

 Best regards

 Alberto

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




HTTPS FORM POST FROM EXTERNAL SITE TO WICKET WEBPAGE

2012-07-29 Thread hannach
Hi there,

I need to provide returnURL for payment portal like Paypal.
I created bookmarkable WebPage called paymentResultPage and path is called
pay_result.
Once user is done with payment, this portal will do the HTTPS form POST (not
GET) to the returnURL returning whether payment went successful or not so I
can record that in DB.

The problem is webpage's constuctor 
public PaymentResultPage(PageParameters pageparameters) doesn't catch the
fields that are passed via form post when I provided url like
http://www.abcd.com/pay_result.

How can I get the values that are form posted from external site to the
wicket page?

Do I have to pass things like
?form7_hf_0=wicket%3Ainterface=%3A1%3Aform%3A%3AIFormSubmitListener?

Any suggestion would be great thanks.






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HTTPS-FORM-POST-FROM-EXTERNAL-SITE-TO-WICKET-WEBPAGE-tp4650857.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: HTTPS FORM POST FROM EXTERNAL SITE TO WICKET WEBPAGE

2012-07-29 Thread hannach
Thanks for the reply.
I don't think Webpage is called at all. Do I need to add crazy wicket url
like
pay_result?form7_hf_0=wicket%3Ainterface=%3A1%3Aform%3A%3AIFormSubmitListener
in returnURL in order to get what's been submitted from external site to my 
web page?

Perhaps it's HTTPS and it's using POST method to submit a form?
But it should work same as GET method that passed via query string (e.g.
www.mywicketsite.com/pay_result?status=success) right?

parameters.getString(status)







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HTTPS-FORM-POST-FROM-EXTERNAL-SITE-TO-WICKET-WEBPAGE-tp4650857p4650859.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: HTTPS FORM POST FROM EXTERNAL SITE TO WICKET WEBPAGE

2012-07-29 Thread Dan Retzlaff
If your constructor isn't being called, you have something more basic to
figure out. I just tested with a quickstart, and it worked as expected. See
https://gist.github.com/3204518. Hitting localhost:8080 shows value is not
specified, then submitting the (non-Wicketized) form shows value is
whatever I entered.

On Sun, Jul 29, 2012 at 8:36 PM, hannach hann...@solutiondynamics.comwrote:

 Thanks for the reply.
 I don't think Webpage is called at all. Do I need to add crazy wicket url
 like

 pay_result?form7_hf_0=wicket%3Ainterface=%3A1%3Aform%3A%3AIFormSubmitListener
 in returnURL in order to get what's been submitted from external site to my
 web page?

 Perhaps it's HTTPS and it's using POST method to submit a form?
 But it should work same as GET method that passed via query string (e.g.
 www.mywicketsite.com/pay_result?status=success) right?

 parameters.getString(status)







 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/HTTPS-FORM-POST-FROM-EXTERNAL-SITE-TO-WICKET-WEBPAGE-tp4650857p4650859.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org