Re: Problem with TabbedPanel / setResponePage refreshing

2018-02-13 Thread Martin Grigorov
Hi,

Component#onDetach() is called at the end of the request cycle.
MarkupContainer#removeAll() is not called usually during the request cycle.
#remove() merhods are like #add() - usually used by the application /
libraries, not by the framework.

Martin Grigorov
Wicket Training and Consulting
Looking for a remote position with Wicket ? Contact me!
https://twitter.com/mtgrigorov


On Mon, Feb 12, 2018 at 2:17 PM, Jarosław Ciarkowski 
wrote:

> Hello,
> I guess my last mail was to complex so I'll try to simplify it:
>
> Why children's "onRemove" method is not called when "setResponsePage" is
> called?
> As I've written previously - manually invoking "page.removeAll()" works
> but shouldn't it be called automatically?
>
> Jarek
>
>
>
> On 09.02.2018 11:49, Jarosław Ciarkowski wrote:
>
>> Hello,
>>
>> I have one question regarding refreshing page with TabbedPanel and
>> refreshing page with setResponsePage method.
>>
>> In my application I had AjaxTabbedPanels. I needed to show confirmation
>> window on tab change though.
>> I've already had it on "window.onbeforeunload", so I changed
>> AjaxTabbedPanels to TabbedPanels - which refreshes page on tab change.
>>
>> The next thing was to do the same thing on button click. It works fine
>> with setResponsePage but...
>>
>> I have 2 actions which need to be called - one on page's child removal
>> and the second one on page refresh.
>>
>> Right now I call them on child's "onRemove" method and page's
>> "onInitialize" method.
>>
>> The problem is - when I change tab in TabbedPanel "onRemove" is called
>> but "onInitialize" isn't.
>> When I call setResponsePage (to the same page) it's the other way around
>> - "onInitialaze" is called but not "onRemove".
>>
>> I've got over it with manual call "page.removeAll()" right before
>> setResponsePage, but it solves only half of the problem and for me it looks
>> like a wrong solution.
>>
>> Is there any way to "catch" in the page class that it was refreshed by
>> the TabbedPanel? Is there better way to call "onRemove" with
>> setResponsePage than "page.removeAll()"? Or maybe there is a better way to
>> refresh a page than setResponsePage?
>>
>> I would be glad to receive some help.
>>
>> Thanks,
>> Jarek
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Problem with TabbedPanel / setResponePage refreshing

2018-02-12 Thread Jarosław Ciarkowski

Hello,
I guess my last mail was to complex so I'll try to simplify it:

Why children's "onRemove" method is not called when "setResponsePage" is 
called?
As I've written previously - manually invoking "page.removeAll()" works 
but shouldn't it be called automatically?


Jarek


On 09.02.2018 11:49, Jarosław Ciarkowski wrote:

Hello,

I have one question regarding refreshing page with TabbedPanel and 
refreshing page with setResponsePage method.


In my application I had AjaxTabbedPanels. I needed to show 
confirmation window on tab change though.
I've already had it on "window.onbeforeunload", so I changed 
AjaxTabbedPanels to TabbedPanels - which refreshes page on tab change.


The next thing was to do the same thing on button click. It works fine 
with setResponsePage but...


I have 2 actions which need to be called - one on page's child removal 
and the second one on page refresh.


Right now I call them on child's "onRemove" method and page's 
"onInitialize" method.


The problem is - when I change tab in TabbedPanel "onRemove" is called 
but "onInitialize" isn't.
When I call setResponsePage (to the same page) it's the other way 
around - "onInitialaze" is called but not "onRemove".


I've got over it with manual call "page.removeAll()" right before 
setResponsePage, but it solves only half of the problem and for me it 
looks like a wrong solution.


Is there any way to "catch" in the page class that it was refreshed by 
the TabbedPanel? Is there better way to call "onRemove" with 
setResponsePage than "page.removeAll()"? Or maybe there is a better 
way to refresh a page than setResponsePage?


I would be glad to receive some help.

Thanks,
Jarek




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



Problem with TabbedPanel / setResponePage refreshing

2018-02-09 Thread Jarosław Ciarkowski

Hello,

I have one question regarding refreshing page with TabbedPanel and 
refreshing page with setResponsePage method.


In my application I had AjaxTabbedPanels. I needed to show confirmation 
window on tab change though.
I've already had it on "window.onbeforeunload", so I changed 
AjaxTabbedPanels to TabbedPanels - which refreshes page on tab change.


The next thing was to do the same thing on button click. It works fine 
with setResponsePage but...


I have 2 actions which need to be called - one on page's child removal 
and the second one on page refresh.


Right now I call them on child's "onRemove" method and page's 
"onInitialize" method.


The problem is - when I change tab in TabbedPanel "onRemove" is called 
but "onInitialize" isn't.
When I call setResponsePage (to the same page) it's the other way around 
- "onInitialaze" is called but not "onRemove".


I've got over it with manual call "page.removeAll()" right before 
setResponsePage, but it solves only half of the problem and for me it 
looks like a wrong solution.


Is there any way to "catch" in the page class that it was refreshed by 
the TabbedPanel? Is there better way to call "onRemove" with 
setResponsePage than "page.removeAll()"? Or maybe there is a better way 
to refresh a page than setResponsePage?


I would be glad to receive some help.

Thanks,
Jarek


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



Re: Reload TabbedPanel preserving active tab

2017-01-17 Thread Maxim Solodovnik
I see :)
I have removed "form" dialog from the tab
Maybe this report will help other users :)

Thanks for the hints :)

On Tue, Jan 17, 2017 at 6:35 PM, Sebastien  wrote:

> Hi Maxim,
>
> It seems that the dialog widget is not correctly *destroyed*, therefore the
> new dialog that come in replacement cannot be re-wired.
>
> You can put a breakpoint in JQueryDestroyListener#onBeforeRespond to see
> whether the dialog is taken into account in the destroy process. (I guess
> not, because only directly targeted component are referenced here IIRC)
> You can also look in the ajax-debug-window if you see the
> jQuery('#mydialog').destroy() statement in the "priority-evaluate" section
> (I guess not, too)
>
> Otherwise, you have other workarounds:
> 1/ removing the dialog from the tab-panel :)
> 2/ calling mydialog#destroy *before* the ajax call (tough an
> AjaxCallListener, see #updateAjaxAttributes)
> 3/ calling mydialog#destroy in the response, trough
> handler.prependJavaScript(JQueryUtils.trycatch("jQuery('
> #mydialog').destroy()"));
> - I would opt for this one. you can look at [1]
>
> Hope this helps,
> Sebastien.
>
> [1]
> https://github.com/sebfz1/wicket-jquery-ui/blob/master/
> wicket-jquery-ui/src/main/java/com/googlecode/wicket/
> jquery/ui/JQueryUIBehavior.java#L136
>
>
>
> On Tue, Jan 17, 2017 at 11:50 AM, Maxim Solodovnik 
> wrote:
>
> > Hello Sebastien,
> >
> > I'm using jquery TabbedPanel.
> > One of the panels contains jquery dialog with simple form (text field and
> > one of the dialog buttons works as submit)
> > I'm now getting weird component has been removed from page errors
> > It seems
> >
> > tabs.reload(handler);
> >
> > re-creates the panel, but doesn't re-create dialog :(
> > (dialog seems to be added to the  as hidden div, and not being
> > updated)
> >
> > Is it possible?
> > Are there any workarounds except removing dialog from the tab-panel?
> >
> >
> >
> > On Sun, Jan 15, 2017 at 12:30 AM, Sebastien  wrote:
> >
> > > Transferring to users@, I did not realized I reply to you only
> Maxim...
> > >
> > >
> > > -- Forwarded message --
> > > From: Maxim Solodovnik 
> > > Date: Sat, Jan 14, 2017 at 5:13 PM
> > > Subject: Re: Reload TabbedPanel preserving active tab
> > > To: Sebastien 
> > >
> > >
> > > Thanks a lot Sebastien!
> > > Works as expected :)
> > >
> > > On Sat, Jan 14, 2017 at 8:31 PM, Sebastien  wrote:
> > >
> > > > Oops, forgot something in the copy paste:
> > > >
> > > > this.tabPanel = new TabbedPanel("tabs", this.newTabModel()) {
> > > >>
> > > >> private IModel indexModel = Model.of(-1);
> > > >>
> > > >> @Override
> > > >> protected void onConfigure()
> > > >> {
> > > >> super.onConfigure();
> > > >>
> > > >> int index = indexModel.getObject();
> > > >>
> > > >> if (index > -1) // TODO eventually also check if the
> > > >> corresponding tab is visible
> > > >> {
> > > >> this.setActiveTab(index);
> > > >> }
> > > >> }
> > > >>
> > > >> public void onActivate(AjaxRequestTarget target, int
> > index,
> > > >> ITab tab)
> > > >> {
> > > >> indexModel.setObject(index);
> > > >> }
> > > >> }
> > > >>
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>



-- 
WBR
Maxim aka solomax


Re: Reload TabbedPanel preserving active tab

2017-01-17 Thread Sebastien
Hi Maxim,

It seems that the dialog widget is not correctly *destroyed*, therefore the
new dialog that come in replacement cannot be re-wired.

You can put a breakpoint in JQueryDestroyListener#onBeforeRespond to see
whether the dialog is taken into account in the destroy process. (I guess
not, because only directly targeted component are referenced here IIRC)
You can also look in the ajax-debug-window if you see the
jQuery('#mydialog').destroy() statement in the "priority-evaluate" section
(I guess not, too)

Otherwise, you have other workarounds:
1/ removing the dialog from the tab-panel :)
2/ calling mydialog#destroy *before* the ajax call (tough an
AjaxCallListener, see #updateAjaxAttributes)
3/ calling mydialog#destroy in the response, trough
handler.prependJavaScript(JQueryUtils.trycatch("jQuery('#mydialog').destroy()"));
- I would opt for this one. you can look at [1]

Hope this helps,
Sebastien.

[1]
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/JQueryUIBehavior.java#L136



On Tue, Jan 17, 2017 at 11:50 AM, Maxim Solodovnik 
wrote:

> Hello Sebastien,
>
> I'm using jquery TabbedPanel.
> One of the panels contains jquery dialog with simple form (text field and
> one of the dialog buttons works as submit)
> I'm now getting weird component has been removed from page errors
> It seems
>
> tabs.reload(handler);
>
> re-creates the panel, but doesn't re-create dialog :(
> (dialog seems to be added to the  as hidden div, and not being
> updated)
>
> Is it possible?
> Are there any workarounds except removing dialog from the tab-panel?
>
>
>
> On Sun, Jan 15, 2017 at 12:30 AM, Sebastien  wrote:
>
> > Transferring to users@, I did not realized I reply to you only Maxim...
> >
> >
> > -- Forwarded message --
> > From: Maxim Solodovnik 
> > Date: Sat, Jan 14, 2017 at 5:13 PM
> > Subject: Re: Reload TabbedPanel preserving active tab
> > To: Sebastien 
> >
> >
> > Thanks a lot Sebastien!
> > Works as expected :)
> >
> > On Sat, Jan 14, 2017 at 8:31 PM, Sebastien  wrote:
> >
> > > Oops, forgot something in the copy paste:
> > >
> > > this.tabPanel = new TabbedPanel("tabs", this.newTabModel()) {
> > >>
> > >> private IModel indexModel = Model.of(-1);
> > >>
> > >> @Override
> > >> protected void onConfigure()
> > >> {
> > >> super.onConfigure();
> > >>
> > >> int index = indexModel.getObject();
> > >>
> > >> if (index > -1) // TODO eventually also check if the
> > >> corresponding tab is visible
> > >> {
> > >> this.setActiveTab(index);
> > >> }
> > >> }
> > >>
> > >> public void onActivate(AjaxRequestTarget target, int
> index,
> > >> ITab tab)
> > >> {
> > >> indexModel.setObject(index);
> > >> }
> > >> }
> > >>
> > >
> > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Re: Reload TabbedPanel preserving active tab

2017-01-17 Thread Maxim Solodovnik
Hello Sebastien,

I'm using jquery TabbedPanel.
One of the panels contains jquery dialog with simple form (text field and
one of the dialog buttons works as submit)
I'm now getting weird component has been removed from page errors
It seems

tabs.reload(handler);

re-creates the panel, but doesn't re-create dialog :(
(dialog seems to be added to the  as hidden div, and not being
updated)

Is it possible?
Are there any workarounds except removing dialog from the tab-panel?



On Sun, Jan 15, 2017 at 12:30 AM, Sebastien  wrote:

> Transferring to users@, I did not realized I reply to you only Maxim...
>
>
> -- Forwarded message --
> From: Maxim Solodovnik 
> Date: Sat, Jan 14, 2017 at 5:13 PM
> Subject: Re: Reload TabbedPanel preserving active tab
> To: Sebastien 
>
>
> Thanks a lot Sebastien!
> Works as expected :)
>
> On Sat, Jan 14, 2017 at 8:31 PM, Sebastien  wrote:
>
> > Oops, forgot something in the copy paste:
> >
> > this.tabPanel = new TabbedPanel("tabs", this.newTabModel()) {
> >>
> >> private IModel indexModel = Model.of(-1);
> >>
> >> @Override
> >> protected void onConfigure()
> >> {
> >> super.onConfigure();
> >>
> >> int index = indexModel.getObject();
> >>
> >> if (index > -1) // TODO eventually also check if the
> >> corresponding tab is visible
> >> {
> >> this.setActiveTab(index);
> >> }
> >> }
> >>
> >> public void onActivate(AjaxRequestTarget target, int index,
> >> ITab tab)
> >> {
> >> indexModel.setObject(index);
> >> }
> >> }
> >>
> >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax


Fwd: Reload TabbedPanel preserving active tab

2017-01-14 Thread Sebastien
Transferring to users@, I did not realized I reply to you only Maxim...


-- Forwarded message --
From: Maxim Solodovnik 
Date: Sat, Jan 14, 2017 at 5:13 PM
Subject: Re: Reload TabbedPanel preserving active tab
To: Sebastien 


Thanks a lot Sebastien!
Works as expected :)

On Sat, Jan 14, 2017 at 8:31 PM, Sebastien  wrote:

> Oops, forgot something in the copy paste:
>
> this.tabPanel = new TabbedPanel("tabs", this.newTabModel()) {
>>
>> private IModel indexModel = Model.of(-1);
>>
>> @Override
>> protected void onConfigure()
>> {
>> super.onConfigure();
>>
>> int index = indexModel.getObject();
>>
>> if (index > -1) // TODO eventually also check if the
>> corresponding tab is visible
>> {
>> this.setActiveTab(index);
>> }
>> }
>>
>> public void onActivate(AjaxRequestTarget target, int index,
>> ITab tab)
>> {
>> indexModel.setObject(index);
>> }
>> }
>>
>
>



-- 
WBR
Maxim aka solomax


Re: Reload TabbedPanel preserving active tab

2017-01-13 Thread Maxim Solodovnik
Jquery :)
Thaks a lot!

WBR, Maxim
(from mobile, sorry for the typos)

On Jan 14, 2017 01:30, "Sebastien"  wrote:

> Hi Maxim,
>
> good question! i think we can do it, i will have a look tomorrow... jquery
> or kendo ?
>
> best regards,
> sebastien
>
>
> On Jan 13, 2017 19:15, "Maxim Solodovnik"  wrote:
>
> Hello Sebastien,
>
> Is there any option to update TabbedPanel preserving active tab?
> Both
> tabs.reload(handler)
> and
> handler.add(tabs)
>
> resets active tab :(((
>
> or maybe if TabbedPanel was created as follows:
> new TabbedPanel("tabs", Arrays.asList(userTab, fileTab)).*setActiveTab*(0)
> it will be "re-assirned" on reload?
>
> --
> WBR
> Maxim aka solomax
>
>
>


Re: Reload TabbedPanel preserving active tab

2017-01-13 Thread Sebastien
Hi Maxim,

good question! i think we can do it, i will have a look tomorrow... jquery
or kendo ?

best regards,
sebastien


On Jan 13, 2017 19:15, "Maxim Solodovnik"  wrote:

Hello Sebastien,

Is there any option to update TabbedPanel preserving active tab?
Both
tabs.reload(handler)
and
handler.add(tabs)

resets active tab :(((

or maybe if TabbedPanel was created as follows:
new TabbedPanel("tabs", Arrays.asList(userTab, fileTab)).*setActiveTab*(0)
it will be "re-assirned" on reload?

-- 
WBR
Maxim aka solomax


Reload TabbedPanel preserving active tab

2017-01-13 Thread Maxim Solodovnik
Hello Sebastien,

Is there any option to update TabbedPanel preserving active tab?
Both
tabs.reload(handler)
and
handler.add(tabs)

resets active tab :(((

or maybe if TabbedPanel was created as follows:
new TabbedPanel("tabs", Arrays.asList(userTab, fileTab)).*setActiveTab*(0)
it will be "re-assirned" on reload?

-- 
WBR
Maxim aka solomax


Re: Title tab in Tabbedpanel

2014-12-18 Thread Sven Meier

Hi,

use a disabled tab:

http://apache-wicket.1842946.n4.nabble.com/AjaxTabbedPanel-Enable-Disable-Individual-Tab-td4380339.html

Regards
Sven

On 18.12.2014 10:57, K wrote:

Hi i am workin with tabbedpanel in wicket. i have created a tabbedpanel for
my search page

<http://apache-wicket.1842946.n4.nabble.com/file/n4668837/tabpanel.png>

My requirement is to create a tabbedpanel of three tabs with title. i am
using additional tab (Dummytab in this case) to compensiate for the title.
please suggest how to create a title tab.

Thanks in advance


-
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Title-tab-in-Tabbedpanel-tp4668837.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




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



Title tab in Tabbedpanel

2014-12-18 Thread K
Hi i am workin with tabbedpanel in wicket. i have created a tabbedpanel for
my search page

<http://apache-wicket.1842946.n4.nabble.com/file/n4668837/tabpanel.png> 

My requirement is to create a tabbedpanel of three tabs with title. i am
using additional tab (Dummytab in this case) to compensiate for the title.
please suggest how to create a title tab.  

Thanks in advance  


-
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Title-tab-in-Tabbedpanel-tp4668837.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: TabbedPanel

2014-12-01 Thread Paul Bors
At a first glimpse it looks okay. Not sure what you mean by your
application terminating... but here's a working example for you to correct
you page:
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.TabbedPanelPage;jsessionid=76A4F74BA9600E5D001006980818BB0A?0

On Sat, Nov 29, 2014 at 6:11 AM, K  wrote:

> Hi
> I am trying to implement an example for tabbed panel page in wicket but it
> does not work. I have stripped off few methods that i thought were not
> necessary for my current scenario. I am not sure if i missed something.
> Please suggest.
>
> Mark-up: Tabbed Panel Page
> tabbedpanelpage.txt
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage.txt
> >
>
> Java Code: Tabbed Panel Page
> tabbedpanelpage(1).txt
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage%281%29.txt
> >
>
> Mark-up: TabPanel1 (TabPanel2 & TabPanel3 are same )
> tabpanel1.txt
> <http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabpanel1.txt>
>
> My Log:
> Constructor:
> AbstractTab : 1
> AbstractTab : 2
> AbstractTab : 3
> getPanel: 1
> TabPanel1
>
> my application terminates at this point. Thanks in advance.
>
> -
> K
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-tp4668589.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
>
>


-- 
~ Thank you,
   Paul Bors


TabbedPanel

2014-11-29 Thread K
Hi 
I am trying to implement an example for tabbed panel page in wicket but it
does not work. I have stripped off few methods that i thought were not
necessary for my current scenario. I am not sure if i missed something.
Please suggest.

Mark-up: Tabbed Panel Page
tabbedpanelpage.txt
<http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage.txt>  

Java Code: Tabbed Panel Page
tabbedpanelpage(1).txt
<http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage%281%29.txt>
  

Mark-up: TabPanel1 (TabPanel2 & TabPanel3 are same )
tabpanel1.txt
<http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabpanel1.txt>  

My Log: 
Constructor:
AbstractTab : 1
AbstractTab : 2
AbstractTab : 3
getPanel: 1
TabPanel1

my application terminates at this point. Thanks in advance.

-
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-tp4668589.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: TabbedPanel + authorization strategy

2014-05-05 Thread MDU
How should i impliment the ROl and Auth on the AbstractTab .

Please find the below code for ref

 final List tabs = new ArrayList();
 final AbstractTab ABCTab = new AbstractTab(new Model("ABC")) {

//@Override
  Public Panel getPanel(final String panelId) {

return ABCPanal(panelId, Main.this);
}
  

};
 tabs.add(ABCTab );
   
final AbstractTab XYXTab = new AbstractTab(new Model("XYZ")) {
@Override
public Panel getPanel(final String panelId) {
return new XYZPanal(panelId, Main.this);
}
   
};
  tabs.add(XYZPanal);
  final AjaxTabbedPanel tabPanel = new AjaxTabbedPanel("tabs", tabs);
  this.add(tabPanel);


I have 2 tab on the page. How should i disable for one of the tab for
perticular rols

I have tried with the 
MetaDataRoleAuthorizationStrategy.authorize(ABCTab,RENDER, "ADMIN");

but it is not working as it is Abstract Class and not the complonet. 


Regards
MDU


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-authorization-strategy-tp1893255p4665674.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: TabbedPanel + authorization strategy

2014-05-05 Thread MDU
How should i impliment the ROl and Auth on the AbstractTab . 

Please find the below code for ref 

 final List tabs = new ArrayList(); 
 final AbstractTab ABCTab = new AbstractTab(new Model("ABC")) { 

//@Override 
  Public Panel getPanel(final String panelId) { 

return ABCPanal(panelId, Main.this); 
} 
  

}; 
 tabs.add(ABCTab ); 

final AbstractTab XYXTab = new AbstractTab(new Model("XYZ")) { 
@Override 
public Panel getPanel(final String panelId) { 
return new XYZPanal(panelId, Main.this); 
} 

}; 
  tabs.add(XYZPanal); 
  final AjaxTabbedPanel tabPanel = new AjaxTabbedPanel("tabs", tabs); 
  this.add(tabPanel); 


I have 2 tab on the page. How should i disable for one of the tab for
perticular rols 

I have tried with the 
MetaDataRoleAuthorizationStrategy.authorize(ABCTab,RENDER, "ADMIN"); 

but it is not working as it is Abstract Class and not the complonet. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-authorization-strategy-tp1893255p4665675.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: TabbedPanel + authorization strategy

2014-05-04 Thread MDU
 I have the same need of you . Could you share the implementation of 
your Secure TabbedPanel? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-authorization-strategy-tp1893255p4665666.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: Wicket 1.6.7 TabbedPanel URL Access

2014-04-08 Thread Richter, Marvin
Like Sven mentioned, you could pass a parameter to a page e.g. tabIndex and in 
the constructor you get the parameter with name tabIndex and later on when you 
initialize the TabbedPanel you call setSelectedTab(tabIndex)

Marvin Richter


-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Monday, April 07, 2014 8:22 PM
To: users@wicket.apache.org
Subject: Re: Wicket 1.6.7 TabbedPanel URL Access

Hi,

do you want to your url parameters? Are you looking for bookmarkable urls?

You can analyse page parameters in a page's constructor and change its contents 
accordingly.

Sven

On 04/07/2014 06:57 PM, Jeremie wrote:
> Hello,
>
> I would like to know if it is possible to use a URL to open a tab 
> using Wicket's TabbedPanel component.
>
> For example, I want to generate links to wicket classes that contain 
> parameters and place the link in an HTML href tag so that when the 
> users click the individual links, they are redirected to another 
> TabbedPanel tab that displays customized content based on the parameters 
> passed in the URL.
>
> Any help would be appreciated.
> Thanks,
Jeremie
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-6-7-TabbedPanel-UR
> L-Access-tp4665280.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
>


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



Re: Wicket 1.6.7 TabbedPanel URL Access

2014-04-07 Thread Sven Meier

Hi,

do you want to your url parameters? Are you looking for bookmarkable urls?

You can analyse page parameters in a page's constructor and change its 
contents accordingly.


Sven

On 04/07/2014 06:57 PM, Jeremie wrote:

Hello,

I would like to know if it is possible to use a URL to open a tab using
Wicket's TabbedPanel component.

For example, I want to generate links to wicket classes that contain
parameters and place the link in an HTML href tag so that when the users
click the individual links, they are redirected to another TabbedPanel tab
that displays customized content based on the parameters passed in the URL.

Any help would be appreciated.
Thanks,Jeremie


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-6-7-TabbedPanel-URL-Access-tp4665280.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




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



Wicket 1.6.7 TabbedPanel URL Access

2014-04-07 Thread Jeremie
Hello,

I would like to know if it is possible to use a URL to open a tab using
Wicket's TabbedPanel component.

For example, I want to generate links to wicket classes that contain
parameters and place the link in an HTML href tag so that when the users
click the individual links, they are redirected to another TabbedPanel tab
that displays customized content based on the parameters passed in the URL.

Any help would be appreciated.
Thanks,Jeremie


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-6-7-TabbedPanel-URL-Access-tp4665280.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: Breadcrumbs in TabbedPanel

2013-08-16 Thread Paul Bors
Well, if you got foo / bar / foo and you don't like the default behavior,
extend the class and override it and then use your implementation J

 

~ Thank you,

   Paul Bors

 

From: Vignesh Palanisamy [mailto:vign...@mcruncher.com] 
Sent: Wednesday, August 14, 2013 11:26 PM
To: users@wicket.apache.org
Subject: Re: Breadcrumbs in TabbedPanel

 

Thanks Paul,

Yes i had followed that Wicket Library example.

and as per you suggestion i had set the active participant to the model.

but for me BreadCrumbLink appending multiple times.

for example i had two panel in a tabbedPanel foo, bar 

while i click foo tab

BreadCrumbLink was like:

foo

then i click bar tab

BreadCrumbLink was like:

foo / bar


then again while i click foo tab

 

BreadCrumbLink was like:

foo / bar / foo

likewise. it was appending.



For more clarity i had attach a quick start project with it  please extract
and run in jetty 



Thanks

Vignesh Palanisamy.

 

 

 

On Thu, Aug 15, 2013 at 12:31 AM, Paul Bors  wrote:

I suppose you're using the breadcrumbs from the wicket-extensions as per
this Wicket Library example:
http://www.wicket-library.com/wicket-examples/breadcrumb

Then see the API for the getActive() method of the IBreadCrumbModel:
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/extensi
<http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/extens
i%0Aons/breadcrumb/IBreadCrumbModel.html#getActive%28%29> 
ons/breadcrumb/IBreadCrumbModel.html#getActive()

Try getting a hold to an IBreadCrumbModel reference and from your individual
tab panel set the active participant.

~ Thank you,
  Paul Bors


-Original Message-
From: Vignesh Palanisamy [mailto:vign...@mcruncher.com]
Sent: Wednesday, August 14, 2013 12:57 AM
To: users@wicket.apache.org
Subject: Breadcrumbs in TabbedPanel

Hi all,

 Right now we are implementing Breadcrumbs in our project. And it works very
fine in all panels without any issue. But ,while using the panel as
TabbedPanel breadCrumbs didn't works. i don't know how to implement
breadcrumbs in tabbedPanel. can anyone please help us.


Thanks
Vignesh Palanisamy



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

 



RE: Breadcrumbs in TabbedPanel

2013-08-14 Thread Paul Bors
I suppose you're using the breadcrumbs from the wicket-extensions as per
this Wicket Library example:
http://www.wicket-library.com/wicket-examples/breadcrumb

Then see the API for the getActive() method of the IBreadCrumbModel:
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/extensi
ons/breadcrumb/IBreadCrumbModel.html#getActive()

Try getting a hold to an IBreadCrumbModel reference and from your individual
tab panel set the active participant.

~ Thank you,
  Paul Bors

-Original Message-
From: Vignesh Palanisamy [mailto:vign...@mcruncher.com] 
Sent: Wednesday, August 14, 2013 12:57 AM
To: users@wicket.apache.org
Subject: Breadcrumbs in TabbedPanel

Hi all,

 Right now we are implementing Breadcrumbs in our project. And it works very
fine in all panels without any issue. But ,while using the panel as
TabbedPanel breadCrumbs didn't works. i don't know how to implement
breadcrumbs in tabbedPanel. can anyone please help us.


Thanks
Vignesh Palanisamy


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



Breadcrumbs in TabbedPanel

2013-08-13 Thread Vignesh Palanisamy
Hi all,

 Right now we are implementing Breadcrumbs in our project. And it works
very fine in all panels without any issue. But ,while using the panel as
TabbedPanel breadCrumbs didn't works. i don't know how to implement
breadcrumbs in tabbedPanel. can anyone please help us.


Thanks
Vignesh Palanisamy


Re: TabbedPanel with huge number of tabs

2012-10-02 Thread Sven Meier

Hi Dirk,

you can provide your own component to render the tabs, just override 
TabbedPanel#newTabsContainer().


This container can use a repeater for a row of tabs and some javascript 
popup/menu solution to make the other tabs accessible.


Hope this helps
Sven

On 10/02/2012 11:12 AM, Dirk Wenke wrote:

Hello,

I've searched the forum and the web for a solution, but I did not find
anything.
We are building a workbench-like application with wicket. The objects in our
application are displayed in tabs, so we used the TabbedPanel for that. But
if many tabs are opened, the tabs are displayed in multiple rows.
What we want to achieve is, that there is only one row displayed for the
tabs and that a button is displayed that opens a list of all available tabs
(like it is e.g. in the eclipse IDE).

As I am fairly new to wicket, I have currently no idea how to solve this. I
would be happy if anybody could help me with this issue.

Thanks,
Dirk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-huge-number-of-tabs-tp4652598.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




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



TabbedPanel with huge number of tabs

2012-10-02 Thread Dirk Wenke
Hello,

I've searched the forum and the web for a solution, but I did not find
anything.
We are building a workbench-like application with wicket. The objects in our
application are displayed in tabs, so we used the TabbedPanel for that. But
if many tabs are opened, the tabs are displayed in multiple rows.
What we want to achieve is, that there is only one row displayed for the
tabs and that a button is displayed that opens a list of all available tabs
(like it is e.g. in the eclipse IDE).

As I am fairly new to wicket, I have currently no idea how to solve this. I
would be happy if anybody could help me with this issue.

Thanks,
Dirk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-huge-number-of-tabs-tp4652598.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: TabbedPanel whitspace markup

2012-09-18 Thread Lemke, Michael SZ/HZA-ZSW
On Tue, Sep 18, 2012 2:10 PM
Martin Grigorov [mailto:mgrigo...@apache.org] wrote:
>To: users@wicket.apache.org
>Subject: Re: TabbedPanel whitspace markup
>
>Create a ticket and attach the screenshots.
>I'm not much in CSS and I cannot imagine how this whitespace breaks
>the layout. But I don't see a problem to remove them too.

Thanks Martin.  Created
https://issues.apache.org/jira/browse/WICKET-4768

>
>On Tue, Sep 18, 2012 at 3:07 PM, Lemke, Michael  SZ/HZA-ZSW
> wrote:
>> On Tue, Sep 18, 2012 1:51 PM
>> Martin Grigorov wrote:
>>>On Tue, Sep 18, 2012 at 2:29 PM, Lemke, Michael  SZ/HZA-ZSW wrote:
>>>> I've encountered a layout problem with TabbedPanels.  In the
>>>> generated markup there is whitespace between the LI items and
>>>> the anchor that switches tabs.  This causes a layout problem for me
>>>> with this style sheet (simplified to show the issue, not tested):
>>>>
>>>> .selected a {
>>>> background: url("../i/bg_tab_lw_content_active.gif") repeat-x scroll 
>>>> center top #E8EEF1;
>>>> border-right: 1px solid #CDD3D6;
>>>> }
>>>>
>>>> a {
>>>> background: none repeat scroll 0 0 transparent;
>>>> border-right: 1px solid #FF;
>>>> }
>>>>
>>>> li {
>>>> display: inline;
>>>> margin: 0;
>>>> list-style: none outside none
>>>> }
>>>>
>>>> The idea is to have a white border between the tabs which
>>>> disappears for the selected tab.  Kind of hard to explain
>>>> without screenshots.  Currently with Wicket there is always
>>>> a small margin left or right of the white border of the A
>>>> element.  It is caused by whitespace in the markup.
>>>>
>>>> li { float:left; } would remove the undesired whitespace
>>>> but would break the rest of our layout.
>>>>
>>>>
>>>> Anyway, the root cause is the markup in TabbedPanel.html of
>>>> Wicket.
>>>>
>>>> Current (1.5.8 and 6.0.0):
>>>>
>>>> http://wicket.apache.org";>
>>>> 
>>>> 
>>>> 
>>>> [[tab 
>>>> title]]
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>>
>>>> Should be changed in e.g.
>>>>
>>>> http://wicket.apache.org";>
>>>> 
>>>> 
>>>> >>> wicket:id="title">[[tab title]]
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>>
>>>> Is there a Wicket way to work around this?
>>>
>>>You can create MyTabbedPanel that extends TabbedPanel and provides
>>>MyTabbedPanel.html.
>>>The only code in .java that is needed to add is the constructor(s) you use.
>>>
>>
>> Thanks, I just did this.  Works fine.  But is there a chance
>> it gets fixed in Wicket?  Or isn't this considered a problem?
>>
>> Michael
>
>
>
>-- 
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com
>
>-
>To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: TabbedPanel whitspace markup

2012-09-18 Thread Martin Grigorov
Create a ticket and attach the screenshots.
I'm not much in CSS and I cannot imagine how this whitespace breaks
the layout. But I don't see a problem to remove them too.

On Tue, Sep 18, 2012 at 3:07 PM, Lemke, Michael  SZ/HZA-ZSW
 wrote:
> On Tue, Sep 18, 2012 1:51 PM
> Martin Grigorov wrote:
>>On Tue, Sep 18, 2012 at 2:29 PM, Lemke, Michael  SZ/HZA-ZSW wrote:
>>> I've encountered a layout problem with TabbedPanels.  In the
>>> generated markup there is whitespace between the LI items and
>>> the anchor that switches tabs.  This causes a layout problem for me
>>> with this style sheet (simplified to show the issue, not tested):
>>>
>>> .selected a {
>>> background: url("../i/bg_tab_lw_content_active.gif") repeat-x scroll 
>>> center top #E8EEF1;
>>> border-right: 1px solid #CDD3D6;
>>> }
>>>
>>> a {
>>> background: none repeat scroll 0 0 transparent;
>>> border-right: 1px solid #FF;
>>> }
>>>
>>> li {
>>> display: inline;
>>> margin: 0;
>>> list-style: none outside none
>>> }
>>>
>>> The idea is to have a white border between the tabs which
>>> disappears for the selected tab.  Kind of hard to explain
>>> without screenshots.  Currently with Wicket there is always
>>> a small margin left or right of the white border of the A
>>> element.  It is caused by whitespace in the markup.
>>>
>>> li { float:left; } would remove the undesired whitespace
>>> but would break the rest of our layout.
>>>
>>>
>>> Anyway, the root cause is the markup in TabbedPanel.html of
>>> Wicket.
>>>
>>> Current (1.5.8 and 6.0.0):
>>>
>>> http://wicket.apache.org";>
>>> 
>>> 
>>> 
>>> [[tab 
>>> title]]
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>>
>>> Should be changed in e.g.
>>>
>>> http://wicket.apache.org";>
>>> 
>>> 
>>> >> wicket:id="title">[[tab title]]
>>> 
>>> 
>>> 
>>> 
>>>
>>>
>>> Is there a Wicket way to work around this?
>>
>>You can create MyTabbedPanel that extends TabbedPanel and provides
>>MyTabbedPanel.html.
>>The only code in .java that is needed to add is the constructor(s) you use.
>>
>
> Thanks, I just did this.  Works fine.  But is there a chance
> it gets fixed in Wicket?  Or isn't this considered a problem?
>
> Michael



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: TabbedPanel whitspace markup

2012-09-18 Thread Lemke, Michael SZ/HZA-ZSW
On Tue, Sep 18, 2012 1:51 PM
Martin Grigorov wrote:
>On Tue, Sep 18, 2012 at 2:29 PM, Lemke, Michael  SZ/HZA-ZSW wrote:
>> I've encountered a layout problem with TabbedPanels.  In the
>> generated markup there is whitespace between the LI items and
>> the anchor that switches tabs.  This causes a layout problem for me
>> with this style sheet (simplified to show the issue, not tested):
>>
>> .selected a {
>> background: url("../i/bg_tab_lw_content_active.gif") repeat-x scroll 
>> center top #E8EEF1;
>> border-right: 1px solid #CDD3D6;
>> }
>>
>> a {
>> background: none repeat scroll 0 0 transparent;
>> border-right: 1px solid #FF;
>> }
>>
>> li {
>> display: inline;
>> margin: 0;
>> list-style: none outside none
>> }
>>
>> The idea is to have a white border between the tabs which
>> disappears for the selected tab.  Kind of hard to explain
>> without screenshots.  Currently with Wicket there is always
>> a small margin left or right of the white border of the A
>> element.  It is caused by whitespace in the markup.
>>
>> li { float:left; } would remove the undesired whitespace
>> but would break the rest of our layout.
>>
>>
>> Anyway, the root cause is the markup in TabbedPanel.html of
>> Wicket.
>>
>> Current (1.5.8 and 6.0.0):
>>
>> http://wicket.apache.org";>
>> 
>> 
>> 
>> [[tab 
>> title]]
>> 
>> 
>> 
>> 
>> 
>>
>>
>> Should be changed in e.g.
>>
>> http://wicket.apache.org";>
>> 
>> 
>> > wicket:id="title">[[tab title]]
>> 
>> 
>> 
>> 
>>
>>
>> Is there a Wicket way to work around this?
>
>You can create MyTabbedPanel that extends TabbedPanel and provides
>MyTabbedPanel.html.
>The only code in .java that is needed to add is the constructor(s) you use.
>

Thanks, I just did this.  Works fine.  But is there a chance
it gets fixed in Wicket?  Or isn't this considered a problem?

Michael


Re: TabbedPanel whitspace markup

2012-09-18 Thread Martin Grigorov
Hi,

On Tue, Sep 18, 2012 at 2:29 PM, Lemke, Michael  SZ/HZA-ZSW
 wrote:
> I've encountered a layout problem with TabbedPanels.  In the
> generated markup there is whitespace between the LI items and
> the anchor that switches tabs.  This causes a layout problem for me
> with this style sheet (simplified to show the issue, not tested):
>
> .selected a {
> background: url("../i/bg_tab_lw_content_active.gif") repeat-x scroll 
> center top #E8EEF1;
> border-right: 1px solid #CDD3D6;
> }
>
> a {
> background: none repeat scroll 0 0 transparent;
> border-right: 1px solid #FF;
> }
>
> li {
> display: inline;
> margin: 0;
> list-style: none outside none
> }
>
> The idea is to have a white border between the tabs which
> disappears for the selected tab.  Kind of hard to explain
> without screenshots.  Currently with Wicket there is always
> a small margin left or right of the white border of the A
> element.  It is caused by whitespace in the markup.
>
> li { float:left; } would remove the undesired whitespace
> but would break the rest of our layout.
>
>
> Anyway, the root cause is the markup in TabbedPanel.html of
> Wicket.
>
> Current (1.5.8 and 6.0.0):
>
> http://wicket.apache.org";>
> 
> 
> 
> [[tab 
> title]]
> 
> 
> 
> 
> 
>
>
> Should be changed in e.g.
>
> http://wicket.apache.org";>
> 
> 
>  wicket:id="title">[[tab title]]
> 
> 
> 
> 
>
>
> Is there a Wicket way to work around this?

You can create MyTabbedPanel that extends TabbedPanel and provides
MyTabbedPanel.html.
The only code in .java that is needed to add is the constructor(s) you use.

>
> Thanks for any insight,
> Michael
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



TabbedPanel whitspace markup

2012-09-18 Thread Lemke, Michael SZ/HZA-ZSW
I've encountered a layout problem with TabbedPanels.  In the 
generated markup there is whitespace between the LI items and 
the anchor that switches tabs.  This causes a layout problem for me
with this style sheet (simplified to show the issue, not tested):

.selected a {
background: url("../i/bg_tab_lw_content_active.gif") repeat-x scroll center 
top #E8EEF1;
border-right: 1px solid #CDD3D6;
}

a {
background: none repeat scroll 0 0 transparent;
border-right: 1px solid #FF;
}

li {
display: inline;
margin: 0;
list-style: none outside none
}

The idea is to have a white border between the tabs which
disappears for the selected tab.  Kind of hard to explain
without screenshots.  Currently with Wicket there is always
a small margin left or right of the white border of the A
element.  It is caused by whitespace in the markup.

li { float:left; } would remove the undesired whitespace
but would break the rest of our layout.


Anyway, the root cause is the markup in TabbedPanel.html of
Wicket.

Current (1.5.8 and 6.0.0):

http://wicket.apache.org";>



[[tab 
title]]







Should be changed in e.g.

http://wicket.apache.org";>


[[tab 
title]]






Is there a Wicket way to work around this?

Thanks for any insight,
Michael


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



Re: Properly share data model in TabbedPanel

2012-06-20 Thread nunofaria11
Worked like a charm. Thank you everyone.
And for future users who bump into this thread, solved it with this...

TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs) {

@Override
protected WebMarkupContainer newLink(String linkId, final int
index) {
return new SubmitLink(linkId) {

@Override
public void onSubmit() {
setSelectedTab(index);
}
};
}
};

2012/6/20 Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n4650114...@n4.nabble.com>

> You need to update the value of "coors" somehow before going to the next
> tab.
> As Sven explained clicking on the tab wont submit the form inside a tab
> panel.
> You can submit the form in a tab panel explicitly with its own button.
> You can wrap the tabbed panel in a form and use a SubmitLink to switch
> between the tabs.
>
> On Wed, Jun 20, 2012 at 11:28 AM, nunofaria11 <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4650114&i=0>>
> wrote:
>
> > So are you suggesting that I create a form inside each tab-panel? Or a
> form
> > that includes the whole TabbedPanel?
> >
> > 2012/6/20 Sven Meier [via Apache Wicket] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4650114&i=1>>
> >
> >> >  when I click a submit button the data gets refreshed inside the
> model
> >> >  and I can see the changes when I switch tabs, but only then
> >> >  In the second panel there is nothing special, only an AjaxSubmitLink
> >> >  that repaints a WebMarkupContainer.
> >>
> >> TabbedPanel uses links by default, so form values are lost when you
> >> switch tabs.
> >>
> >> You can use SubmitLinks instead, see TabbedPanel#newLink().
> >>
> >> Sven
> >>
> >> On 06/20/2012 12:37 AM, nunofaria11 wrote:
> >>
> >> > That is indeed a useful link. Thank you...
> >> > However, I still get the same behavior
> >> >
> >> > Here is what I have:
> >> >
> >> > public class HomePage extends WebPage {
> >> >
> >> >  private static final long serialVersionUID = 1L;
> >> >  private ArrayList  coords = new ArrayList();
> >> >
> >> >  public HomePage() {
> >> >  final ArrayList tabsList = new ArrayList();
> >> >  final PropertyModel>  model = new
> >> PropertyModel>(this, "coords");
> >> >  tabsList.add(new AbstractTab(new Model("City
> Chooser"))
> >> {
> >> >
> >> >  @Override
> >> >      public WebMarkupContainer getPanel(String string) {
> >> >  return new CitiesPanel(string, model);
> >> >  }
> >> >  });
> >> >
> >> >  tabsList.add(new AbstractTab(new Model("Map Tab")) {
> >> >
> >> >  @Override
> >> >  public WebMarkupContainer getPanel(String string) {
> >> >  CoordsPanel panel = new CoordsPanel(string, model);
> >> >  return panel;
> >> >  }
> >> >  });
> >> >
> >> >  TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabsList);
> >> >  add(tabbedPanel);
> >> >  }
> >> > }
> >> >
> >> > Something weird happens though: in my second panel (CoordsPanel),
> when I
> >> click a submit button the data gets refreshed inside the model and I
> can
> >> see the changes when I switch tabs, but only then - and it is still the
> >> only way I can perform changes in the model.
> >> >
> >> > In the second panel there is nothing special, only an AjaxSubmitLink
> >> that repaints a WebMarkupContainer. Does that have any impact in the
> >> TabbedPanel?
> >> >
> >> >
> >> > A 19/06/2012, às 21:39, Martin Grigorov-4 [via Apache Wicket]
> escreveu:
> >> >
> >> >> it sounds like you are using static models.
> >> >> read about dynamic models at:
> >> >> https://cwiki.apache.org/WICKET/working-with-wicket-models.html
> >> >> On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11<[hidden email]>
>  wrote:
> >> >>
&g

Re: Properly share data model in TabbedPanel

2012-06-20 Thread Martin Grigorov
You need to update the value of "coors" somehow before going to the next tab.
As Sven explained clicking on the tab wont submit the form inside a tab panel.
You can submit the form in a tab panel explicitly with its own button.
You can wrap the tabbed panel in a form and use a SubmitLink to switch
between the tabs.

On Wed, Jun 20, 2012 at 11:28 AM, nunofaria11  wrote:
> So are you suggesting that I create a form inside each tab-panel? Or a form
> that includes the whole TabbedPanel?
>
> 2012/6/20 Sven Meier [via Apache Wicket] <
> ml-node+s1842946n4650096...@n4.nabble.com>
>
>> >  when I click a submit button the data gets refreshed inside the model
>> >  and I can see the changes when I switch tabs, but only then
>> >  In the second panel there is nothing special, only an AjaxSubmitLink
>> >  that repaints a WebMarkupContainer.
>>
>> TabbedPanel uses links by default, so form values are lost when you
>> switch tabs.
>>
>> You can use SubmitLinks instead, see TabbedPanel#newLink().
>>
>> Sven
>>
>> On 06/20/2012 12:37 AM, nunofaria11 wrote:
>>
>> > That is indeed a useful link. Thank you...
>> > However, I still get the same behavior
>> >
>> > Here is what I have:
>> >
>> > public class HomePage extends WebPage {
>> >
>> >      private static final long serialVersionUID = 1L;
>> >      private ArrayList  coords = new ArrayList();
>> >
>> >      public HomePage() {
>> >          final ArrayList tabsList = new ArrayList();
>> >          final PropertyModel>  model = new
>> PropertyModel>(this, "coords");
>> >          tabsList.add(new AbstractTab(new Model("City Chooser"))
>> {
>> >
>> >              @Override
>> >              public WebMarkupContainer getPanel(String string) {
>> >                  return new CitiesPanel(string, model);
>> >              }
>> >          });
>> >
>> >          tabsList.add(new AbstractTab(new Model("Map Tab")) {
>> >
>> >              @Override
>> >              public WebMarkupContainer getPanel(String string) {
>> >                  CoordsPanel panel = new CoordsPanel(string, model);
>> >                  return panel;
>> >              }
>> >          });
>> >
>> >          TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabsList);
>> >          add(tabbedPanel);
>> >      }
>> > }
>> >
>> > Something weird happens though: in my second panel (CoordsPanel), when I
>> click a submit button the data gets refreshed inside the model and I can
>> see the changes when I switch tabs, but only then - and it is still the
>> only way I can perform changes in the model.
>> >
>> > In the second panel there is nothing special, only an AjaxSubmitLink
>> that repaints a WebMarkupContainer. Does that have any impact in the
>> TabbedPanel?
>> >
>> >
>> > A 19/06/2012, às 21:39, Martin Grigorov-4 [via Apache Wicket] escreveu:
>> >
>> >> it sounds like you are using static models.
>> >> read about dynamic models at:
>> >> https://cwiki.apache.org/WICKET/working-with-wicket-models.html
>> >> On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11<[hidden email]>  wrote:
>> >>
>> >>> By doesn't work I meant the data (inside the model) that was supposed
>> to
>> >>> change does not change.
>> >>>
>> >>> 2012/6/19 Martin Grigorov-4 [via Apache Wicket]<
>> >>> [hidden email]>
>> >>>
>> >>>> On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11<[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4650084&i=0>>
>> >>>> wrote:
>> >>>>> Hi, I am trying to properly share a model between tabs in a
>> TabbedPanel.
>> >>>>> I've been trying to pass the model to the Panels returned in the
>> >>>> getPanel
>> >>>>> hook (below), but it seems not to work.
>> >>>> "Doesn't work" doesn't explain much.
>> >>>> Give us more information/code.
>> >>>>
>> >>>>>
>> >>>>>
>> >>>>> tabs.add(new AbstractTab(new Model("Title")) {
>> >>>>>
>> >>>>>
>> >>>>>            @Override
>> >>>>>
&

Re: Properly share data model in TabbedPanel

2012-06-20 Thread nunofaria11
So are you suggesting that I create a form inside each tab-panel? Or a form
that includes the whole TabbedPanel?

2012/6/20 Sven Meier [via Apache Wicket] <
ml-node+s1842946n4650096...@n4.nabble.com>

> >  when I click a submit button the data gets refreshed inside the model
> >  and I can see the changes when I switch tabs, but only then
> >  In the second panel there is nothing special, only an AjaxSubmitLink
> >  that repaints a WebMarkupContainer.
>
> TabbedPanel uses links by default, so form values are lost when you
> switch tabs.
>
> You can use SubmitLinks instead, see TabbedPanel#newLink().
>
> Sven
>
> On 06/20/2012 12:37 AM, nunofaria11 wrote:
>
> > That is indeed a useful link. Thank you...
> > However, I still get the same behavior
> >
> > Here is what I have:
> >
> > public class HomePage extends WebPage {
> >
> >  private static final long serialVersionUID = 1L;
> >  private ArrayList  coords = new ArrayList();
> >
> >  public HomePage() {
> >  final ArrayList tabsList = new ArrayList();
> >  final PropertyModel>  model = new
> PropertyModel>(this, "coords");
> >  tabsList.add(new AbstractTab(new Model("City Chooser"))
> {
> >
> >  @Override
> >  public WebMarkupContainer getPanel(String string) {
> >  return new CitiesPanel(string, model);
> >  }
> >  });
> >
> >  tabsList.add(new AbstractTab(new Model("Map Tab")) {
> >
> >  @Override
> >  public WebMarkupContainer getPanel(String string) {
> >  CoordsPanel panel = new CoordsPanel(string, model);
> >  return panel;
> >  }
> >  });
> >
> >  TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabsList);
> >  add(tabbedPanel);
> >  }
> > }
> >
> > Something weird happens though: in my second panel (CoordsPanel), when I
> click a submit button the data gets refreshed inside the model and I can
> see the changes when I switch tabs, but only then - and it is still the
> only way I can perform changes in the model.
> >
> > In the second panel there is nothing special, only an AjaxSubmitLink
> that repaints a WebMarkupContainer. Does that have any impact in the
> TabbedPanel?
> >
> >
> > A 19/06/2012, às 21:39, Martin Grigorov-4 [via Apache Wicket] escreveu:
> >
> >> it sounds like you are using static models.
> >> read about dynamic models at:
> >> https://cwiki.apache.org/WICKET/working-with-wicket-models.html
> >> On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11<[hidden email]>  wrote:
> >>
> >>> By doesn't work I meant the data (inside the model) that was supposed
> to
> >>> change does not change.
> >>>
> >>> 2012/6/19 Martin Grigorov-4 [via Apache Wicket]<
> >>> [hidden email]>
> >>>
> >>>> On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11<[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4650084&i=0>>
> >>>> wrote:
> >>>>> Hi, I am trying to properly share a model between tabs in a
> TabbedPanel.
> >>>>> I've been trying to pass the model to the Panels returned in the
> >>>> getPanel
> >>>>> hook (below), but it seems not to work.
> >>>> "Doesn't work" doesn't explain much.
> >>>> Give us more information/code.
> >>>>
> >>>>>
> >>>>>
> >>>>> tabs.add(new AbstractTab(new Model("Title")) {
> >>>>>
> >>>>>
> >>>>>@Override
> >>>>>
> >>>>>public WebMarkupContainer getPanel(String panelId) {
> >>>>>
> >>>>>  return new MyPanel(panelId, model);
> >>>>>}
> >>>>>
> >>>>> });
> >>>>>
> >>>>> TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
> >>>>>
> >>>>>
> >>>>>
> >>>>> Can someone point me to an example where this is done?
> >>>>>
> >>>>>
> >>>>> --
> >>>>> View this message in context:
> >>>>
> http://apache-wicket.1842946.n4.nabble.com/Properly-sha

Re: Properly share data model in TabbedPanel

2012-06-19 Thread Sven Meier

 when I click a submit button the data gets refreshed inside the model
 and I can see the changes when I switch tabs, but only then
 In the second panel there is nothing special, only an AjaxSubmitLink
 that repaints a WebMarkupContainer.


TabbedPanel uses links by default, so form values are lost when you 
switch tabs.


You can use SubmitLinks instead, see TabbedPanel#newLink().

Sven

On 06/20/2012 12:37 AM, nunofaria11 wrote:

That is indeed a useful link. Thank you...
However, I still get the same behavior

Here is what I have:

public class HomePage extends WebPage {

 private static final long serialVersionUID = 1L;
 private ArrayList  coords = new ArrayList();

 public HomePage() {
 final ArrayList tabsList = new ArrayList();
 final PropertyModel>  model = new 
PropertyModel>(this, "coords");
 tabsList.add(new AbstractTab(new Model("City Chooser")) {

 @Override
 public WebMarkupContainer getPanel(String string) {
 return new CitiesPanel(string, model);
 }
 });

 tabsList.add(new AbstractTab(new Model("Map Tab")) {

 @Override
 public WebMarkupContainer getPanel(String string) {
 CoordsPanel panel = new CoordsPanel(string, model);
 return panel;
     }
 });

     TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabsList);
 add(tabbedPanel);
 }
}

Something weird happens though: in my second panel (CoordsPanel), when I click 
a submit button the data gets refreshed inside the model and I can see the 
changes when I switch tabs, but only then - and it is still the only way I can 
perform changes in the model.

In the second panel there is nothing special, only an AjaxSubmitLink that 
repaints a WebMarkupContainer. Does that have any impact in the TabbedPanel?


A 19/06/2012, às 21:39, Martin Grigorov-4 [via Apache Wicket] escreveu:


it sounds like you are using static models.
read about dynamic models at:
https://cwiki.apache.org/WICKET/working-with-wicket-models.html
On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11<[hidden email]>  wrote:


By doesn't work I meant the data (inside the model) that was supposed to
change does not change.

2012/6/19 Martin Grigorov-4 [via Apache Wicket]<
[hidden email]>


On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11<[hidden 
email]<http://user/SendEmail.jtp?type=node&node=4650084&i=0>>
wrote:

Hi, I am trying to properly share a model between tabs in a TabbedPanel.
I've been trying to pass the model to the Panels returned in the

getPanel

hook (below), but it seems not to work.

"Doesn't work" doesn't explain much.
Give us more information/code.




tabs.add(new AbstractTab(new Model("Title")) {


   @Override

   public WebMarkupContainer getPanel(String panelId) {

 return new MyPanel(panelId, model);
   }

});

TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);



Can someone point me to an example where this is done?


--
View this message in context:

http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082.html

Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [hidden 
email]<http://user/SendEmail.jtp?type=node&node=4650084&i=1>
For additional commands, e-mail: [hidden 
email]<http://user/SendEmail.jtp?type=node&node=4650084&i=2>




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: [hidden 
email]<http://user/SendEmail.jtp?type=node&node=4650084&i=3>
For additional commands, e-mail: [hidden 
email]<http://user/SendEmail.jtp?type=node&node=4650084&i=4>



--
  If you reply to this email, your message will be added to the discussion
below:


.
NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
Nuno Faria


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082p4650085.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
Martin Grigorov
jWeekend
Training

Re: Properly share data model in TabbedPanel

2012-06-19 Thread nunofaria11
That is indeed a useful link. Thank you...
However, I still get the same behavior 

Here is what I have:

public class HomePage extends WebPage {

private static final long serialVersionUID = 1L;
private ArrayList coords = new ArrayList();

public HomePage() {
final ArrayList tabsList = new ArrayList();
final PropertyModel> model = new 
PropertyModel>(this, "coords");
tabsList.add(new AbstractTab(new Model("City Chooser")) {

@Override
public WebMarkupContainer getPanel(String string) {
return new CitiesPanel(string, model);
}
});

tabsList.add(new AbstractTab(new Model("Map Tab")) {

@Override
public WebMarkupContainer getPanel(String string) {
CoordsPanel panel = new CoordsPanel(string, model);
return panel;
    }
    });

    TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabsList);
add(tabbedPanel);
}
}

Something weird happens though: in my second panel (CoordsPanel), when I click 
a submit button the data gets refreshed inside the model and I can see the 
changes when I switch tabs, but only then - and it is still the only way I can 
perform changes in the model.

In the second panel there is nothing special, only an AjaxSubmitLink that 
repaints a WebMarkupContainer. Does that have any impact in the TabbedPanel?


A 19/06/2012, às 21:39, Martin Grigorov-4 [via Apache Wicket] escreveu:

> it sounds like you are using static models. 
> read about dynamic models at: 
> https://cwiki.apache.org/WICKET/working-with-wicket-models.html

> 
> On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11 <[hidden email]> wrote:
> 
> > By doesn't work I meant the data (inside the model) that was supposed to 
> > change does not change. 
> > 
> > 2012/6/19 Martin Grigorov-4 [via Apache Wicket] < 
> > [hidden email]> 
> > 
> >> On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11 <[hidden 
> >> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=0>> 
> >> wrote: 
> >> > Hi, I am trying to properly share a model between tabs in a TabbedPanel. 
> >> > I've been trying to pass the model to the Panels returned in the 
> >> getPanel 
> >> > hook (below), but it seems not to work. 
> >> 
> >> "Doesn't work" doesn't explain much. 
> >> Give us more information/code. 
> >> 
> >> > 
> >> > 
> >> > 
> >> > tabs.add(new AbstractTab(new Model("Title")) { 
> >> > 
> >> > 
> >> >   @Override 
> >> > 
> >> >   public WebMarkupContainer getPanel(String panelId) { 
> >> > 
> >> > return new MyPanel(panelId, model); 
> >> >   } 
> >> > 
> >> > }); 
> >> > 
> >> > TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs); 
> >> > 
> >> > 
> >> > 
> >> > Can someone point me to an example where this is done? 
> >> > 
> >> > 
> >> > -- 
> >> > View this message in context: 
> >> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082.html
> >> > Sent from the Users forum mailing list archive at Nabble.com. 
> >> > 
> >> > - 
> >> > To unsubscribe, e-mail: [hidden 
> >> > email]<http://user/SendEmail.jtp?type=node&node=4650084&i=1> 
> >> > For additional commands, e-mail: [hidden 
> >> > email]<http://user/SendEmail.jtp?type=node&node=4650084&i=2> 
> >> > 
> >> 
> >> 
> >> 
> >> -- 
> >> Martin Grigorov 
> >> jWeekend 
> >> Training, Consulting, Development 
> >> http://jWeekend.com
> >> 
> >> - 
> >> To unsubscribe, e-mail: [hidden 
> >> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=3> 
> >> For additional commands, e-mail: [hidden 
> >> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=4> 
> >> 
> >> 
> >> 
> >> -- 
> >>  If you reply to this email, your message will be added to the discussion 
> >> below: 
> >> 
> >> 
> >> . 
> >>

Re: Properly share data model in TabbedPanel

2012-06-19 Thread Martin Grigorov
it sounds like you are using static models.
read about dynamic models at:
https://cwiki.apache.org/WICKET/working-with-wicket-models.html

On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11  wrote:
> By doesn't work I meant the data (inside the model) that was supposed to
> change does not change.
>
> 2012/6/19 Martin Grigorov-4 [via Apache Wicket] <
> ml-node+s1842946n4650084...@n4.nabble.com>
>
>> On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11 <[hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=0>>
>> wrote:
>> > Hi, I am trying to properly share a model between tabs in a TabbedPanel.
>> > I've been trying to pass the model to the Panels returned in the
>> getPanel
>> > hook (below), but it seems not to work.
>>
>> "Doesn't work" doesn't explain much.
>> Give us more information/code.
>>
>> >
>> >
>> >
>> > tabs.add(new AbstractTab(new Model("Title")) {
>> >
>> >
>> >           @Override
>> >
>> >           public WebMarkupContainer getPanel(String panelId) {
>> >
>> >             return new MyPanel(panelId, model);
>> >           }
>> >
>> > });
>> >
>> > TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
>> >
>> >
>> >
>> > Can someone point me to an example where this is done?
>> >
>> >
>> > --
>> > View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082.html
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > -
>> > To unsubscribe, e-mail: [hidden 
>> > email]<http://user/SendEmail.jtp?type=node&node=4650084&i=1>
>> > For additional commands, e-mail: [hidden 
>> > email]<http://user/SendEmail.jtp?type=node&node=4650084&i=2>
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -----
>> To unsubscribe, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=3>
>> For additional commands, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=4>
>>
>>
>>
>> --
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082p4650084.html
>>  To unsubscribe from Properly share data model in TabbedPanel, click 
>> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650082&code=bnVub2ZhcmlhMTFAZ21haWwuY29tfDQ2NTAwODJ8MzI4MDI5NzAw>
>> .
>> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> Nuno Faria
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082p4650085.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Properly share data model in TabbedPanel

2012-06-19 Thread nunofaria11
By doesn't work I meant the data (inside the model) that was supposed to
change does not change.

2012/6/19 Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n4650084...@n4.nabble.com>

> On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11 <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=0>>
> wrote:
> > Hi, I am trying to properly share a model between tabs in a TabbedPanel.
> > I've been trying to pass the model to the Panels returned in the
> getPanel
> > hook (below), but it seems not to work.
>
> "Doesn't work" doesn't explain much.
> Give us more information/code.
>
> >
> >
> >
> > tabs.add(new AbstractTab(new Model("Title")) {
> >
> >
> >   @Override
> >
> >   public WebMarkupContainer getPanel(String panelId) {
> >
> > return new MyPanel(panelId, model);
> >   }
> >
> > });
> >
> > TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
> >
> >
> >
> > Can someone point me to an example where this is done?
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4650084&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4650084&i=2>
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=3>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4650084&i=4>
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082p4650084.html
>  To unsubscribe from Properly share data model in TabbedPanel, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650082&code=bnVub2ZhcmlhMTFAZ21haWwuY29tfDQ2NTAwODJ8MzI4MDI5NzAw>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Nuno Faria


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082p4650085.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: Properly share data model in TabbedPanel

2012-06-19 Thread Martin Grigorov
On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11  wrote:
> Hi, I am trying to properly share a model between tabs in a TabbedPanel.
> I've been trying to pass the model to the Panels returned in the getPanel
> hook (below), but it seems not to work.

"Doesn't work" doesn't explain much.
Give us more information/code.

>
>
>
> tabs.add(new AbstractTab(new Model("Title")) {
>
>
>           @Override
>
>           public WebMarkupContainer getPanel(String panelId) {
>
>             return new MyPanel(panelId, model);
>           }
>
> });
>
> TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
>
>
>
> Can someone point me to an example where this is done?
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Properly share data model in TabbedPanel

2012-06-19 Thread nunofaria11
Hi, I am trying to properly share a model between tabs in a TabbedPanel.
I've been trying to pass the model to the Panels returned in the getPanel
hook (below), but it seems not to work.



tabs.add(new AbstractTab(new Model("Title")) {


   @Override

   public WebMarkupContainer getPanel(String panelId) {

 return new MyPanel(panelId, model);
   }

});

TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);



Can someone point me to an example where this is done?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Properly-share-data-model-in-TabbedPanel-tp4650082.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: FeedbackPanel inside TabbedPanel does not render

2012-06-14 Thread Martin Grigorov
Hi,

Sounds strange.
Please create a quickstart and attach it to Jira so we can take a look.

On Thu, Jun 14, 2012 at 7:05 PM, Jack Berg  wrote:
> Hi,
>
> I'm using Wicket 6 beta-2 and have a problem, that my feedback panel inside
> a TabbedPanel tab panel is not rendered.
>
> Even if i set output markupid to true, the tag is not rendered.
>
> The only way i have managed to get it to show, is by adding "dummy" error
> messages manually. If I do so, my actual messages appear next to the dummy
> one.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-inside-TabbedPanel-does-not-render-tp4649991.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



FeedbackPanel inside TabbedPanel does not render

2012-06-14 Thread Jack Berg
Hi,

I'm using Wicket 6 beta-2 and have a problem, that my feedback panel inside
a TabbedPanel tab panel is not rendered. 

Even if i set output markupid to true, the tag is not rendered. 

The only way i have managed to get it to show, is by adding "dummy" error
messages manually. If I do so, my actual messages appear next to the dummy
one. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FeedbackPanel-inside-TabbedPanel-does-not-render-tp4649991.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2011-11-03 Thread armandoxxx
Just a question ... 

what happens with other instances ? are they "forgotten" (null-ed) ? 

My problem is that I'm trying to put a PDFObject (displays PDF file in a div
in a browser ) panel and JWPlayer (flash video player) into tab panel. So I
have to know if "older" versions of these panels are destroyed (nulled) when
I switch the tab or whenever i reload my wrapping  panel (meaning panel
containing these panels). 

Kind regards

Armando



Martin Makundi wrote:
> 
> Yes, simply every time your panel is instantiated, it means someone
> navigated to the particular tab. You can monitor this also in your
> panel class.
> 
> **
> Martin
> 
> 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected-tp1877249p3986163.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: Share data in TabbedPanel

2011-05-01 Thread meduolis
Thanks for help, I solved my problem by extending original TabbedPanel with
some additional properties.--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3488031.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: Share data in TabbedPanel

2011-05-01 Thread jcgarciam
I didn't checked the API before posting the example was using the kind of
the same code you provide earlier, just to give u a quick start :)

But the idea is to pass a model to the underlying panel on each tab, that
points to the same object reference.


On Sun, May 1, 2011 at 12:52 PM, meduolis[via Apache Wicket] <
ml-node+3487936-2075405694-65...@n4.nabble.com> wrote:

> I think that your example would finish with ClassCastExeption in
> TabbedPanel.java:382 line
>
> return (Integer)getDefaultModelObject();
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487936.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65...@n4.nabble.com
> To unsubscribe from Apache Wicket, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487998.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: Share data in TabbedPanel

2011-05-01 Thread meduolis
I think that your example would finish with ClassCastExeption in
TabbedPanel.java:382 line

return (Integer)getDefaultModelObject();
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487936.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: Share data in TabbedPanel

2011-05-01 Thread jcgarciam
Lets say you have a property in your page that point to the dataobject you
are creating and manipulating on first tab.

The model of the tabs that should see this dataobject as well can be
reference as:

tp.setDefaultModel(new PropertyModel(this,"mySharedObject"));


Being "mySharedObject" the property on you page (this) that have the object
reference that you want to shared across tabs.

On Sun, May 1, 2011 at 5:06 AM, meduolis[via Apache Wicket] <
ml-node+3487440-18642877-65...@n4.nabble.com> wrote:

> Maybe you can show a small example how to do this?
>
> You mean like this?
>
> TabbedPanel tp = new TabbedPanel();
> tp.setDefaultModel(new Model());
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487440.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65...@n4.nabble.com
> To unsubscribe from Apache Wicket, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487759.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: Beginner problems with TabbedPanel

2011-04-25 Thread meduolis
Just tried Igor's solution with JavaScript disabled using AjaxFallbackButton

Exception appears:

java.lang.IllegalStateException: No Page found for component
[MarkupContainer [Component id = xlsUploadForm]]

Components tree:

Page
  TabbedPanel
Panel
  Form
Button

Any ideas how to make it fallback correct?

With js everything works just perfect

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Beginner-problems-with-TabbedPanel-tp1887205p3473115.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: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-10 Thread Ernesto Reinaldo Barreiro
Decebal,

I think TabbedPanel works by replacing the active panel with the
result of ITab.getPanel: see method setSelectedTab(int index). So,
when you click on a tab the previous one is removed form the component
tree (and therefore TimerAjaxCallBacks are not able to find the
component). Have you considered using JavaScript based tabs (as the
ones proc=vided by jquery)? That way your component tree will be
always consistent.

Best,

Ernesto

On Thu, Jun 10, 2010 at 3:02 PM, Decebal Suiu  wrote:
>
> Hello Ernesto,
>
> I resolved the problem. The AjaxSelfUpdatingTimerBehavior was added by me on
> the panel returned by the ITab.getPanel() method. I put the behavior on a
> child of the tab panel and it works.
> Do you have an explanation why I retrieve "PageExpiredException: No behavior
> listener found with behaviorId" in the first case (behavior on the tab
> panel)?
> Is it something that keeps by the role of onlyTargetActivePage() method? In
> the second case, the ajax was stopped because of precondition check (ignore
> if not active) but in the first case (with the error) the condition with
> active page is not true.
>
> Thanks,
> Decebal
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2250376.html
> Sent from the Wicket - User 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
>
>

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



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-10 Thread Decebal Suiu

Hello Ernesto,

I resolved the problem. The AjaxSelfUpdatingTimerBehavior was added by me on
the panel returned by the ITab.getPanel() method. I put the behavior on a
child of the tab panel and it works.
Do you have an explanation why I retrieve "PageExpiredException: No behavior
listener found with behaviorId" in the first case (behavior on the tab
panel)?
Is it something that keeps by the role of onlyTargetActivePage() method? In
the second case, the ajax was stopped because of precondition check (ignore
if not active) but in the first case (with the error) the condition with
active page is not true.

Thanks,
Decebal
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2250376.html
Sent from the Wicket - User 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: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Ernesto Reinaldo Barreiro
Hi Decebal,

Was just an idea you will have to adapt it to your needs... It would
be interesting to see why your original setting is not working: as I
only was guessing an explanation which might be wrong.

Best,

Ernesto

On Tue, Jun 8, 2010 at 3:57 PM, Decebal Suiu  wrote:
>
> Hello Ernesto
>
> I understood now. I single AbstractAjaxTimerBehavior on "timerContext"
> component and onTimer I will iterate  through all visible components from
> TabbedPanel that implements ITimerListener. One problem is that
> DashboardsTab (for example) contains many auto refreshable widget panels
> with various durations (panel1 at 5 seconds, panel2 at 15 seconds, etc).
> What duration may I put in the single timer on "timerContext"? (the min
> duration).
> And I don't see the role of the hasChnaged() from ITimerListener in my case.
> I want to do an auto refresh on some panels at some interval and in this
> case hasChnaged() returns always true (or for example if I want to refresh
> the component after 30 seconds and the unique timer has duration 10 seconds
> I will ignore 2 calls?)
>
> Thnaks,
> decebal
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247422.html
> Sent from the Wicket - User 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
>
>

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



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Decebal Suiu

Hello Ernesto

I understood now. I single AbstractAjaxTimerBehavior on "timerContext"
component and onTimer I will iterate  through all visible components from
TabbedPanel that implements ITimerListener. One problem is that
DashboardsTab (for example) contains many auto refreshable widget panels
with various durations (panel1 at 5 seconds, panel2 at 15 seconds, etc).
What duration may I put in the single timer on "timerContext"? (the min
duration).
And I don't see the role of the hasChnaged() from ITimerListener in my case.
I want to do an auto refresh on some panels at some interval and in this
case hasChnaged() returns always true (or for example if I want to refresh
the component after 30 seconds and the unique timer has duration 10 seconds
I will ignore 2 calls?)

Thnaks,
decebal
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247422.html
Sent from the Wicket - User 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: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Ernesto Reinaldo Barreiro
What I meant was to have a unique timer behavior attached to something like

MyTimerTabbedPanel


  
 


and you attach your timer to timerContext. Then you create an interface like

ITimerListener {
  boolean hasChnaged();
  Component getComponentToRepaint();
}

Then the (timer) components on the tabs implement this interface and
register themselves on a list of  ITimerListener you keep on
MyTimerTabbedPanel.  Then on the timer event you go through this list
and ask the (visible) components if they have to repaint themselves.
This way you timer will be always attached to the panel.

This is just an idea... that might work;-) Can you create a quickstart
(simplified project) for this?

Best,

Ernesto

On Tue, Jun 8, 2010 at 2:44 PM, Decebal Suiu  wrote:
>
> I tried your advice and I keep the timer behavior "outside" the tab, in
> MyTabbedPanel. In the refreshable panel  I register a listener with
> MyApplication.get().addRefreshableComponent(Duration,Component). When I
> select the tab with the refreshable panel all works fine but when I switch
> the tab I received the same "PageExpiredException: No behavior listener
> found with behaviorId".
> Did I do something wrong or I misunderstood you?
>
> Below is the java code:
>
> public class MyTabbedPanel extends AjaxTabbedPanel {
>
>        private static final long serialVersionUID = 1L;
>
>        private List ajaxTimerBehaviors;
>
>        public ImageTabbedPanel(String id, List tabs) {
>                super(id, tabs);
>
>                ajaxTimerBehaviors = new 
> ArrayList();
>        }
>
>       �...@override
>        protected WebMarkupContainer newLink(String linkId, final int index) {
>                List tabs = getTabs();
>
>                // check for usage of our custom class, if it is not our class,
>                // add as image empty container - this way you can use image 
> only in tabs
> you want
>                ITab currentTab = tabs.get(index);
>                if (currentTab instanceof ImageTab) {
>                        final ImageTab imageTab = (ImageTab) currentTab;
>                        return new ImageTabLink(linkId, imageTab.getImage()) {
>
>                                private static final long serialVersionUID = 
> 1L;
>
>                               �...@override
>                                public void onClick(AjaxRequestTarget target) {
>                                        removeAjaxTimerBehaviors();
>                                        clearRefreshableComponents();
>
>                                        setSelectedTab(index);
>
>                                        createAjaxTimerBehaviors();
>                                        addAjaxTimerBehaviors();
>                                        
> target.addComponent(MyTabbedPanel.this);
>                                }
>
>                        };
>                } else {
>                        WebMarkupContainer link = super.newLink(linkId, index);
>                        link.add(new 
> WebMarkupContainer("image").setVisible(false));
>
>                        return link;
>                }
>        }
>
>    private Map> getRefreshableComponents() {
>        return MyApplication.get().getRefreshableComponents();
>    }
>
>    private void clearRefreshableComponents() {
>        getRefreshableComponents().clear();
>    }
>
>        private void createAjaxTimerBehaviors() {
>                final Map> refreshableComponents =
> getRefreshableComponents();
>                Set durations = getRefreshableComponents().keySet();
>                for (final Duration duration : durations) {
>                        AbstractAjaxTimerBehavior behavior = new
> AbstractAjaxTimerBehavior(duration) {
>
>                                private static final long serialVersionUID = 
> 1L;
>
>                               �...@override
>                                protected void onTimer(AjaxRequestTarget 
> target) {
>                                        List components = 
> refreshableComponents.get(duration);
>                                        for (Component component : components) 
> {
>                                                target.addComponent(component);
>                                        }
>                                }
>
>                        };
>                        ajaxTimerBehaviors.add(behavior);
>                }
>        }
>
>        private void addAjaxTimerBehaviors() {
>                for (IBehavior behavior : ajaxTimerBehaviors) {
>                        add(behavior);
>                }
>        }
>
>        private void removeAjaxTimerBehavior

Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Decebal Suiu

I tried your advice and I keep the timer behavior "outside" the tab, in
MyTabbedPanel. In the refreshable panel  I register a listener with
MyApplication.get().addRefreshableComponent(Duration,Component). When I
select the tab with the refreshable panel all works fine but when I switch
the tab I received the same "PageExpiredException: No behavior listener
found with behaviorId".
Did I do something wrong or I misunderstood you?

Below is the java code:

public class MyTabbedPanel extends AjaxTabbedPanel {

private static final long serialVersionUID = 1L;

private List ajaxTimerBehaviors;

public ImageTabbedPanel(String id, List tabs) {
super(id, tabs);

ajaxTimerBehaviors = new ArrayList();
}

@Override
protected WebMarkupContainer newLink(String linkId, final int index) {
List tabs = getTabs();

// check for usage of our custom class, if it is not our class, 
// add as image empty container - this way you can use image 
only in tabs
you want
ITab currentTab = tabs.get(index);
if (currentTab instanceof ImageTab) {
final ImageTab imageTab = (ImageTab) currentTab;
return new ImageTabLink(linkId, imageTab.getImage()) {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
removeAjaxTimerBehaviors();
clearRefreshableComponents();

setSelectedTab(index);

createAjaxTimerBehaviors();
addAjaxTimerBehaviors();
target.addComponent(MyTabbedPanel.this);
}

};
} else {
WebMarkupContainer link = super.newLink(linkId, index);
link.add(new 
WebMarkupContainer("image").setVisible(false));

return link;
}
}

private Map> getRefreshableComponents() {
return MyApplication.get().getRefreshableComponents();
}

private void clearRefreshableComponents() {
getRefreshableComponents().clear();
}

private void createAjaxTimerBehaviors() {
final Map> refreshableComponents =
getRefreshableComponents();
Set durations = getRefreshableComponents().keySet();
for (final Duration duration : durations) {
AbstractAjaxTimerBehavior behavior = new
AbstractAjaxTimerBehavior(duration) {

private static final long serialVersionUID = 1L;

@Override
protected void onTimer(AjaxRequestTarget 
target) {
List components = 
refreshableComponents.get(duration);
for (Component component : components) {
target.addComponent(component);
}
}

};
ajaxTimerBehaviors.add(behavior);
}
}

private void addAjaxTimerBehaviors() {
for (IBehavior behavior : ajaxTimerBehaviors) {
add(behavior);
}
}

private void removeAjaxTimerBehaviors() {
for (AbstractAjaxTimerBehavior behavior : ajaxTimerBehaviors) {
behavior.stop();
remove(behavior);
}

ajaxTimerBehaviors.clear();
}

}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247320.html
Sent from the Wicket - User 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: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
I mean to have the timer attached to a component that is a sibling of
the tab. You could register component as listener of this behavior and
have the timer ask the components if the have changes to "repaint".

I´m not sure but the problem you have might happen as follows:

1-When you switch tabs you stop the behavior at server side.
2-On client side there is a queued AJAX request (timer) asking to
refresh a component.
3-When tab is switched the component the "timer" is trying to address
is no longer on the path  specified by the request.

If timer is on a sibling f the tab this will not happen.

Ernesto

On Mon, Jun 7, 2010 at 9:16 PM, Decebal Suiu  wrote:
>
> Thanks, I will try. The problem with your approach is that in our application
> each tab is a "section" that can be added using spring framework (modular
> architecture). For example the dashboards tab has many widget panels, each
> widget panel is auto refreshable (different time for different widget). Also
> each tab supports contributors (you can add panels, fragments that can be
> auto refreshable). I think that will be better to stop/remove behaviors
> automatically on tab switch and not to force each contributor to do it.
> What's mean for you "outside" the tab?
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2246419.html
> Sent from the Wicket - User 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
>
>

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



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Decebal Suiu

Thanks, I will try. The problem with your approach is that in our application
each tab is a "section" that can be added using spring framework (modular
architecture). For example the dashboards tab has many widget panels, each
widget panel is auto refreshable (different time for different widget). Also
each tab supports contributors (you can add panels, fragments that can be
auto refreshable). I think that will be better to stop/remove behaviors
automatically on tab switch and not to force each contributor to do it.
What's mean for you "outside" the tab?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2246419.html
Sent from the Wicket - User 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: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
I meant "right tab"

On Mon, Jun 7, 2010 at 3:54 PM, Ernesto Reinaldo Barreiro
 wrote:
> Why not "put" the behavior "outside" the tab and just do something if
> you are on the wight tab?
>
> Ernesto
>
> On Mon, Jun 7, 2010 at 3:07 PM, Decebal Suiu  wrote:
>>
>> When I switch to other tab I received a PageExpiredException:
>> org.apache.wicket.protocol.http.PageExpiredException: No behavior listener
>> found with behaviorId 0; Component: [MarkupContainer [Component id = panel]]
>>
>> Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior?
>> I created a visitor (in TabbedPanel.newLink) that visit all children
>> components and for each component if I found that a behavior is an instance
>> of AjaxSelfUpdatingTimerBehavior call stop method and remove the behavior
>> but the exception appears again on tab switch.
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2245915.html
>> Sent from the Wicket - User 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
>>
>>
>

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



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
Why not "put" the behavior "outside" the tab and just do something if
you are on the wight tab?

Ernesto

On Mon, Jun 7, 2010 at 3:07 PM, Decebal Suiu  wrote:
>
> When I switch to other tab I received a PageExpiredException:
> org.apache.wicket.protocol.http.PageExpiredException: No behavior listener
> found with behaviorId 0; Component: [MarkupContainer [Component id = panel]]
>
> Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior?
> I created a visitor (in TabbedPanel.newLink) that visit all children
> components and for each component if I found that a behavior is an instance
> of AjaxSelfUpdatingTimerBehavior call stop method and remove the behavior
> but the exception appears again on tab switch.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2245915.html
> Sent from the Wicket - User 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
>
>

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



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Decebal Suiu

When I switch to other tab I received a PageExpiredException:
org.apache.wicket.protocol.http.PageExpiredException: No behavior listener
found with behaviorId 0; Component: [MarkupContainer [Component id = panel]]

Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior? 
I created a visitor (in TabbedPanel.newLink) that visit all children
components and for each component if I found that a behavior is an instance
of AjaxSelfUpdatingTimerBehavior call stop method and remove the behavior
but the exception appears again on tab switch.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2245915.html
Sent from the Wicket - User 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



TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-04 Thread Decebal Suiu
Hello

I use AjaxSelfUpdatingTimerBehavior on one tab and when switching to
another tab I want to stop it.
The AjaxSelfUpdatingTimerBehavior will be active only if this tab is
selected (start timer behavior when select the tab and stop it when
select other tab).
Any help is welcome.

Thanks,
Decebal

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



Re: how to get the selected tabbedpanel

2010-06-01 Thread Igor Vaynberg
TabbedPanel#getSelectedTab()

-igor

On Tue, Jun 1, 2010 at 3:11 AM, Antonio Mauriello
 wrote:
> Hi All,
>
> I have the following issue:
>
> A wicket page where I'm working on has a Form plus an AjaxTabbedPannel.
>
> The form has only buttons that change the status of some values in the page.
>
> In each onSubmit() I set the response page to reload the same page but it
> goes the default tab and not to the one selected when I click the button.
>
> (All the buttons are outside the tabbedPanels, the panels just show
> different details..)
>
>
> Is there a way to get from an onSubmit() button method the selectedTab?
>
> I cannot find a way to call from onSubmit the getSelectedTab() and pass it
> as pageparameter to the wicketPage (to use then the setSelectedTab)
>
>
> Regards,
>
> Antonio
>

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



how to get the selected tabbedpanel

2010-06-01 Thread Antonio Mauriello
Hi All,

I have the following issue:

A wicket page where I'm working on has a Form plus an AjaxTabbedPannel.

The form has only buttons that change the status of some values in the page.

In each onSubmit() I set the response page to reload the same page but it
goes the default tab and not to the one selected when I click the button.

(All the buttons are outside the tabbedPanels, the panels just show
different details..)


Is there a way to get from an onSubmit() button method the selectedTab?

I cannot find a way to call from onSubmit the getSelectedTab() and pass it
as pageparameter to the wicketPage (to use then the setSelectedTab)


Regards,

Antonio


Re: reload a tab from TabbedPanel

2010-04-29 Thread Ernesto Reinaldo Barreiro
OT.

By the way, on wicket-extensions-1.4.7.jar I see there is file
PanelCachingTab.java.orig file that seems o be a copy of
PanelCachingTab source code? What is this file needed for? Is this the
unintended result of a copy and paste?

Best,

Ernesto

On Thu, Apr 29, 2010 at 9:45 AM, Ernesto Reinaldo Barreiro
 wrote:
> Use AbstractTab for the tab(s) you want to be reloaded every-time? Or
> roll your own implementation of ITab doing exactly what you need?
>
> Ernesto
>
> On Wed, Apr 28, 2010 at 7:26 PM, tubin gen  wrote:
>> I am using AjaxTabbedPanel and it contains   several tabs all  of them are
>>  PanelCachingTab  , can I reload  any one  tab  through ajax ?
>>
>

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



Re: reload a tab from TabbedPanel

2010-04-29 Thread Ernesto Reinaldo Barreiro
Use AbstractTab for the tab(s) you want to be reloaded every-time? Or
roll your own implementation of ITab doing exactly what you need?

Ernesto

On Wed, Apr 28, 2010 at 7:26 PM, tubin gen  wrote:
> I am using AjaxTabbedPanel and it contains   several tabs all  of them are
>  PanelCachingTab  , can I reload  any one  tab  through ajax ?
>

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



reload a tab from TabbedPanel

2010-04-28 Thread tubin gen
I am using AjaxTabbedPanel and it contains   several tabs all  of them are
 PanelCachingTab  , can I reload  any one  tab  through ajax ?


RE: TabbedPanel: tab visibility

2010-04-27 Thread Metzger, Natalie J.
Yes, I can, thanks!!!

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Tuesday, April 27, 2010 12:51 PM
To: users@wicket.apache.org
Subject: Re: TabbedPanel: tab visibility

can you not override isvisible() and do the check there?

-igor


On Tue, Apr 27, 2010 at 9:41 AM, Metzger, Natalie J.  wrote:
> Hi all,
>
> Maybe I'm blind, but is there a way to set the visibility of certain tabs in 
> the TabbedPanel? I only found the method isVisible(), but no setVisible(). My 
> goal is to have certain tabs only visible to users with corresponding 
> permissions. So far I have to add/remove tabs depending on those permissions, 
> and which is less than optimal.
> And yes, I can change the visibility of the content of the tab, but this is 
> not what I need.
>
> Any ideas?
>
> Thanks,
>                Natalie
>
> P.S. I'm using Wicket 1.4.6
>

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


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



Re: TabbedPanel: tab visibility

2010-04-27 Thread Igor Vaynberg
can you not override isvisible() and do the check there?

-igor


On Tue, Apr 27, 2010 at 9:41 AM, Metzger, Natalie J.  wrote:
> Hi all,
>
> Maybe I'm blind, but is there a way to set the visibility of certain tabs in 
> the TabbedPanel? I only found the method isVisible(), but no setVisible(). My 
> goal is to have certain tabs only visible to users with corresponding 
> permissions. So far I have to add/remove tabs depending on those permissions, 
> and which is less than optimal.
> And yes, I can change the visibility of the content of the tab, but this is 
> not what I need.
>
> Any ideas?
>
> Thanks,
>                Natalie
>
> P.S. I'm using Wicket 1.4.6
>

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



TabbedPanel: tab visibility

2010-04-27 Thread Metzger, Natalie J.
Hi all,

Maybe I'm blind, but is there a way to set the visibility of certain tabs in 
the TabbedPanel? I only found the method isVisible(), but no setVisible(). My 
goal is to have certain tabs only visible to users with corresponding 
permissions. So far I have to add/remove tabs depending on those permissions, 
and which is less than optimal.
And yes, I can change the visibility of the content of the tab, but this is not 
what I need.

Any ideas?

Thanks,
Natalie

P.S. I'm using Wicket 1.4.6


Re: add link in TabbedPanel header

2010-03-12 Thread Igor Vaynberg
sublcass the panel, copy paste its markup into your subclass.html and
add the link there

-igor

On Fri, Mar 12, 2010 at 1:15 PM, Decebal Suiu  wrote:
> Hello,
>
> I need a link (Add new tab) to be placed in the TabbedPanel header
> (probably in the div with class tab-row), to the end of tabs.
> How can I do this?
>
> Thanks,
> Decebal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



add link in TabbedPanel header

2010-03-12 Thread Decebal Suiu
Hello,

I need a link (Add new tab) to be placed in the TabbedPanel header
(probably in the div with class tab-row), to the end of tabs.
How can I do this?

Thanks,
Decebal

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



Re: TabbedPanel replaced by AjaxTabbedPanel shows request NS_BINDING_ABORTED

2010-02-08 Thread Riyad Kalla
No problem.

On Mon, Feb 8, 2010 at 11:02 PM, Kulbhushan Sharma
 wrote:
> Riyad, thanks for the explaination and the links.
>
>
>
>
>
> 
> From: Riyad Kalla 
> To: users@wicket.apache.org
> Sent: Mon, 8 February, 2010 11:12:22 PM
> Subject: Re: TabbedPanel replaced by AjaxTabbedPanel shows request  
> NS_BINDING_ABORTED
>
> Kulbhushan,
>
> I think this is the result of Wicket using abort() calls on the
> recycled XMLHttpRequest objects that are pooled as discussed here?
> http://old.nabble.com/Ajax-request-bug--td27324473.html#a27327789
>
>
>
> On Mon, Feb 8, 2010 at 3:17 AM, Kulbhushan Sharma
>  wrote:
>> Hello,
>>
>> I have the following code to implement a Ajax Tabbed Panel.
>>
>> public class TBPage extends WebPage{
>>
>>    public TBPage() {
>>        AjaxTabbedPanel tabPanel = null;
>>        List tabs = new ArrayList(2);
>>
>>        tabs.add(new TabOne());
>>        tabs.add(new TabTwo());
>>
>>        tabPanel = new AjaxTabbedPanel("tabs", tabs);
>>        this.add(tabPanel);
>>
>>
>>    }
>>
>> }
>>
>> When I access this page with FireFox and with HTTPFox enabled --- everytime 
>> I click on a Tab I get NS_BINDING_ABORTED as return status of the request 
>> before the tab appears. If I just replace AjaxTabbedPanel by TabbedPanel 
>> there is no such problem --- but obviously the whole page refreshes and I do 
>> not want that.
>>
>> Please note, all functionality works fine --- but I am concerned that this 
>> error may be root cause of something else. The link 
>> http://markmail.org/message/m6z77uoixf3qu7u6 tells us some request was 
>> aborted --- but what is that?
>>
>> Thanks for your response in advance.
>>
>> Regards,
>> Kulbhushan
>>
>>
>>
>>      Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
>> http://downloads.yahoo.com/in/internetexplorer/
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>      Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
> http://downloads.yahoo.com/in/internetexplorer/

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



Re: TabbedPanel replaced by AjaxTabbedPanel shows request NS_BINDING_ABORTED

2010-02-08 Thread Kulbhushan Sharma
Riyad, thanks for the explaination and the links.






From: Riyad Kalla 
To: users@wicket.apache.org
Sent: Mon, 8 February, 2010 11:12:22 PM
Subject: Re: TabbedPanel replaced by AjaxTabbedPanel shows request  
NS_BINDING_ABORTED

Kulbhushan,

I think this is the result of Wicket using abort() calls on the
recycled XMLHttpRequest objects that are pooled as discussed here?
http://old.nabble.com/Ajax-request-bug--td27324473.html#a27327789



On Mon, Feb 8, 2010 at 3:17 AM, Kulbhushan Sharma
 wrote:
> Hello,
>
> I have the following code to implement a Ajax Tabbed Panel.
>
> public class TBPage extends WebPage{
>
>public TBPage() {
>AjaxTabbedPanel tabPanel = null;
>List tabs = new ArrayList(2);
>
>tabs.add(new TabOne());
>tabs.add(new TabTwo());
>
>tabPanel = new AjaxTabbedPanel("tabs", tabs);
>this.add(tabPanel);
>
>
>}
>
> }
>
> When I access this page with FireFox and with HTTPFox enabled --- everytime I 
> click on a Tab I get NS_BINDING_ABORTED as return status of the request 
> before the tab appears. If I just replace AjaxTabbedPanel by TabbedPanel 
> there is no such problem --- but obviously the whole page refreshes and I do 
> not want that.
>
> Please note, all functionality works fine --- but I am concerned that this 
> error may be root cause of something else. The link 
> http://markmail.org/message/m6z77uoixf3qu7u6 tells us some request was 
> aborted --- but what is that?
>
> Thanks for your response in advance.
>
> Regards,
> Kulbhushan
>
>
>
>  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
> http://downloads.yahoo.com/in/internetexplorer/

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


  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
http://downloads.yahoo.com/in/internetexplorer/

Re: TabbedPanel replaced by AjaxTabbedPanel shows request NS_BINDING_ABORTED

2010-02-08 Thread Riyad Kalla
Kulbhushan,

I think this is the result of Wicket using abort() calls on the
recycled XMLHttpRequest objects that are pooled as discussed here?
http://old.nabble.com/Ajax-request-bug--td27324473.html#a27327789



On Mon, Feb 8, 2010 at 3:17 AM, Kulbhushan Sharma
 wrote:
> Hello,
>
> I have the following code to implement a Ajax Tabbed Panel.
>
> public class TBPage extends WebPage{
>
>    public TBPage() {
>        AjaxTabbedPanel tabPanel = null;
>        List tabs = new ArrayList(2);
>
>        tabs.add(new TabOne());
>        tabs.add(new TabTwo());
>
>        tabPanel = new AjaxTabbedPanel("tabs", tabs);
>        this.add(tabPanel);
>
>
>    }
>
> }
>
> When I access this page with FireFox and with HTTPFox enabled --- everytime I 
> click on a Tab I get NS_BINDING_ABORTED as return status of the request 
> before the tab appears. If I just replace AjaxTabbedPanel by TabbedPanel 
> there is no such problem --- but obviously the whole page refreshes and I do 
> not want that.
>
> Please note, all functionality works fine --- but I am concerned that this 
> error may be root cause of something else. The link 
> http://markmail.org/message/m6z77uoixf3qu7u6 tells us some request was 
> aborted --- but what is that?
>
> Thanks for your response in advance.
>
> Regards,
> Kulbhushan
>
>
>
>      Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
> http://downloads.yahoo.com/in/internetexplorer/

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



TabbedPanel replaced by AjaxTabbedPanel shows request NS_BINDING_ABORTED

2010-02-08 Thread Kulbhushan Sharma
Hello,

I have the following code to implement a Ajax Tabbed Panel. 

public class TBPage extends WebPage{

public TBPage() {
AjaxTabbedPanel tabPanel = null;
List tabs = new ArrayList(2);

tabs.add(new TabOne());
tabs.add(new TabTwo());

tabPanel = new AjaxTabbedPanel("tabs", tabs);
this.add(tabPanel);


}

}

When I access this page with FireFox and with HTTPFox enabled --- everytime I 
click on a Tab I get NS_BINDING_ABORTED as return status of the request before 
the tab appears. If I just replace AjaxTabbedPanel by TabbedPanel there is no 
such problem --- but obviously the whole page refreshes and I do not want that.

Please note, all functionality works fine --- but I am concerned that this 
error may be root cause of something else. The link 
http://markmail.org/message/m6z77uoixf3qu7u6 tells us some request was aborted 
--- but what is that?

Thanks for your response in advance.

Regards,
Kulbhushan



  Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
http://downloads.yahoo.com/in/internetexplorer/

RE: TabbedPanel + authorization strategy

2010-01-08 Thread Kai Mutz
You can extend TabbedPanel and overwrite the newLink() method.

toberger <mailto:torben.ber...@gmx.de> wrote:
> Okay, with your example implementation I can disable the content of
> the tab. But the tab itself is still visible. And I am searching a
> way to disable this tab itself too.
>
>
>
> Jeroen Steenbeeke wrote:
>>
>>  I believe the default behavior is to throw an
>> UnauthorizedInstantiationException
>> if component instantiation is not authorized, but you can tweak this
>> by calling
>> getSecuritySettings().setUnauthorizedComponentInstantiationListener(...).



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



Re: TabbedPanel + authorization strategy

2010-01-08 Thread Jeroen Steenbeeke
That could be a bit tricky. I figured out 1 way but it's a bit of a hack:

List removeList = new ArrayList();

for (ITab tab: tabs) {
  if (!tab.getPanel("foo").isVisible()) {
removeList.add(tab);
  }
}

tabs.removeAll(removeList);

No doubt somebody else has a more elegant way.

2010/1/8 toberger :
>
> Okay, with your example implementation I can disable the content of the tab.
> But the tab itself is still visible. And I am searching a way to disable
> this tab itself too.
>
>
>
> Jeroen Steenbeeke wrote:
>>
>>  I believe the default behavior is to throw an
>> UnauthorizedInstantiationException
>> if component instantiation is not authorized, but you can tweak this
>> by calling
>> getSecuritySettings().setUnauthorizedComponentInstantiationListener(...).
>>
>
> --
> View this message in context: 
> http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27073815.html
> Sent from the Wicket - User 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
>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: TabbedPanel + authorization strategy

2010-01-08 Thread toberger

Okay, with your example implementation I can disable the content of the tab.
But the tab itself is still visible. And I am searching a way to disable
this tab itself too.



Jeroen Steenbeeke wrote:
> 
>  I believe the default behavior is to throw an
> UnauthorizedInstantiationException
> if component instantiation is not authorized, but you can tweak this
> by calling
> getSecuritySettings().setUnauthorizedComponentInstantiationListener(...).
> 

-- 
View this message in context: 
http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27073815.html
Sent from the Wicket - User 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: TabbedPanel + authorization strategy

2010-01-08 Thread Jeroen Steenbeeke
I take it you configured wicket-auth-roles by doing
getSecuritySettings().setAuthorizationStrategy(...) in your
application's init?

If so, then the security check for that component is done by an
IComponentInstantiationListener that is automatically initialized by
the constructor of Application.

In other words: the permissions are checked automatically. I believe
the default behavior is to throw an UnauthorizedInstantiationException
if component instantiation is not authorized, but you can tweak this
by calling 
getSecuritySettings().setUnauthorizedComponentInstantiationListener(...).
An example implementation for making components invisible if not
authorized would be:

getSecuritySettings().setUnauthorizedComponentInstantiationListener(new
IUnauthorizedComponentInstantiationListener() {
  public void onUnauthorizedInstantiation(final Component component)
  {
if (component instanceof Page) {
  // Redirect to index
  throw new RestartResponseAtInterceptPageException(YourLoginPage.class);
  // Or you can just throw the original UnauthorizedInstantiationException
} else {
  component.setVisible(false);
}
}
);

DISCLAIMER: This post was constructed after studying the relevant
source for about 2 minutes and googling for about 1 minute to get some
info about wicket-auth-roles.

2010/1/8 toberger :
>
> This is my problem. How do I get the information, if the user has not the
> permission to see the panel?
>
> I create a tab list like this:
>
>  List tabs = new ArrayList();
> tabs.add(new AbstractTab(new Model("panel")) {
>
>  public Panel getPanel(String panelId) {
>    return new FooPanel(panelId);
>  }
> ...
> });
>
> And I'm securing the panel through annotation:
>
> @AuthorizeInstantiation("ADMIN")
> public class FooPanel extends Panel {
> ...
> }
>
> So the tab will be added before I get the information about its auths.
>
>
>
> James Carman-3 wrote:
>>
>> Can't you just not add the tab if the user doesn't have the
>> role/permission required?
>>
>
> --
> View this message in context: 
> http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27073005.html
> Sent from the Wicket - User 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
>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: TabbedPanel + authorization strategy

2010-01-08 Thread toberger

This is my problem. How do I get the information, if the user has not the
permission to see the panel?

I create a tab list like this:

 List tabs = new ArrayList();
tabs.add(new AbstractTab(new Model("panel")) {

  public Panel getPanel(String panelId) {
return new FooPanel(panelId);
  }
...
});

And I'm securing the panel through annotation:

@AuthorizeInstantiation("ADMIN")
public class FooPanel extends Panel {
...
}

So the tab will be added before I get the information about its auths.



James Carman-3 wrote:
> 
> Can't you just not add the tab if the user doesn't have the
> role/permission required?
> 

-- 
View this message in context: 
http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27073005.html
Sent from the Wicket - User 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: TabbedPanel + authorization strategy

2010-01-07 Thread James Carman
Can't you just not add the tab if the user doesn't have the
role/permission required?

On Thu, Jan 7, 2010 at 5:25 PM, toberger  wrote:
>
> Hi,
> I'm sorry to put such an old topic up.
> But I'm searching for a way to secure tabs with wicket-auth-roles and I
> don't want to display the tabs when the user has no authorization for its
> content panel.
>
> I can't find the source code which is related to. Maybe somone can just add
> a little code snippet how it works? That would be really great.
>
> Best regards,
> Torben
> --
> View this message in context: 
> http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27068118.html
> Sent from the Wicket - User 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
>
>

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



Re: TabbedPanel + authorization strategy

2010-01-07 Thread toberger

Hi,
I'm sorry to put such an old topic up. 
But I'm searching for a way to secure tabs with wicket-auth-roles and I
don't want to display the tabs when the user has no authorization for its
content panel.

I can't find the source code which is related to. Maybe somone can just add
a little code snippet how it works? That would be really great.

Best regards,
Torben
-- 
View this message in context: 
http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27068118.html
Sent from the Wicket - User 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: TabbedPanel, tabsVisibilityCache throws IndexOutOfBounds

2009-12-01 Thread Thies Edeling

ok, https://issues.apache.org/jira/browse/WICKET-2594 created

Igor Vaynberg wrote:

yep, with a testcase

-igor

On Tue, Dec 1, 2009 at 5:14 AM, Thies Edeling  wrote:
  

With wicket extensions 1.4.3, TabbedPanel throws an IndexOutOfBounds
exception on the tabsVisibilityCache array when adding more tabs after the
panel is rendered.

The onBeforeRender method calls the isTabVisible method which initializes an
array of booleans for visibility caching. The length of this array is the
amount of tabs added at that time. When - through ajax - a new tab is added
after rendering and setSelectedTab is called an exception is thrown at:
  Boolean visible = tabsVisibilityCache[tabIndex];

Fix: increase the array before checking or use a List:
  if (tabsVisibilityCache.length < tabIndex + 1)
  {
  tabsVisibilityCache = Arrays.copyOf(tabsVisibilityCache, tabIndex
+ 1); }

Shall I create a jira issue for this?

--Thies

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





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

  



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



Re: TabbedPanel, tabsVisibilityCache throws IndexOutOfBounds

2009-12-01 Thread Igor Vaynberg
yep, with a testcase

-igor

On Tue, Dec 1, 2009 at 5:14 AM, Thies Edeling  wrote:
> With wicket extensions 1.4.3, TabbedPanel throws an IndexOutOfBounds
> exception on the tabsVisibilityCache array when adding more tabs after the
> panel is rendered.
>
> The onBeforeRender method calls the isTabVisible method which initializes an
> array of booleans for visibility caching. The length of this array is the
> amount of tabs added at that time. When - through ajax - a new tab is added
> after rendering and setSelectedTab is called an exception is thrown at:
>   Boolean visible = tabsVisibilityCache[tabIndex];
>
> Fix: increase the array before checking or use a List:
>       if (tabsVisibilityCache.length < tabIndex + 1)
>       {
>           tabsVisibilityCache = Arrays.copyOf(tabsVisibilityCache, tabIndex
> + 1);             }
>
> Shall I create a jira issue for this?
>
> --Thies
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



TabbedPanel, tabsVisibilityCache throws IndexOutOfBounds

2009-12-01 Thread Thies Edeling
With wicket extensions 1.4.3, TabbedPanel throws an IndexOutOfBounds 
exception on the tabsVisibilityCache array when adding more tabs after 
the panel is rendered.


The onBeforeRender method calls the isTabVisible method which 
initializes an array of booleans for visibility caching. The length of 
this array is the amount of tabs added at that time. When - through ajax 
- a new tab is added after rendering and setSelectedTab is called an 
exception is thrown at:

   Boolean visible = tabsVisibilityCache[tabIndex];

Fix: increase the array before checking or use a List:
   if (tabsVisibilityCache.length < tabIndex + 1)
   {
   tabsVisibilityCache = Arrays.copyOf(tabsVisibilityCache, 
tabIndex + 1);   
   }


Shall I create a jira issue for this?

--Thies

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



Re: How to use IAuthorizationStrategy to control TabbedPanel title?

2009-11-29 Thread pthdh

Hi Haulyn,

   It should be no different. Lets say one of the panel you use is called
EditTypePanel which needs authorization, you 
can simply check like with the code shown below.

@Override
protected void init() {
super.init();

getSecuritySettings().setAuthorizationStrategy(new
IAuthorizationStrategy() {
public boolean isActionAuthorized(Component component, 
Action action) {
return true;

}

public  boolean 
isInstantiationAuthorized(Class
componentClass) {
if 
(EditTypePanel.class.isAssignableFrom(componentClass)) {
// Is user signed in?
if (((OASSession) 
Session.get()).isSignedIn()) {
// okay to proceed
return true;
}

// Force sign in
throw new 
RestartResponseAtInterceptPageException(LoginPage.class);
}
return true;
}
});




Haulyn R. Jason wrote:
> 
> Hi,
> 
> I use IAuthorizationStrategy to control all my applications, but I do not
> know how to control TabbedPanel.
> 
> I have three panels, I can control the panel itself, but in the same way,
> I
> write code to control the tabbledPanel title to display or not, it does
> not
> work.
> 
> Is there a way to control that? Thanks.
> 
> -- 
> Thanks!
> 
> VVThumb Production
> 
> Location:  Shumagang 6H-8, Jinan, Shandong, China 25
> Mobile: +086-15864011231
> email: haulynja...@vvthumb.com
> website: http://haulynjason.net
> gtalk: saharab...@gmail.com
> skype: saharabear
> QQ: 378606292
> msn:saharab...@gmail.com 
> yahoo:jia_hao...@yahoo.com 
> Twitter: http://twitter.com/saharabear
> Linkedin: http://www.linkedin.com/in/haulyn
> 
> Haulyn Jason
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-use-IAuthorizationStrategy-to-control-TabbedPanel-title--tp26403580p26560481.html
Sent from the Wicket - User 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: TabbedPanel no IModel?

2009-11-27 Thread Johan Compagner
yes that component isnt nicely written, the tabs field should be a model
(make a jira entry for this)

but from the outside you can use:

public final List getTabs()
{
return tabs;
}


to add or remove tabs.

That is the same list as you give the constructor
So you could use that as your model object
Just have your own kind of List impl and fill that up dynamically

johan


On Fri, Nov 27, 2009 at 10:54, Gatos  wrote:

> Hello,
>
> I need to use LoadableDetachableModel to retrieve list from the database
> when locale has been changed.
> I haven't found a costructor that took IModel as a parameter in the
> TabbedPanel component.
>
> How is it possible to reload the list without model?
>
>
> Thank you in advance
>


TabbedPanel no IModel?

2009-11-27 Thread Gatos
Hello,

I need to use LoadableDetachableModel to retrieve list from the database
when locale has been changed.
I haven't found a costructor that took IModel as a parameter in the
TabbedPanel component.

How is it possible to reload the list without model?


Thank you in advance


How to use IAuthorizationStrategy to control TabbedPanel title?

2009-11-17 Thread Haulyn R. Jason
Hi,

I use IAuthorizationStrategy to control all my applications, but I do not
know how to control TabbedPanel.

I have three panels, I can control the panel itself, but in the same way, I
write code to control the tabbledPanel title to display or not, it does not
work.

Is there a way to control that? Thanks.

-- 
Thanks!

VVThumb Production

Location:  Shumagang 6H-8, Jinan, Shandong, China 25
Mobile: +086-15864011231
email: haulynja...@vvthumb.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
skype: saharabear
QQ: 378606292
msn:saharab...@gmail.com 
yahoo:jia_hao...@yahoo.com 
Twitter: http://twitter.com/saharabear
Linkedin: http://www.linkedin.com/in/haulyn

Haulyn Jason


Re: Proposal: TabbedPanel variant that does all the work on the client

2009-11-08 Thread Ernesto Reinaldo Barreiro
The advantage of plain JavaScript is that then even people not wanting to
use jQuery for their projects can use it... All you need to do is create is
 JS functions that hide-show the the tabs... I'm not a JS expert but if you
put the code somewhere I can try to help with that part.

Best,

Ernesto

On Mon, Nov 9, 2009 at 1:17 AM, spam2...@meeque.de wrote:

> Hi Ernesto,
>
>
> > Is your implementation using jQuery? Then  maybe you should try to
> > contact someone behind some of the jQuery-Wicket related projects out
> > there and see if your component could feet on one of those projects.
>
> Yes, right now it's using jQuery. I'll have a look at jQuery-Wicket, and
> see if it fits in with it...
>
> > It would be nice, and not difficult to achieve I guess, to have that
> > component not depending on any JavaScript library, but simple an
> > plain JavaScript.
>
> I'd prefer that actually, although plain JavaScript is a little
> cumbersome. Is there not some small Wicket-specific JavaScript library I
> could build upon?
>
>
> Regards,
> Michael
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Proposal: TabbedPanel variant that does all the work on the client

2009-11-08 Thread spam2...@meeque.de
Hi Ernesto,


> Is your implementation using jQuery? Then  maybe you should try to
> contact someone behind some of the jQuery-Wicket related projects out
> there and see if your component could feet on one of those projects.

Yes, right now it's using jQuery. I'll have a look at jQuery-Wicket, and
see if it fits in with it...

> It would be nice, and not difficult to achieve I guess, to have that
> component not depending on any JavaScript library, but simple an
> plain JavaScript.

I'd prefer that actually, although plain JavaScript is a little
cumbersome. Is there not some small Wicket-specific JavaScript library I
could build upon?


Regards,
Michael


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



Re: Proposal: TabbedPanel variant that does all the work on the client

2009-11-08 Thread spam2...@meeque.de
Thanks for the advice Mike!

> You should:
> 
> 1. Get a sourceforge account.
> 2. Request on d...@wicket.apache.org to be given commit access to the
> wicketstuff repository.
> 
> I think 'wicketstuff-minis' might be the most suitable place for your
> code since it is fairly small. [...]

For now, I created a corresponding issue in Jira, and attached my code:
http://wicketstuff.org/jira/browse/WSMINIS-11

If you really want to grant me commit access, I'll put it into the SVN
myself. Here's my SourceForge user id: 2693911


Regards,
Michael


>> I'm pretty new on this list and I don't know if this is the right place
>> for such contributions. However, I recently developed a subclass of
>> TabbedPanel (from wicket-extensions) that IMHO may be useful for others,
>> so I'd like to share it.
>>
>> The main idea is that it's a drop-in replacement for TabbedPanel, but it
>> does all the work on the client side. That is, all the tab contents are
>> preloaded, and the user can switch between the tabs using client-side
>> JavaScript only. No additional HTTP Requests involved.
>>
>> The good thing is, that this fits in really neatly with all the other
>> TabbedPanel stuff. My new class ClientSideTabbedPanel is only a few
>> lines of Java and JavaScript code, and no markup. But it still supports
>> fallback, if JavaScript is deactivated.
>>
>> The main benefit of ClientSideTabbedPanel is that it is more responsive
>> when switching tabs. It may also be better in terms of search engine
>> optimization, since all the tab-contents are being indexed in one page.
>>
>> You can see it in action here for instance:
>> http://www.airline-direct.de/fluege/nach/London-LON
>>
>> So, how can I share this? Should I just post the code to this list?
>> Anyone interested at all?


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



Re: how to get TextField value which belongs to the first tab when click on the button which belongs to tabbedpanel

2009-10-07 Thread Igor Vaynberg
when dealing with tabs inside a form there are two options you can go with:

a) the easiest is to use javascript tabs and have the entire form on a
single html page. this works best imho.
b) put the tabbed panel into a form, replace tabbed panel's links with
submitlinks so switching tabs submits the form and persists the values
across requests.

-igor

On Wed, Oct 7, 2009 at 2:43 AM,   wrote:
> There are 3 tabs in a tabbedpanel, a TextField component is in the first tab, 
> and several form components in the other tabs for user input. I added a save 
> button in the tabbedpanel(instead add 3 buttons in each tab, because I just 
> want to save all user inputs by one click), my question is, how to get the 
> TextField value whick is belonged to the first tab when click on the save 
> button.
>
> Html Code:
>                [tabbed panel will be here]
>                
>                         value="Submit" />
>                
> Java Code:
>                final List tabs = new ArrayList();
>                tabs.add(new AbstractTab(new Model("tab1"))
>                {
>                       �...@override
>                        public Panel getPanel(String panelId)
>                        {
>                                return new TaskCreateTabPanel1(panelId);
>                        }
>                });
>
>                tabs.add(new AbstractTab(new Model("tab2"))
>                {
>                       �...@override
>                        public Panel getPanel(String panelId)
>                        {
>                                return new TaskCreateTabPanel2(panelId);
>                        }
>                });
>
>                tabs.add(new AbstractTab(new Model("tab3"))
>                {
>                       �...@override
>                        public Panel getPanel(String panelId)
>                        {
>                                return new TaskCreateTabPanel3(panelId);
>                        }
>                });
>
>                add(new TabbedPanel("tabs", tabs).add(new 
> AttributeModifier("class", true, this.getDefaultModel(;
>
>            Form form = new Form("form") {
>                protected void onSubmit() {
>                }
>            };
>
>            Button buttonsave = new Button("buttonsave") {
>                public void onSubmit()
>                {
>                                //Here we should get the TextField value and 
> save it into db
>                }
>            };
>            form.add(buttonsave);
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: how to get TextField value which belongs to the first tab when click on the button which belongs to tabbedpanel

2009-10-07 Thread Michael O'Cleirigh

Hi Jerry,

Your implementation isn't working because:

1. tabs have to be contained with in the form to be part of the submission:


[tabbed panel will be here]




2.  only the active tab is actually rendered in the browser and only it 
will participate in the form submission.   So if the fields on each tab 
are exclusive then it will work otherwise you will have to take steps to 
make sure that the panel contents are submitted /pushed to the server 
side when the tab is changed. 

One approach I've used for this type of case is a tab panel where the 
tabs aren't replaced via an AJAX request but rather the containing div 
is set to 'display: none' or 'display: block' as required. Since the 
form submission process doesn't care about visibility all the components 
on all the tabs will be submitted.


3. Your tab panels need to have an IModel model.  Each 
field in the business object is wired up to the various TextField's you 
have and will allow the complete business object to be built and useable 
during the form submission process.


Regards,

Mike



There are 3 tabs in a tabbedpanel, a TextField component is in the first tab, 
and several form components in the other tabs for user input. I added a save 
button in the tabbedpanel(instead add 3 buttons in each tab, because I just 
want to save all user inputs by one click), my question is, how to get the 
TextField value whick is belonged to the first tab when click on the save 
button.

Html Code:
[tabbed panel will be here]



Java Code:
final List tabs = new ArrayList();
tabs.add(new AbstractTab(new Model("tab1"))
{
@Override
public Panel getPanel(String panelId)
{
return new TaskCreateTabPanel1(panelId);
}
});

tabs.add(new AbstractTab(new Model("tab2"))
{
@Override
public Panel getPanel(String panelId)
{
return new TaskCreateTabPanel2(panelId);
}
});

tabs.add(new AbstractTab(new Model("tab3"))
{
@Override
public Panel getPanel(String panelId)
{
return new TaskCreateTabPanel3(panelId);
    }
});

add(new TabbedPanel("tabs", tabs).add(new 
AttributeModifier("class", true, this.getDefaultModel(;

Form form = new Form("form") {
protected void onSubmit() {
}
};

Button buttonsave = new Button("buttonsave") {
		public void onSubmit() 
		{

//Here we should get the TextField value and 
save it into db
}
};
form.add(buttonsave);



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

  



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



Re: how to get TextField value which belongs to the first tab when click on the button which belongs to tabbedpanel

2009-10-07 Thread Swanthe Lindgren

jerr...@sohu.com wrote:

There are 3 tabs in a tabbedpanel, a TextField component is in the first tab, 
and several form components in the other tabs for user input. I added a save 
button in the tabbedpanel(instead add 3 buttons in each tab, because I just 
want to save all user inputs by one click), my question is, how to get the 
TextField value whick is belonged to the first tab when click on the save 
button.

  
Let all tabs share the same model which you update using 
AjaxFormComponentUpdatingBehavior("onchange").


//Swanthe


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



Re: how to get TextField value which belongs to the first tab when click on the button which belongs to tabbedpanel

2009-10-07 Thread Pedro Santos
It is up to your object structure, use wicket api to get such object
reference sounds bad

On Wed, Oct 7, 2009 at 6:43 AM,  wrote:

> There are 3 tabs in a tabbedpanel, a TextField component is in the first
> tab, and several form components in the other tabs for user input. I added a
> save button in the tabbedpanel(instead add 3 buttons in each tab, because I
> just want to save all user inputs by one click), my question is, how to get
> the TextField value whick is belonged to the first tab when click on the
> save button.
>
> Html Code:
>[tabbed panel will be here]
>
> value="Submit" />
>
> Java Code:
>final List tabs = new ArrayList();
>tabs.add(new AbstractTab(new Model("tab1"))
>{
>@Override
>public Panel getPanel(String panelId)
>{
>return new TaskCreateTabPanel1(panelId);
>}
>});
>
>tabs.add(new AbstractTab(new Model("tab2"))
>{
>@Override
>public Panel getPanel(String panelId)
>{
>return new TaskCreateTabPanel2(panelId);
>}
>});
>
>tabs.add(new AbstractTab(new Model("tab3"))
>{
>@Override
>public Panel getPanel(String panelId)
>    {
>    return new TaskCreateTabPanel3(panelId);
>}
>});
>
>add(new TabbedPanel("tabs", tabs).add(new
> AttributeModifier("class", true, this.getDefaultModel(;
>
>Form form = new Form("form") {
>protected void onSubmit() {
>}
>};
>
>Button buttonsave = new Button("buttonsave") {
>public void onSubmit()
>{
>//Here we should get the TextField value and
> save it into db
>}
>};
>form.add(buttonsave);
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


how to get TextField value which belongs to the first tab when click on the button which belongs to tabbedpanel

2009-10-07 Thread jerryws
There are 3 tabs in a tabbedpanel, a TextField component is in the first tab, 
and several form components in the other tabs for user input. I added a save 
button in the tabbedpanel(instead add 3 buttons in each tab, because I just 
want to save all user inputs by one click), my question is, how to get the 
TextField value whick is belonged to the first tab when click on the save 
button.

Html Code:
[tabbed panel will be here]



Java Code:
final List tabs = new ArrayList();
tabs.add(new AbstractTab(new Model("tab1"))
{
@Override
public Panel getPanel(String panelId)
{
return new TaskCreateTabPanel1(panelId);
}
});

tabs.add(new AbstractTab(new Model("tab2"))
{
@Override
public Panel getPanel(String panelId)
{
return new TaskCreateTabPanel2(panelId);
}
});

tabs.add(new AbstractTab(new Model("tab3"))
{
@Override
public Panel getPanel(String panelId)
{
return new TaskCreateTabPanel3(panelId);
}
    });

    add(new TabbedPanel("tabs", tabs).add(new 
AttributeModifier("class", true, this.getDefaultModel(;

Form form = new Form("form") {
protected void onSubmit() {
}
};

Button buttonsave = new Button("buttonsave") {
public void onSubmit() 
{
//Here we should get the TextField value and 
save it into db
}
};
form.add(buttonsave);



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



Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update

2009-09-25 Thread Pedro Santos
I couldn't simulate, can you send the stack trace?

On Fri, Sep 25, 2009 at 1:25 PM, Jens Zastrow  wrote:

> ok i'm a little bit confused :-(
>
> I didt want to invoke 'tabs.remove()' during a onRender(), but during the
> onClick() method of by AjaxFallbackLink - like in your example.
> Using a normal Link the TabbedPanel doesnt throw the exception.
>
> Try your example with the AjaxTabbedPane and a AjaxFallbackLink.
> Then in onClick() you have to add the  the the AjaxRequestTarget, which
> later leads to the ArrayIndexOutOfBoundsException.
>
> Pedro Santos schrieb:
>
> --
> dipl. inform jens zastrow
>
> phone | +49.152.04840108
> mail  | m...@jens-zastrow.de
> web   | http://jens-zastrow.de
> xing  | http://www.xing.com/profile/Jens_Zastrow
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update

2009-09-25 Thread Jens Zastrow

ok i'm a little bit confused :-(

I didt want to invoke 'tabs.remove()' during a onRender(), but during 
the onClick() method of by AjaxFallbackLink - like in your example.

Using a normal Link the TabbedPanel doesnt throw the exception.

Try your example with the AjaxTabbedPane and a AjaxFallbackLink.
Then in onClick() you have to add the  the the AjaxRequestTarget, 
which later leads to the ArrayIndexOutOfBoundsException.


Pedro Santos schrieb:

--
dipl. inform jens zastrow

phone | +49.152.04840108
mail  | m...@jens-zastrow.de
web   | http://jens-zastrow.de
xing  | http://www.xing.com/profile/Jens_Zastrow


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



Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update

2009-09-25 Thread Pedro Santos
A mean remove a tab fom the model. Take a look at this code:

public class HomePage extends WebPage
{
final List tabs = new ArrayList();

public HomePage(final PageParameters parameters)
{
tabs.add(new AbstractTab(new Model("tab 1"))
{

@Override
public Panel getPanel(String panelId)
{
return new EmptyPanel(panelId);
}
});
tabs.add(new AbstractTab(new Model("tab 2"))
{

@Override
public Panel getPanel(String panelId)
{
return new EmptyPanel(panelId);
}
});
TabbedPanel tp = new TabbedPanel("tp", tabs);
add(tp);
add(new Link("remove")
{
@Override
public void onClick()
{
tabs.remove(0);
}
});
}

@Override
protected void onRender(MarkupStream markupStream)
{
tabs.remove(0);
super.onRender(markupStream);
}
}


this line :

tabs.remove(0);
will throw an exception if was called from onRender method, and will not if
was called from onClick. The diferrence is that the onClick will to be
executed before the render phase

On Fri, Sep 25, 2009 at 11:41 AM, Jens Zastrow  wrote:

> Did you  mean the the tab from the TabbedPanel or the whole TabbedPane from
> my page?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update

2009-09-25 Thread Jens Zastrow
Did you  mean the the tab from the TabbedPanel or the whole TabbedPane 
from my page?


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



Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update

2009-09-25 Thread Pedro Santos
You can avoid this exception making sure to remove the tab from your panel
before the request cycle enter in RESPOND step.

On Fri, Sep 25, 2009 at 9:05 AM, Jens Zastrow  wrote:

> Hi,
>
> The TabbedPanel internaly uses a Loop to render the tab-components. During
> a normla GET request the Loop.onPopulate() method ensures that all the
> loop-childs are removed before adding them again
> to support a possible change of teh underlying Integer-model.
>
> Loop.onPopulate()
> @Override
>   protected final void onPopulate()
>   {
>   // Remove any previous loop contents
>   removeAll();
>
>   // Get number of iterations
>   final int iterations = getIterations();
>   if (iterations > 0)
>   {
>   // Create LoopItems for each iteration
>   for (int iteration = 0; iteration < iterations; iteration++)
>   {
>   // Create item for loop iteration
>   LoopItem item = newItem(iteration);
>
>   // Add and populate item
>   add(item);
>   populateItem(item);
>   }
>   }
> }
>
> The TabbedPanel creates the following LoopItem which access the ITab-List
> directly.
>
> return new LoopItem(tabIndex)
>   {
>   private static final long serialVersionUID = 1L;
>
>   @Override
>   protected void onComponentTag(ComponentTag tag){...}
>
>   @Override
>   public boolean isVisible() {
>   // direct access of the tab
>   return getTabs().get(tabIndex).isVisible();
>   }
>   };
>
> The problem now is, if the tabs-list is modfied for example deleted, the
> onPopulate() method NEEDs to be invoked before
> the LoopItem.isVisible() the ensure that the old-Loop-childs (LoopItem) are
> deleted.
> This does not happen (Why?) if the TabbedPanel is added/updated in an
> ajax-call, resulting in ArrayIndexOufBounds-Exception
> in the LoopItem.isVisible() Method. (tabs.get(tabIndex)).
>
> My workaround currently is to invoke the onPopulate() manually during
> deletion (by beforeRender()).
>
> ((MarkupContainer)temporalTabs.get("tabs-container")).get("tabs").beforeRender();
>
> Any Ideas, how to force the onPopulate() get called - maybe invoking
> modelChanged() on some component???
>
> Thanks
> Jens
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


  1   2   3   >