2012/10/25 Tony Giaccone <[email protected]>:
> So here's what I've discovered, when I eliminate the TabbedPanel and place
> my custom edit panel with its form and submit button directly on the page as
> a single control, it works exactly as I would expect. The onSaveClicked
> method gets called.
>
> However, when I embed the same panel in a TabbedPanel Control the
> onSaveClicked method does not get called.

I can be totally wrong here, but I think you can not implement any
control action event in the control's itself - you can define it on
control. But implementation, only in the page class.
Maybe Bob or Malcolm, will guide us in this problem.

Gilberto

>
> Can someone explain why this would be the case, and how I should go about
> solving this problem?
>
>
> Tony Giaccone
>
>
> On Thu, Oct 25, 2012 at 9:51 AM, Tony Giaccone <[email protected]> wrote:
>>
>> Yes, I have the value set to trace. Which I believe is a higher level then
>> debug, but I wasn't paying attention to it. I'll look at it now and see if
>> that helps me find the problem.
>>
>> Tony
>>
>>
>> On Thu, Oct 25, 2012 at 8:45 AM, Gilberto <[email protected]> wrote:
>>>
>>> Hi, Tony!
>>> Have you enabled the debug mode[1]? That could help!
>>>
>>>
>>> Gilberto
>>> [1]
>>> http://click.apache.org/docs/user-guide/htmlsingle/click-book.html#application-mode
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Tony Giaccone <[email protected]>
>>> Date: 2012/10/24
>>> Subject:
>>> To: [email protected]
>>>
>>>
>>> I'm learning click and having a small problem.
>>>
>>> I have a Page that has a border component.
>>>
>>> In that page, I have a TabbedPanel. The Panel has two tabs, each Tab
>>> is a panel that is implemented by sub-classing Panel
>>>
>>> public class NoticeTemplatePage extends BorderPage {
>>>
>>> private TabbedPanel tabbedPanel = new TabbedPanel("tabbedPanel");
>>>
>>> public void onInit()
>>> {
>>> Panel listNoticeTemplatePanel = new
>>> ListNoticeTemplatePanel("listNoticeTemplatePanel");
>>> Panel editNoticeTemplatePanel = new
>>> EditNoticeTemplatePanel("editNoticeTemplatePanel");
>>> tabbedPanel.add(listNoticeTemplatePanel);
>>> tabbedPanel.add(editNoticeTemplatePanel);
>>> }
>>>
>>> }
>>>
>>>
>>> For the purposes of this question I'm going to ignore the
>>> listNoticeTemplatePanel. The EditNoticeTemplatePanel is defined like
>>> this:
>>>
>>>
>>> public class EditNoticeTemplatePanel extends Panel {
>>>
>>> public EditNoticeTemplatePanel(String name)
>>> {
>>> super(name,"panel/notice/editNotice.htm");
>>> }
>>>
>>> public boolean onSaveClicked() {
>>> return(true);
>>> }
>>> public void onInit()
>>> {
>>> super.onInit();
>>>
>>> //there's stuff that's been removed that defines the fields on the form
>>>
>>> noticeTemplateCreationForm.add(new Submit("save", "Save", this,
>>> "onSaveClicked"));
>>> noticeTemplateCreationForm.add(new Submit("cancel","Cancel", this,
>>> "onCancelClicked"));
>>> }
>>> }
>>>
>>> The problem is that when the save button is clicked the
>>> onSaveClickedMethod on this page is never called.  I have a similar
>>> construct on a page and that gets called.  What am I missing?
>>>
>>>
>>> Tony
>>
>>
>

Reply via email to