You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Dale Herrig <da...@osi.com> on 2010/08/10 02:10:41 UTC

jsr 286

Does click support jsr 286 and inter-portlet communication.


Thanks,

Re: Doubt in using ActionButton

Posted by Andre Gustavo Lomonaco <lo...@ipplus.com.br>.
Hi Sven,

Thanks a Lot for you help...

One last question.. For me only works if the ActionButton was part of the 
Form. Is really necessary or I did some mistake ??

----- Original Message ----- 
From: "Sven Pfeiffer" <sv...@madsep.de>
To: <us...@click.apache.org>
Sent: Thursday, August 12, 2010 1:21 PM
Subject: Re: Doubt in using ActionButton


Hi Andre,

when you click the button a POST request is sendet to the server.
The id is not part of the POST-requests url, all parameter of the
GET-request are removed in the forms action attribute.

You could add a HiddenField to your Form, in onGet() you populate the
HiddenField with the ID, in onButtonClick you read the id from your
HiddenField.

hth
SVen

Andre Gustavo Lomonaco wrote:
> Hi Stephan, thanks for your reply
>
> You are correct about redirecting from a page with a table to the page 
> with the button...
> I did what you send me and in onInit() method I got the id value with no 
> problem...
>
> But how can I get this value in the onButtonClick method ???
> for example, the result of 
> System.out.println(getContext().getRequest().getParameter("id")); in 
> onButtonClick method is null
> I think all I want is keep the parameter id when I click the Action Button
>
> Thanks for your help
> Regards.
> Andre Gustavo Lomonaco
>
> ----- Original Message ----- From: "Kennedy, Stephan" 
> <st...@siemens-enterprise.com>
> To: <us...@click.apache.org>
> Sent: Thursday, August 12, 2010 12:10 PM
> Subject: AW: Doubt in using ActionButton
>
>
> Hi Andre
>
> If I understand correctly you are redirecting from a page with a table to 
> the page with the button?
> Have you tried reading the id from the request in your onInit() method in 
> EditRoteadorSnmp?
> E.g.
> @Override
> public void onInit() {
> super.onInit();
>            id = getContext().getRequest().getParameter("id");
>      }
>
> Regards
> Stephan
>
> -----Ursprüngliche Nachricht-----
> Von: 
> user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org 
> [mailto:user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org] 
> Im Auftrag von Andre Gustavo Lomonaco
> Gesendet: Donnerstag, 12. August 2010 16:47
> An: user@click.apache.org
> Betreff: Doubt in using ActionButton
>
> Hi,
>
> Using the Click Examples, I'm trying to put a ActionButton in a Edit Page
> but I cannot make work.. Here my doubt
>
> After the user choose the correct row in the table, the user is redirect 
> to
> the EditRoteadorSNMP Page
>
> http://192.168.80.110:8080/NetworkAdvisor/edit/edit-roteador-snmp.htm?id=200&referrer=%2Ftable%2Froteador-table.htm
>
> You can see the id is equal 200
>
> The form in this page works nice and permit the user edit the row with id 
> =
> 200
>
> I add in this same page, one ActionButton, not inside the Form...
>
> My doubt is why I cannot get the id value after the user click this Action
> Button
>
> Here the code
>
> public class EditRoteadorSnmp extends BorderPage {
>
>   private Form form = new Form("form");
>   protected ActionButton button = new ActionButton("action");
>  @Bindable protected Integer id;
> .....
>
> public EditRoteadorSnmp() {
>
>        addControl(form);
>        addControl(button);
>        button.setListener(this, "onButtonClick");
> ........
>
> public boolean onButtonClick() {
>
>        System.out.println(id);                ---- why I receive the NULL
> value here ------------------
> }
>
> Thanks in Advanced
>
> My Best Regards
>
> Andre Gustavo Lomonaco
>
>
>
>
>
>
>
>
>
>







Re: Doubt in using ActionButton

Posted by Sven Pfeiffer <sv...@madsep.de>.
Hi Andre,

when you click the button a POST request is sendet to the server.
The id is not part of the POST-requests url, all parameter of the 
GET-request are removed in the forms action attribute.

You could add a HiddenField to your Form, in onGet() you populate the 
HiddenField with the ID, in onButtonClick you read the id from your 
HiddenField.

hth
SVen

Andre Gustavo Lomonaco wrote:
> Hi Stephan, thanks for your reply
>
> You are correct about redirecting from a page with a table to the page 
> with the button...
> I did what you send me and in onInit() method I got the id value with 
> no problem...
>
> But how can I get this value in the onButtonClick method ???
> for example, the result of 
> System.out.println(getContext().getRequest().getParameter("id")); in 
> onButtonClick method is null
> I think all I want is keep the parameter id when I click the Action 
> Button
>
> Thanks for your help
> Regards.
> Andre Gustavo Lomonaco
>
> ----- Original Message ----- From: "Kennedy, Stephan" 
> <st...@siemens-enterprise.com>
> To: <us...@click.apache.org>
> Sent: Thursday, August 12, 2010 12:10 PM
> Subject: AW: Doubt in using ActionButton
>
>
> Hi Andre
>
> If I understand correctly you are redirecting from a page with a table 
> to the page with the button?
> Have you tried reading the id from the request in your onInit() method 
> in EditRoteadorSnmp?
> E.g.
> @Override
> public void onInit() {
> super.onInit();
>            id = getContext().getRequest().getParameter("id");
>      }
>
> Regards
> Stephan
>
> -----Ursprüngliche Nachricht-----
> Von: 
> user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org 
> [mailto:user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org] 
> Im Auftrag von Andre Gustavo Lomonaco
> Gesendet: Donnerstag, 12. August 2010 16:47
> An: user@click.apache.org
> Betreff: Doubt in using ActionButton
>
> Hi,
>
> Using the Click Examples, I'm trying to put a ActionButton in a Edit Page
> but I cannot make work.. Here my doubt
>
> After the user choose the correct row in the table, the user is 
> redirect to
> the EditRoteadorSNMP Page
>
> http://192.168.80.110:8080/NetworkAdvisor/edit/edit-roteador-snmp.htm?id=200&referrer=%2Ftable%2Froteador-table.htm 
>
>
> You can see the id is equal 200
>
> The form in this page works nice and permit the user edit the row with 
> id =
> 200
>
> I add in this same page, one ActionButton, not inside the Form...
>
> My doubt is why I cannot get the id value after the user click this 
> Action
> Button
>
> Here the code
>
> public class EditRoteadorSnmp extends BorderPage {
>
>   private Form form = new Form("form");
>   protected ActionButton button = new ActionButton("action");
>  @Bindable protected Integer id;
> .....
>
> public EditRoteadorSnmp() {
>
>        addControl(form);
>        addControl(button);
>        button.setListener(this, "onButtonClick");
> ........
>
> public boolean onButtonClick() {
>
>        System.out.println(id);                ---- why I receive the NULL
> value here ------------------
> }
>
> Thanks in Advanced
>
> My Best Regards
>
> Andre Gustavo Lomonaco
>
>
>
>
>
>
>
>
>
>



Re: Doubt in using ActionButton

Posted by Andre Gustavo Lomonaco <lo...@ipplus.com.br>.
Hi Stephan, thanks for your reply

You are correct about redirecting from a page with a table to the page with 
the button...
I did what you send me and in onInit() method I got the id value with no 
problem...

But how can I get this value in the onButtonClick method ???
for example, the result of 
System.out.println(getContext().getRequest().getParameter("id")); in 
onButtonClick method is null
I think all I want is keep the parameter id when I click the Action Button

Thanks for your help
Regards.
Andre Gustavo Lomonaco

----- Original Message ----- 
From: "Kennedy, Stephan" <st...@siemens-enterprise.com>
To: <us...@click.apache.org>
Sent: Thursday, August 12, 2010 12:10 PM
Subject: AW: Doubt in using ActionButton


Hi Andre

If I understand correctly you are redirecting from a page with a table to 
the page with the button?
Have you tried reading the id from the request in your onInit() method in 
EditRoteadorSnmp?
E.g.
@Override
public void onInit() {
super.onInit();
            id = getContext().getRequest().getParameter("id");
      }

Regards
Stephan

-----Ursprüngliche Nachricht-----
Von: 
user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org 
[mailto:user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org] 
Im Auftrag von Andre Gustavo Lomonaco
Gesendet: Donnerstag, 12. August 2010 16:47
An: user@click.apache.org
Betreff: Doubt in using ActionButton

Hi,

Using the Click Examples, I'm trying to put a ActionButton in a Edit Page
but I cannot make work.. Here my doubt

After the user choose the correct row in the table, the user is redirect to
the EditRoteadorSNMP Page

http://192.168.80.110:8080/NetworkAdvisor/edit/edit-roteador-snmp.htm?id=200&referrer=%2Ftable%2Froteador-table.htm

You can see the id is equal 200

The form in this page works nice and permit the user edit the row with id =
200

I add in this same page, one ActionButton, not inside the Form...

My doubt is why I cannot get the id value after the user click this Action
Button

Here the code

public class EditRoteadorSnmp extends BorderPage {

   private Form form = new Form("form");
   protected ActionButton button = new ActionButton("action");
  @Bindable protected Integer id;
.....

 public EditRoteadorSnmp() {

        addControl(form);
        addControl(button);
        button.setListener(this, "onButtonClick");
........

public boolean onButtonClick() {

        System.out.println(id);                ---- why I receive the NULL
value here ------------------
}

Thanks in Advanced

My Best Regards

Andre Gustavo Lomonaco









AW: Doubt in using ActionButton

Posted by "Kennedy, Stephan" <st...@siemens-enterprise.com>.
Hi Andre

If I understand correctly you are redirecting from a page with a table to the page with the button?
Have you tried reading the id from the request in your onInit() method in EditRoteadorSnmp?
E.g.
	@Override
	public void onInit() {
		super.onInit();
            id = getContext().getRequest().getParameter("id"); 
      }

Regards
Stephan

-----Ursprüngliche Nachricht-----
Von: user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org [mailto:user-return-1480-stephan.kennedy=siemens-enterprise.com@click.apache.org] Im Auftrag von Andre Gustavo Lomonaco
Gesendet: Donnerstag, 12. August 2010 16:47
An: user@click.apache.org
Betreff: Doubt in using ActionButton

Hi,

Using the Click Examples, I'm trying to put a ActionButton in a Edit Page 
but I cannot make work.. Here my doubt

After the user choose the correct row in the table, the user is redirect to 
the EditRoteadorSNMP Page

http://192.168.80.110:8080/NetworkAdvisor/edit/edit-roteador-snmp.htm?id=200&referrer=%2Ftable%2Froteador-table.htm

You can see the id is equal 200

The form in this page works nice and permit the user edit the row with id = 
200

I add in this same page, one ActionButton, not inside the Form...

My doubt is why I cannot get the id value after the user click this Action 
Button

Here the code

public class EditRoteadorSnmp extends BorderPage {

   private Form form = new Form("form");
   protected ActionButton button = new ActionButton("action");
  @Bindable protected Integer id;
.....

 public EditRoteadorSnmp() {

        addControl(form);
        addControl(button);
        button.setListener(this, "onButtonClick");
........

public boolean onButtonClick() {

        System.out.println(id);                ---- why I receive the NULL 
value here ------------------
}

Thanks in Advanced

My Best Regards

Andre Gustavo Lomonaco 





Doubt in using ActionButton

Posted by Andre Gustavo Lomonaco <lo...@ipplus.com.br>.
Hi,

Using the Click Examples, I'm trying to put a ActionButton in a Edit Page 
but I cannot make work.. Here my doubt

After the user choose the correct row in the table, the user is redirect to 
the EditRoteadorSNMP Page

http://192.168.80.110:8080/NetworkAdvisor/edit/edit-roteador-snmp.htm?id=200&referrer=%2Ftable%2Froteador-table.htm

You can see the id is equal 200

The form in this page works nice and permit the user edit the row with id = 
200

I add in this same page, one ActionButton, not inside the Form...

My doubt is why I cannot get the id value after the user click this Action 
Button

Here the code

public class EditRoteadorSnmp extends BorderPage {

   private Form form = new Form("form");
   protected ActionButton button = new ActionButton("action");
  @Bindable protected Integer id;
.....

 public EditRoteadorSnmp() {

        addControl(form);
        addControl(button);
        button.setListener(this, "onButtonClick");
........

public boolean onButtonClick() {

        System.out.println(id);                ---- why I receive the NULL 
value here ------------------
}

Thanks in Advanced

My Best Regards

Andre Gustavo Lomonaco 





Re: jsr 286

Posted by Andrei Ionescu <ai...@yahoo.com>.
> Click does not support the Portlet specifications and there are
> currently no plans to support the Portlet spec.
Dale, this: http://tinyurl.com/why-no-portlet

might explain why Portlets are not on the current roadmap.

regards,
Andrei.


Re: jsr 286

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Dale,

Click does not support the Portlet specifications and there are
currently no plans to support the Portlet spec.

regards Malcolm Edgar

On Tue, Aug 10, 2010 at 10:10 AM, Dale Herrig <da...@osi.com> wrote:
>
> Does click support jsr 286 and inter-portlet communication.
>
> Thanks,
>