TabbedPanel

2007-10-30 Thread DRE

Hoping someone can help me out here  I've just started using Wicket and
this is what I'm trying to do:

I've got a main page that has a header, body, and footer where the body
should be used as a wicket child.  In the header I have a TabbedPanel.  When
I click on a tab I want the contents to appear in the body(not right below
the tabin the header.)  It looks all pretty and the tabs work  it's
just that when I click on the tab I want "This is Tab #1" to be displayed in
the body.   I've tried using  but to no avail. Thanks in
advance .

Code:

PanelPage.html


  
Title goes here

  
  
  

  
[tabbed panel will be
here] 
  
  
   
This is the Body

   
  

 

  
  




PanelPage.java

public class PanelPage extends WebPage 
{

public PanelPage() 
{  

final List tabs=new ArrayList();

tabs.add(new AbstractTab(new Model("My Home Page")) 
{
  public Panel getPanel(String panelId) 
  {
 return new TabPanel1(panelId);  
  } 
});

tabs.add(new AbstractTab(new Model("Leads"))   
{
 public Panel getPanel(String panelId) 
  { 
return new TabPanel2(panelId); 
  }
});
   
   
final TabbedPanel panel = new TabbedPanel("tabs", tabs);
class TabTitleModel extends Model 
{
  public Object getObject(Component comp) 
   { 
return ((ITab)
tabs.get(panel.getSelectedTab())).getTitle().getObject(null);
   }
}
add(new Label("title", new TabTitleModel()));  
add(panel);


add(new Label("footer", "This is in the footer"));  
  

}
  

}

TabbedPanel.html


 
 
  

  #  [[tab title]]   
  
 
 
 



 [panel]




TabPanel1.html




This is Tab #1





TabPanel1.java

package wicket.panel.panels;

import wicket.markup.html.panel.Panel;

public class TabPanel1 extends Panel
{
private static final long serialVersionUID = 1L;

public TabPanel1(String id) 
{
    super(id);
}

}
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-tf4719265.html#a13491072
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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



TabbedPanel problem

2009-05-10 Thread Tomáš Mihok

Hi,

I currently made this simple tab application just to try out how things 
work. I created Index.java and .html files. Java contains basicaly this:


public Index(final PageParameters parameters) {

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

   public Panel getPanel(String panelID) {
   return new IndexPlugin(panelID);
   }
   });

where IndexPlugin is reusable component (panel). Its purpose is to 
display text.

This is how IndexPlugin.html looks like:
...

IT WORKS

...

but when I build the project this is the output:

[ERROR]Mojo:
[ERROR]org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test
[ERROR]FAILED for project:
[ERROR]cnl.qos:QoSWebInterface:war:0.1
[ERROR]Reason:
[ERROR]There are test failures.
[ERROR]Please refer to 
D:\Projects\QoSWebInterface\target\surefire-reports for the individual 
test results.


and link points that error is in test.assertLabel() method in 
TestHomePage.java


Am I dong something wrong?

tm

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



Re: TabbedPanel

2007-10-30 Thread Igor Vaynberg
see here for an example:

http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.TabbedPanelPage

-igor


On 10/30/07, DRE <[EMAIL PROTECTED]> wrote:
>
> Hoping someone can help me out here  I've just started using Wicket and
> this is what I'm trying to do:
>
> I've got a main page that has a header, body, and footer where the body
> should be used as a wicket child.  In the header I have a TabbedPanel.  When
> I click on a tab I want the contents to appear in the body(not right below
> the tabin the header.)  It looks all pretty and the tabs work  it's
> just that when I click on the tab I want "This is Tab #1" to be displayed in
> the body.   I've tried using  but to no avail. Thanks in
> advance .
>
> Code:
>
> PanelPage.html
>
> 
>   
> Title goes here
> 
>   
>
>   
>
>   
> [tabbed panel will be
> here]
>   
>
>   
> This is the Body
> 
>   
>
>   
> 
>   
>
>   
> 
>
>
>
> PanelPage.java
>
> public class PanelPage extends WebPage
> {
>
> public PanelPage()
> {
>
> final List tabs=new ArrayList();
>
> tabs.add(new AbstractTab(new Model("My Home Page"))
> {
>   public Panel getPanel(String panelId)
>   {
>  return new TabPanel1(panelId);
>   }
>     });
>
> tabs.add(new AbstractTab(new Model("Leads"))
> {
>  public Panel getPanel(String panelId)
>   {
> return new TabPanel2(panelId);
>   }
> });
>
>
> final TabbedPanel panel = new TabbedPanel("tabs", tabs);
> class TabTitleModel extends Model
> {
>   public Object getObject(Component comp)
>{
> return ((ITab)
> tabs.get(panel.getSelectedTab())).getTitle().getObject(null);
>}
> }
> add(new Label("title", new TabTitleModel()));
> add(panel);
>
> add(new Label("footer", "This is in the footer"));
>
> }
>
>
> }
>
> TabbedPanel.html
>
> 
>  
>  
>   
> 
>   #  [[tab title]]
>   
>  
>  
>
>
> 
>
>  [panel]
>
> 
>
>
> TabPanel1.html
>
> 
> 
> 
> This is Tab #1
> 
> 
> 
>
>
> TabPanel1.java
>
> package wicket.panel.panels;
>
> import wicket.markup.html.panel.Panel;
>
> public class TabPanel1 extends Panel
> {
> private static final long serialVersionUID = 1L;
>
> public TabPanel1(String id)
> {
> super(id);
> }
>
> }
> --
> View this message in context: 
> http://www.nabble.com/TabbedPanel-tf4719265.html#a13491072
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel

2007-10-30 Thread DRE

Thanks for you response  that link is actually where I got started,
however, if you notice when you click the tabs the panel is displayed right
below.  When I click my tabs I want the panel to be displayed in the body in
place of the 

Any help would be greatly appreciated.



igor.vaynberg wrote:
> 
> see here for an example:
> 
> http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.TabbedPanelPage
> 
> -igor
> 
> 
> On 10/30/07, DRE <[EMAIL PROTECTED]> wrote:
>>
>> Hoping someone can help me out here  I've just started using Wicket
>> and
>> this is what I'm trying to do:
>>
>> I've got a main page that has a header, body, and footer where the body
>> should be used as a wicket child.  In the header I have a TabbedPanel. 
>> When
>> I click on a tab I want the contents to appear in the body(not right
>> below
>> the tabin the header.)  It looks all pretty and the tabs work 
>> it's
>> just that when I click on the tab I want "This is Tab #1" to be displayed
>> in
>> the body.   I've tried using  but to no avail. Thanks
>> in
>> advance .
>>
>> Code:
>>
>> PanelPage.html
>>
>> 
>>   
>> Title goes here
>> 
>>   
>>
>>   
>>
>>   
>> [tabbed panel will be
>> here]
>>   
>>
>>   
>> This is the Body
>> 
>>   
>>
>>   
>> 
>>   
>>
>>   
>> 
>>
>>
>>
>> PanelPage.java
>>
>> public class PanelPage extends WebPage
>> {
>>
>> public PanelPage()
>> {
>>
>> final List tabs=new ArrayList();
>>
>> tabs.add(new AbstractTab(new Model("My Home Page"))
>> {
>>   public Panel getPanel(String panelId)
>>   {
>>  return new TabPanel1(panelId);
>>   }
>> });
>>
>> tabs.add(new AbstractTab(new Model("Leads"))
>> {
>>  public Panel getPanel(String panelId)
>>   {
>> return new TabPanel2(panelId);
>>   }
>> });
>>
>>
>> final TabbedPanel panel = new TabbedPanel("tabs", tabs);
>> class TabTitleModel extends Model
>> {
>>   public Object getObject(Component comp)
>>{
>> return ((ITab)
>> tabs.get(panel.getSelectedTab())).getTitle().getObject(null);
>>}
>> }
>> add(new Label("title", new TabTitleModel()));
>> add(panel);
>>
>> add(new Label("footer", "This is in the footer"));
>>
>> }
>>
>>
>> }
>>
>> TabbedPanel.html
>>
>> 
>>  
>>  
>>   
>> 
>>   #  [[tab title]]
>>   
>>  
>>  
>>
>>
>> 
>>
>>  [panel]
>>
>> 
>>
>>
>> TabPanel1.html
>>
>> 
>> 
>> 
>> This is Tab #1
>> 
>> 
>> 
>>
>>
>> TabPanel1.java
>>
>> package wicket.panel.panels;
>>
>> import wicket.markup.html.panel.Panel;
>>
>> public class TabPanel1 extends Panel
>> {
>> private static final long serialVersionUID = 1L;
>>
>> public TabPanel1(String id)
>> {
>> super(id);
>> }
>>
>> }
>> --
>> View this message in context:
>> http://www.nabble.com/TabbedPanel-tf4719265.html#a13491072
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-tf4719265.html#a13492383
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel

2007-10-30 Thread Igor Vaynberg
right, and that is just now how markup inheritance or tabbed panel
works. you are way off base.

if that is what you need then instead of using wicket:child/markup
inheritance you should use replace/replaceWith() methods to put the
right panel in, and instead of using a tabbed panel you would use
something that just generates a list of links that call the
replace/replaceWith() methods...

-igor


On 10/30/07, DRE <[EMAIL PROTECTED]> wrote:
>
> Thanks for you response  that link is actually where I got started,
> however, if you notice when you click the tabs the panel is displayed right
> below.  When I click my tabs I want the panel to be displayed in the body in
> place of the 
>
> Any help would be greatly appreciated.
>
>
>
> igor.vaynberg wrote:
> >
> > see here for an example:
> >
> > http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.TabbedPanelPage
> >
> > -igor
> >
> >
> > On 10/30/07, DRE <[EMAIL PROTECTED]> wrote:
> >>
> >> Hoping someone can help me out here  I've just started using Wicket
> >> and
> >> this is what I'm trying to do:
> >>
> >> I've got a main page that has a header, body, and footer where the body
> >> should be used as a wicket child.  In the header I have a TabbedPanel.
> >> When
> >> I click on a tab I want the contents to appear in the body(not right
> >> below
> >> the tabin the header.)  It looks all pretty and the tabs work 
> >> it's
> >> just that when I click on the tab I want "This is Tab #1" to be displayed
> >> in
> >> the body.   I've tried using  but to no avail. Thanks
> >> in
> >> advance .
> >>
> >> Code:
> >>
> >> PanelPage.html
> >>
> >> 
> >>   
> >> Title goes here
> >> 
> >>   
> >>
> >>   
> >>
> >>   
> >> [tabbed panel will be
> >> here]
> >>   
> >>
> >>   
> >> This is the Body
> >> 
> >>   
> >>
> >>   
> >> 
> >>   
> >>
> >>   
> >> 
> >>
> >>
> >>
> >> PanelPage.java
> >>
> >> public class PanelPage extends WebPage
> >> {
> >>
> >> public PanelPage()
> >> {
> >>
> >> final List tabs=new ArrayList();
> >>
> >> tabs.add(new AbstractTab(new Model("My Home Page"))
> >> {
> >>   public Panel getPanel(String panelId)
> >>   {
> >>  return new TabPanel1(panelId);
> >>   }
> >> });
> >>
> >> tabs.add(new AbstractTab(new Model("Leads"))
> >> {
> >>  public Panel getPanel(String panelId)
> >>   {
> >> return new TabPanel2(panelId);
> >>   }
> >> });
> >>
> >>
> >> final TabbedPanel panel = new TabbedPanel("tabs", tabs);
> >> class TabTitleModel extends Model
> >> {
> >>   public Object getObject(Component comp)
> >>{
> >> return ((ITab)
> >> tabs.get(panel.getSelectedTab())).getTitle().getObject(null);
> >>}
> >> }
> >> add(new Label("title", new TabTitleModel()));
> >> add(panel);
> >>
> >> add(new Label("footer", "This is in the footer"));
> >>
> >> }
> >>
> >>
> >> }
> >>
> >> TabbedPanel.html
> >>
> >> 
> >>  
> >>  
> >>   
> >> 
> >>   #  [[tab title]]
> >>   
> >>  
> >>  
> >>
> >>
> >> 
> >>
> >>  [panel]
> >>
> >> 
> >>
> >>
> >> TabPanel1.html
> >>
> >> 
> >> 
> >> 
> >> This is Tab #1
> >> 
> >> 
> >> 
> >>
> >>
> >> TabPanel1.java
> >>
> >> package wicket.panel.panels;
> >>
> >> import wicket.markup.html.panel.Panel;
> >>
> >> public class TabPanel1 extends Panel
> >> {
> >> private static final long serialVersionUID = 1L;
> >>
> >> public TabPanel1(String id)
> >> {
> >> super(id);
> >> }
> >>
> >> }
> >> --
> >> View this message in context:
> >> http://www.nabble.com/TabbedPanel-tf4719265.html#a13491072
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/TabbedPanel-tf4719265.html#a13492383
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel

2007-11-01 Thread DRE

Thanks Igor  I guess I was a little mixed up.  So ... now I've got 3 tabs
(each with a list of BookmarkablePageLinkssort of a submenu)  When you
click on a BookmarkablePageLink it loads the correct panel into the body of
the main page.  All of that is great except  when I click on a submenu
item of a tab (other than the first one) the tabbedpanel always reverts back
to the first tab and it's relevant submenu.  

Ex:  Tab1 (submenu: Tab1Link1, Tab1Link2)  Tab2 (submenu:
Tab2Link1,Tab2Link2)

  If I click on ... say ... Tab2Link2 the correct panel will load but
the tabbedpanel will revert back to
  Tab1 (and it's submenu) being selected.

I believe I need to use setSelectedTab somewhere but have been unable to get
it to work.

Thanks .. 



igor.vaynberg wrote:
> 
> right, and that is just now how markup inheritance or tabbed panel
> works. you are way off base.
> 
> if that is what you need then instead of using wicket:child/markup
> inheritance you should use replace/replaceWith() methods to put the
> right panel in, and instead of using a tabbed panel you would use
> something that just generates a list of links that call the
> replace/replaceWith() methods...
> 
> -igor
> 
> 
> On 10/30/07, DRE <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for you response  that link is actually where I got started,
>> however, if you notice when you click the tabs the panel is displayed
>> right
>> below.  When I click my tabs I want the panel to be displayed in the body
>> in
>> place of the 
>>
>> Any help would be greatly appreciated.
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > see here for an example:
>> >
>> >
>> http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.TabbedPanelPage
>> >
>> > -igor
>> >
>> >
>> > On 10/30/07, DRE <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hoping someone can help me out here  I've just started using
>> Wicket
>> >> and
>> >> this is what I'm trying to do:
>> >>
>> >> I've got a main page that has a header, body, and footer where the
>> body
>> >> should be used as a wicket child.  In the header I have a TabbedPanel.
>> >> When
>> >> I click on a tab I want the contents to appear in the body(not right
>> >> below
>> >> the tabin the header.)  It looks all pretty and the tabs work 
>> >> it's
>> >> just that when I click on the tab I want "This is Tab #1" to be
>> displayed
>> >> in
>> >> the body.   I've tried using  but to no avail.
>> Thanks
>> >> in
>> >> advance .
>> >>
>> >> Code:
>> >>
>> >> PanelPage.html
>> >>
>> >> 
>> >>   
>> >> Title goes here
>> >> 
>> >>   
>> >>
>> >>   
>> >>
>> >>   
>> >> [tabbed panel will be
>> >> here]
>> >>   
>> >>
>> >>   
>> >> This is the Body
>> >> 
>> >>   
>> >>
>> >>   
>> >> 
>> >>   
>> >>
>> >>   
>> >> 
>> >>
>> >>
>> >>
>> >> PanelPage.java
>> >>
>> >> public class PanelPage extends WebPage
>> >> {
>> >>
>> >> public PanelPage()
>> >> {
>> >>
>> >> final List tabs=new ArrayList();
>> >>
>> >> tabs.add(new AbstractTab(new Model("My Home Page"))
>> >> {
>> >>   public Panel getPanel(String panelId)
>> >>   {
>> >>  return new TabPanel1(panelId);
>> >>   }
>> >> });
>> >>
>> >> tabs.add(new AbstractTab(new Model("Leads"))
>> >> {
>> >>  public Panel getPanel(String panelId)
>> >>   {
>> >> return new TabPanel2(panelId);
>> >>   }
>> >> });
>> >>
>> >>
>> >> final TabbedPanel panel = new TabbedPanel("tabs", tabs);
>> >> class TabTitleModel extends Mo

TabbedPanel question

2007-11-02 Thread DRE

I have a question about the TabbedPanel.  I've got a page that has a header,
body, and footer.  I've got a tabbedpanel with 3 tabs (each with a list of
BookmarkablePageLinkssort of a submenu) in the header.  When you click
on a BookmarkablePageLink it loads the correct panel into the body of the
main page.  All of that is great except  when I click on a submenu item
of a tab (other than the first one) the tabbedpanel always reverts back to
the first tab and it's relevant submenu.  

Ex:  Tab1 (submenu: Tab1Link1, Tab1Link2)  Tab2 (submenu:
Tab2Link1,Tab2Link2)

  If I click on ... say ... Tab2Link2 the correct panel will load but
the tabbedpanel will revert back to
  Tab1 (and it's submenu) being selected.

I believe I need to use setSelectedTab somewhere but have been unable to get
it to work.

Thanks .. 
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-question-tf4737525.html#a13547959
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel#addTab

2008-12-08 Thread alexander.elsholz

Hi,

exists a possibility to add a new tab to an ajax-tabbed-pane without
replacing existing instance?

the reason, because of i wont replace my tab is to hold the component-state
of the
other tabs.

regards alex
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-addTab-tp20895138p20895138.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel customization ?

2009-01-04 Thread Piotr Jakubowski

Hi,
Is it possible to tell TabbedPanel where to put its inner elements and
override the default action? I would like to have the tab content in some
other place than it is usually. And I am thinking whether it is possible
somehow using TabbedPanel or I should write the whole thing from scratch.
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-customization---tp21276126p21276126.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



vertical TabbedPanel

2007-12-07 Thread Beyonder Unknown

Hi All,

Have anybody here implemented a vertical TabbedPanel? I looked at wicket 
extension tabbedPanel but it doesn't have a property to render vertical one.

Any help will be greatly appreciated.

Regards,
Allan
 
--
The only constant in life is change.




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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 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


Re: TabbedPanel problem

2009-05-10 Thread Clint Popetz
It looks like you are using the standard wicket quickstart archetype,
and you've changed the HomePage (or perhaps deleted it entirely) but
haven't altered the corresponding sample test in
src/test/java/**/TestHomePage.java, which is expecting to find the
Label that the default quickstart puts in HomePage.{java,html}.

-Clint

2009/5/10 Tomáš Mihok :
> Hi,
>
> I currently made this simple tab application just to try out how things
> work. I created Index.java and .html files. Java contains basicaly this:
>
> public Index(final PageParameters parameters) {
>
>       tabs.add(new AbstractTab(new Model("Index")) {
>
>           public Panel getPanel(String panelID) {
>               return new IndexPlugin(panelID);
>           }
>       });
>
> where IndexPlugin is reusable component (panel). Its purpose is to display
> text.
> This is how IndexPlugin.html looks like:
> ...
> 
> IT WORKS
> 
> ...
>
> but when I build the project this is the output:
>
> [ERROR]Mojo:
> [ERROR]    org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test
> [ERROR]FAILED for project:
> [ERROR]    cnl.qos:QoSWebInterface:war:0.1
> [ERROR]Reason:
> [ERROR]There are test failures.
> [ERROR]Please refer to D:\Projects\QoSWebInterface\target\surefire-reports
> for the individual test results.
>
> and link points that error is in test.assertLabel() method in
> TestHomePage.java
>
> Am I dong something wrong?
>
> tm
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Clint Popetz
http://42lines.net
Scalable Web Application Development

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



Re: TabbedPanel problem

2009-05-10 Thread Tomáš Mihok

Thank you for your reply,

I just chcecked the test but it seems OK

public void testRenderMyPage()
   {
   //start and render the test page
   tester.startPage(Index.class);

   //assert rendered page class
   tester.assertRenderedPage(Index.class);

   //assert rendered label component
   tester.assertLabel("message", "If you see this message wicket is 
properly configured and running");

   }

as I have used Refactor to rename HomePage to Index. Soyou think this 
might be the problem?


tm

Clint Popetz  wrote / napísal(a):

It looks like you are using the standard wicket quickstart archetype,
and you've changed the HomePage (or perhaps deleted it entirely) but
haven't altered the corresponding sample test in
src/test/java/**/TestHomePage.java, which is expecting to find the
Label that the default quickstart puts in HomePage.{java,html}.

-Clint

2009/5/10 Tomáš Mihok :
  

Hi,

I currently made this simple tab application just to try out how things
work. I created Index.java and .html files. Java contains basicaly this:

public Index(final PageParameters parameters) {

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

  public Panel getPanel(String panelID) {
  return new IndexPlugin(panelID);
  }
  });

where IndexPlugin is reusable component (panel). Its purpose is to display
text.
This is how IndexPlugin.html looks like:
...

IT WORKS

...

but when I build the project this is the output:

[ERROR]Mojo:
[ERROR]org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test
[ERROR]FAILED for project:
[ERROR]cnl.qos:QoSWebInterface:war:0.1
[ERROR]Reason:
[ERROR]There are test failures.
[ERROR]Please refer to D:\Projects\QoSWebInterface\target\surefire-reports
for the individual test results.

and link points that error is in test.assertLabel() method in
TestHomePage.java

Am I dong something wrong?

tm

-
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 problem

2009-05-10 Thread Clint Popetz
assertLabel is looking for a top-level label component with wicket:id
"label" and it's not finding one.  You'll need to post Index.html if
you want me to tell you why, but I'm guessing you could look at
Index.html and see if it has a "message" label contained by no other
wicket components, and also whether Index.java is still adding that
label to the page.

You need to stop and think about the exception you're getting.  Step
through it in the debugger.  What's it telling you?

-Clint

2009/5/10 Tomáš Mihok :
> Thank you for your reply,
>
> I just chcecked the test but it seems OK
>
> public void testRenderMyPage()
>   {
>       //start and render the test page
>       tester.startPage(Index.class);
>
>       //assert rendered page class
>       tester.assertRenderedPage(Index.class);
>
>       //assert rendered label component
>       tester.assertLabel("message", "If you see this message wicket is
> properly configured and running");
>   }
>
> as I have used Refactor to rename HomePage to Index. Soyou think this might
> be the problem?
>
> tm
>
> Clint Popetz  wrote / napísal(a):
>>
>> It looks like you are using the standard wicket quickstart archetype,
>> and you've changed the HomePage (or perhaps deleted it entirely) but
>> haven't altered the corresponding sample test in
>> src/test/java/**/TestHomePage.java, which is expecting to find the
>> Label that the default quickstart puts in HomePage.{java,html}.
>>
>> -Clint
>>
>> 2009/5/10 Tomáš Mihok :
>>
>>>
>>> Hi,
>>>
>>> I currently made this simple tab application just to try out how things
>>> work. I created Index.java and .html files. Java contains basicaly this:
>>>
>>> public Index(final PageParameters parameters) {
>>>
>>>      tabs.add(new AbstractTab(new Model("Index")) {
>>>
>>>          public Panel getPanel(String panelID) {
>>>              return new IndexPlugin(panelID);
>>>          }
>>>      });
>>>
>>> where IndexPlugin is reusable component (panel). Its purpose is to
>>> display
>>> text.
>>> This is how IndexPlugin.html looks like:
>>> ...
>>> 
>>> IT WORKS
>>> 
>>> ...
>>>
>>> but when I build the project this is the output:
>>>
>>> [ERROR]Mojo:
>>> [ERROR]    org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test
>>> [ERROR]FAILED for project:
>>> [ERROR]    cnl.qos:QoSWebInterface:war:0.1
>>> [ERROR]Reason:
>>> [ERROR]There are test failures.
>>> [ERROR]Please refer to
>>> D:\Projects\QoSWebInterface\target\surefire-reports
>>> for the individual test results.
>>>
>>> and link points that error is in test.assertLabel() method in
>>> TestHomePage.java
>>>
>>> Am I dong something wrong?
>>>
>>> tm
>>>
>>> -
>>> 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
>
>



-- 
Clint Popetz
http://42lines.net
Scalable Web Application Development

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



Re: TabbedPanel problem

2009-05-10 Thread Tomáš Mihok

 
 
 [tabbed panel will be 
here]

 
 

this is Index.html (without html, title, head etc.). There is a label in 
HomePage.java when you create new project but i removed it and I did 
same thing in .html.


Index.java doesnt add any Label.

tm

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



Form with TabbedPanel

2007-10-08 Thread martinf

Hi,

I have a question on implementing validation in a form that conatins a
TabbedPanel, where the Tabs themself contain FormComponents.

The wishtlist goes like this:
The Tabs ought to be able to validate themselve, like first validating
FormComponents and then the TabPanel as a whole.
On switching Tabs the visible TabPanel should validate itself and if its not
valid disalow switching.
On submitting the Form the visible TabPanel should validate and then the
other TabPanels should validate. If a TabPanel is not valid it should be
switched to.

I understand that I could validate the whole form based on the underlying
model, but I'd like to push the validation as far into the Tabs and the
FormComponents as possible. That way it would be easy to 'pop up' the
FormComponent or its Panel that has objections about the validity.

At the moment I have the feeling that the Panels in the Tabs ought to be
able to validate temthelves and TabbedPanel ought to be able to trigger that
validation. Currently I'm lacking the overview to implement that.

Any ideas on an efficient aproach on this?

Martin
-- 
View this message in context: 
http://www.nabble.com/Form-with-TabbedPanel-tf4588759.html#a13098409
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel + authorization strategy

2007-11-26 Thread Marieke Vandamme

Hello, 

Is it possible to use TabbedPanel from wicket extensions together with the
wicket auth-roles?

Because TabbedPanel contains AbstractTab (which do not extend Component), I
didn't find a way to set the specific roles for each tab.

Thanks !
-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13949910
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel#addTab

2008-12-08 Thread Thies Edeling
Yes you can add a new or replace existing tabs. Just add the 
MultiTabbedPanel to an ajaxrequesttarget to update the tabs.


alexander.elsholz wrote:

Hi,

exists a possibility to add a new tab to an ajax-tabbed-pane without
replacing existing instance?

the reason, because of i wont replace my tab is to hold the component-state
of the
other tabs.

regards alex
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel#addTab

2008-12-08 Thread alexander.elsholz

hi,

i don't understand your solution.
int i counter=0;
...
AjaxTabbedPanel() tab = new AjaxTabbedPanel("tabs", new ArrayList())
add(tab);
add(new AjaxLink("link")
{
public void onClick(AjaxRequestTarget target)
{
tab.add(new AbstractTab(new Model("tab" + counter)) {
 public Panel getPanel(String panelId) { return new
..; }
 });

target.addComponent(tab);
}
});


vut i don't know how to add a new entry in tabbedpanes model.

regards ales


Thies Edeling wrote:
> 
> Yes you can add a new or replace existing tabs. Just add the 
> MultiTabbedPanel to an ajaxrequesttarget to update the tabs.
> 
> alexander.elsholz wrote:
>> Hi,
>>
>> exists a possibility to add a new tab to an ajax-tabbed-pane without
>> replacing existing instance?
>>
>> the reason, because of i wont replace my tab is to hold the
>> component-state
>> of the
>> other tabs.
>>
>> regards alex
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-addTab-tp20895138p20896683.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel#addTab

2008-12-08 Thread Thies Edeling
I don't understand your question :) the tab list is just a list with 
AbstractTabs. Retrieve the list (getTabs() on TabbedPanel), add a new 
AbstractTab et voila.


alexander.elsholz wrote:

hi,

i don't understand your solution.
int i counter=0;
...
AjaxTabbedPanel() tab = new AjaxTabbedPanel("tabs", new ArrayList())
add(tab);
add(new AjaxLink("link")
{
public void onClick(AjaxRequestTarget target)
{
tab.add(new AbstractTab(new Model("tab" + counter)) {
 public Panel getPanel(String panelId) { return new
..; }
 });

target.addComponent(tab);
}
});


vut i don't know how to add a new entry in tabbedpanes model.

regards ales


Thies Edeling wrote:
  
Yes you can add a new or replace existing tabs. Just add the 
MultiTabbedPanel to an ajaxrequesttarget to update the tabs.


alexander.elsholz wrote:


Hi,

exists a possibility to add a new tab to an ajax-tabbed-pane without
replacing existing instance?

the reason, because of i wont replace my tab is to hold the
component-state
of the
other tabs.

regards alex
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel#addTab

2008-12-08 Thread alexander.elsholz

hi,

thanks a lot.

regards alex


Thies Edeling wrote:
> 
> I don't understand your question :) the tab list is just a list with 
> AbstractTabs. Retrieve the list (getTabs() on TabbedPanel), add a new 
> AbstractTab et voila.
> 
> alexander.elsholz wrote:
>> hi,
>>
>> i don't understand your solution.
>> int i counter=0;
>> ...
>> AjaxTabbedPanel() tab = new AjaxTabbedPanel("tabs", new ArrayList())
>> add(tab);
>> add(new AjaxLink("link")
>> {
>> public void onClick(AjaxRequestTarget target)
>> {
>> tab.add(new AbstractTab(new Model("tab" + counter)) {
>>  public Panel getPanel(String panelId) { return new
>> ..; }
>>  });
>>
>> target.addComponent(tab);
>> }
>> });
>>
>>
>> vut i don't know how to add a new entry in tabbedpanes model.
>>
>> regards ales
>>
>>
>> Thies Edeling wrote:
>>   
>>> Yes you can add a new or replace existing tabs. Just add the 
>>> MultiTabbedPanel to an ajaxrequesttarget to update the tabs.
>>>
>>> alexander.elsholz wrote:
>>> 
>>>> Hi,
>>>>
>>>> exists a possibility to add a new tab to an ajax-tabbed-pane without
>>>> replacing existing instance?
>>>>
>>>> the reason, because of i wont replace my tab is to hold the
>>>> component-state
>>>> of the
>>>> other tabs.
>>>>
>>>> regards alex
>>>>   
>>>>   
>>> -----
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>> 
>>
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-addTab-tp20895138p20903629.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel customization ?

2009-01-04 Thread Alex Objelean

Use CSS for styling customization. 


Piotr Jakubowski wrote:
> 
> Hi,
> Is it possible to tell TabbedPanel where to put its inner elements and
> override the default action? I would like to have the tab content in some
> other place than it is usually. And I am thinking whether it is possible
> somehow using TabbedPanel or I should write the whole thing from scratch.
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-customization---tp21276126p21278346.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 customization ?

2009-01-05 Thread Tomasz Dziurko
If you need some more than pure look modification you can always download
wicket source and create your own TabbedPanel classes based on original
code.

Regards
-- 
Tomasz Dziurko


Dynamic Tabbedpanel Page

2009-03-19 Thread dyolf.knip

HI,
I have a object with many properties(fields) which i want to display in my
page. I want to organize them in tabs for clarity i look the examples for
Tabbed Panel but they all are too static. If you want to add new tab you
have to add pageName$panelName mark-up file for each new tab. What is the
best way to develop my page so the adding of new fields in each tab and new
tabs to be as dynamically as possible.
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Tabbedpanel-Page-tp22601006p22601006.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: 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


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



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: vertical TabbedPanel

2007-12-08 Thread Matej Knopp
That's not really a wicket thing. It's about how you style it,
optionally you can provide alternative markup by subclassing it and
creating new markup file for the subclass.

-Matej

On Dec 7, 2007 11:42 PM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> Have anybody here implemented a vertical TabbedPanel? I looked at wicket 
> extension tabbedPanel but it doesn't have a property to render vertical one.
>
> Any help will be greatly appreciated.
>
> Regards,
> Allan
>
> --
> The only constant in life is change.
>
>
>
>
>   
> 
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.  
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: vertical TabbedPanel

2007-12-13 Thread Beyonder Unknown
Hi Matej,

I figure it out. Thanks! You can design however you want, by using CSS. 

Regards,
Allan
 
--
The only constant in life is change.

- Original Message 
From: Matej Knopp <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Saturday, December 8, 2007 3:01:18 AM
Subject: Re: vertical TabbedPanel


That's not really a wicket thing. It's about how you style it,
optionally you can provide alternative markup by subclassing it and
creating new markup file for the subclass.

-Matej

On Dec 7, 2007 11:42 PM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> Have anybody here implemented a vertical TabbedPanel? I looked at
 wicket extension tabbedPanel but it doesn't have a property to render
 vertical one.
>
> Any help will be greatly appreciated.
>
> Regards,
> Allan
>
> --
> The only constant in life is change.
>
>
>
>
>  
 

> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Hi Guys,

I was wondering if there's a way to implement TabbedPanel that when you click 
the tab, it will do an ajax call to the backend, and update the body of the 
tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

Any help will be gladly appreciated.

Thanks,
Wen Tong
 
--
The only constant in life is change.




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel sidebar question

2008-01-06 Thread Fernando Wermus
Dears all,
   I have use the tabbed panel for a menu and a sub menu fine. I
have a new need for the sub tabbedPanel menu. This subpanel is a sidebar and
it is rendering in the nested wicket div, but I need to be rendered in
another tag, the content div tag, which is not nested in the tabbed panel. I
show you the tags,




*[I want the sub-tabbedpanel be added here, but the sub-pannel when
is clicked should be added in the div id="content".
 This is a sub-tabbedPanel sidebar] *
 





*[The panel should be added here. The content goes
here.]*






The tabs and the panel are not nested. They have a parent in common.

I wanna know if I can solve this with tabbedPanel or another widget, or I
would need to build my own widget.

ps: I almost shure this cannot be solve using css.

Thanks in advance!

-- 
Fernando Wermus.


TabbedPanel tab names

2008-02-11 Thread Michael Mehrle
Assuming the typical tabbed panel example below - is there a good way to
grab the tab name from the page's properties file? What I need to do is
to internationalize the tab name. I guess I could do my own call to grab
it from the classpath + the property file name. Was hoping 

List tabs = new ArrayList();
tabs.add(new AbstractTab(new Model("first tab")) 
{ ^^
public Panel getPanel(String panelId)
{
return new TabPanel1(panelId);
}
});

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Testing (Ajax)TabbedPanel

2008-02-28 Thread Sven Schliesing

Hey,

I've written a test for a page which contains an "AjaxTabbedPanel". 
Right now I'm testing the click on the second tab like this:


AjaxTabbedPanel tabbedPanel = (AjaxTabbedPanel)
  tester.getComponentFromLastRenderedPage("panel:tabPanel");
WebMarkupContainer tabs = (WebMarkupContainer)
  tabbedPanel.get("tabs-container:tabs");

WebMarkupContainer siteTab = (WebMarkupContainer) tabs.get("1");
AjaxFallbackLink sitesTabLink = (AjaxFallbackLink) siteTab.get("link");

tester.clickLink(sitesTabLink.getPageRelativePath(), true);


This works quite good. But I'm having problems with using too much 
"internal knowledge" (e.g. the tabs-container id) of the AjaxTabbedPanel.


Sure, this is more an academically problem. But I'd like to know if 
there's a better approach.



Thanks in advance!


Sven

--
subshell GmbH
Sven Schliesing
Margaretenstraße 43at +49.40.431 362-23
20357 Hamburg   f +49.40.431 362-29
http://www.subshell.com [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


TabbedPanel and css problem

2008-07-09 Thread Pierre Gilquin

Hi all,

I have try to use a  TabbedPanel in my appli.
The css look in not taking into account.

If I look into the html generated I have :




...

If I look in the example on
http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.TabbedPanelPage

The equivalent ligne is


It's probably why the style.css is not applyed.
Do you have any idea why my appli send a "span" html tag ?
For my information, where are the gif used for TabbedPanel ? I cannot find them in the wicket-extensions-1.3.0-rc1.jar 
or any where else !

Thanks in advance.

Pierre 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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, 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: 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 + 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-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-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

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
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 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



TabbedPanel issue in test

2009-05-11 Thread Chiradeep Chhaya
Hi,

Am seeing a weird issue with tabbedpanel when running tests. I have a
fair few pages that use tabbed panels. Howeve on certain pages the
panel ID I see through debugcomponenttree is -1 and the test fails
when I assert anything on an individual tab with a mesage that the
component specified by the path was not found. On other pages though I
see a non-negative Id and everything passes fine.

There is nothing different in the creation of the tabbed panels
between pages and manually accessing the application works fine.

Any hints as to what could be going wrong?

Thanks

-- 
Sent from my mobile device

-Chiradeep

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



Tree and TabbedPanel components

2009-07-27 Thread Raj Kaushik
I am using a wicket tree component in the left column of a table and a panel 
(here in details are replaced as you select the nodes of the tree) in the right 
column.

One of the displayed panels is the TabbedPanel. In one TabPanel, I have a 
DropDownChoice box that makes a Form visible on selecting a choice.

The problem arises when you select another node of the tree; the Right hand 
side panel is replaced by the desired panel but some components of the TabPanel 
(of the previously selected node) remain visible down under, like 
DropDownChoice box and Form. The undesired components belong to the last 
selected tab of the TabbedPanel

How can I ensure that no components from the previous selected node remain 
visible pertaining to the last selected Tab of the TabbedPanel.

Any suggestions will be highly appreciated.

Raj Kaushik
rajv...@yahoo.com

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



Beginner problems with TabbedPanel

2009-07-29 Thread Gajo Csaba

Hello,

I've recently started working with Wicket, so a lot of things are still 
unknown for me. For example, right now I have a tabbed panel with two 
tabs. In the begining, I write setSelectedTab(1), so that the first tab 
is the default. This works ok.


However, I have an AjaxFallbackLink on the second tab. When I click on 
it, I want the following to happen:

tabbedPanel.setSelectedTab(0);

This creates an exception, saying that some components from tab #1 
aren't visble. And they shouldn't be, because I've selected tab #0.


If I click on the tab link manually (with a mouse), the tab opens fine.

What am I doing wrong? How can I select another tab through an ajax 
fallback link?


Thank you in advance,
Csaba



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



tabbedpanel and bookmarkable links

2007-08-27 Thread wired

(version 1.2.6)

Does anyone have any quick workaround to making the link in each tab of a
TabbedPanel bookmarkable?

Many thanks.
-- 
View this message in context: 
http://www.nabble.com/tabbedpanel-and-bookmarkable-links-tf4337745.html#a12355907
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel with image tabs

2007-10-06 Thread Vit Rozkovec

Good day,
I would like to have a possibility to have a small image next to the 
text in tab in the TabbedPanel.

How can I contribute this feature to Wicket? To have a constructor like
public AbstractTab(IModel title, ResourceReference image)?

Vitek

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Fridolin Jackstadt

Marieke Vandamme schrieb:
Hello, 


Is it possible to use TabbedPanel from wicket extensions together with the
wicket auth-roles?

Because TabbedPanel contains AbstractTab (which do not extend Component), I
didn't find a way to set the specific roles for each tab.

Thanks !
  

Hello,
AbstractTab contains a Panel that extends Components. Try adding the 
annotation to the Panel.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Marieke Vandamme

Hello, 

Thanks for the idea, but I already tried that..
The problem is that the panel is only created when the user clicks on the
according tab, which in my case is too late. I don't want the tab to be
printed if the user is not authorized.


Fridolin Jackstadt wrote:
> 
> Marieke Vandamme schrieb:
>> Hello, 
>>
>> Is it possible to use TabbedPanel from wicket extensions together with
>> the
>> wicket auth-roles?
>>
>> Because TabbedPanel contains AbstractTab (which do not extend Component),
>> I
>> didn't find a way to set the specific roles for each tab.
>>
>> Thanks !
>>   
> Hello,
> AbstractTab contains a Panel that extends Components. Try adding the 
> annotation to the Panel.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13951278
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Igor Vaynberg
On Nov 26, 2007 6:56 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:

> I don't want the tab to be
> printed if the user is not authorized.

so dont add it to the list of itabs you give the panel... ?

-igor

>
>
>
> Fridolin Jackstadt wrote:
> >
> > Marieke Vandamme schrieb:
> >> Hello,
> >>
> >> Is it possible to use TabbedPanel from wicket extensions together with
> >> the
> >> wicket auth-roles?
> >>
> >> Because TabbedPanel contains AbstractTab (which do not extend Component),
> >> I
> >> didn't find a way to set the specific roles for each tab.
> >>
> >> Thanks !
> >>
> > Hello,
> > AbstractTab contains a Panel that extends Components. Try adding the
> > annotation to the Panel.
> >
> > -----
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13951278
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Eelco Hillenius
On Nov 26, 2007 6:56 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Thanks for the idea, but I already tried that..
> The problem is that the panel is only created when the user clicks on the
> according tab, which in my case is too late. I don't want the tab to be
> printed if the user is not authorized.

Did you try something like:

@AuthorizeAction(action = Action.RENDER, roles = Roles.ADMIN)

on the tab?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Marieke Vandamme

That was my last solution, because i hoped it could be integrated with the
auth-roles so i didn't have to check the role myself. Because if i'm right,
before adding the tab to the list, i check with the role from the user's
session?


igor.vaynberg wrote:
> 
> On Nov 26, 2007 6:56 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
> 
>> I don't want the tab to be
>> printed if the user is not authorized.
> 
> so dont add it to the list of itabs you give the panel... ?
> 
> -igor
> 
>>
>>
>>
>> Fridolin Jackstadt wrote:
>> >
>> > Marieke Vandamme schrieb:
>> >> Hello,
>> >>
>> >> Is it possible to use TabbedPanel from wicket extensions together with
>> >> the
>> >> wicket auth-roles?
>> >>
>> >> Because TabbedPanel contains AbstractTab (which do not extend
>> Component),
>> >> I
>> >> didn't find a way to set the specific roles for each tab.
>> >>
>> >> Thanks !
>> >>
>> > Hello,
>> > AbstractTab contains a Panel that extends Components. Try adding the
>> > annotation to the Panel.
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13951278
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -----
>>
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13965570
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Eelco Hillenius
On Nov 26, 2007 10:38 PM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>
> That was my last solution, because i hoped it could be integrated with the
> auth-roles so i didn't have to check the role myself. Because if i'm right,
> before adding the tab to the list, i check with the role from the user's
> session?

So did you try using @AuthorizeAction(action = Action.RENDER, roles =
Roles.ADMIN)? That way you could just add the panels and they wouldn't
be rendered when the user isn't authorized. And you can keep the
actual authorization code out of your normal component construction
code.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Marieke Vandamme

That won't compile.. I guess because AbstractTab doesn't extends Component..


Eelco Hillenius wrote:
> 
> On Nov 26, 2007 6:56 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>>
>> Hello,
>>
>> Thanks for the idea, but I already tried that..
>> The problem is that the panel is only created when the user clicks on the
>> according tab, which in my case is too late. I don't want the tab to be
>> printed if the user is not authorized.
> 
> Did you try something like:
> 
> @AuthorizeAction(action = Action.RENDER, roles = Roles.ADMIN)
> 
> on the tab?
> 
> Eelco
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13965618
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-26 Thread Marieke Vandamme

I tried that, but it won't compile. Maybe because AbstractTab doesn't extends
Component?
I can't add the @AuthorizeAction to the panel, because the panel is only
created when the specific tab is clicked.


Eelco Hillenius wrote:
> 
> On Nov 26, 2007 10:38 PM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>>
>> That was my last solution, because i hoped it could be integrated with
>> the
>> auth-roles so i didn't have to check the role myself. Because if i'm
>> right,
>> before adding the tab to the list, i check with the role from the user's
>> session?
> 
> So did you try using @AuthorizeAction(action = Action.RENDER, roles =
> Roles.ADMIN)? That way you could just add the panels and they wouldn't
> be rendered when the user isn't authorized. And you can keep the
> actual authorization code out of your normal component construction
> code.
> 
> Eelco
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13965770
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-27 Thread Maurice Marrink
Not sure if it is of help to you, but Swarm has an example on how to do this:
http://wicketstuff.org/wicketsecurity/tabs/
You probably want the hide tabs option.
Source is available at
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security-examples

Maurice

On Nov 27, 2007 8:02 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>
> I tried that, but it won't compile. Maybe because AbstractTab doesn't extends
> Component?
> I can't add the @AuthorizeAction to the panel, because the panel is only
> created when the specific tab is clicked.
>
>
>
> Eelco Hillenius wrote:
> >
> > On Nov 26, 2007 10:38 PM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
> >>
> >> That was my last solution, because i hoped it could be integrated with
> >> the
> >> auth-roles so i didn't have to check the role myself. Because if i'm
> >> right,
> >> before adding the tab to the list, i check with the role from the user's
> >> session?
> >
> > So did you try using @AuthorizeAction(action = Action.RENDER, roles =
> > Roles.ADMIN)? That way you could just add the panels and they wouldn't
> > be rendered when the user isn't authorized. And you can keep the
> > actual authorization code out of your normal component construction
> > code.
> >
> > Eelco
> >
> > -----
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13965770
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-27 Thread Marieke Vandamme

That gave me some hints indeed. Thanks !
The authorization needs to be placed on the link (that is created when
overriding the newlink method from TabbedPanel).


Mr Mean wrote:
> 
> Not sure if it is of help to you, but Swarm has an example on how to do
> this:
> http://wicketstuff.org/wicketsecurity/tabs/
> You probably want the hide tabs option.
> Source is available at
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security-examples
> 
> Maurice
> 
> On Nov 27, 2007 8:02 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>>
>> I tried that, but it won't compile. Maybe because AbstractTab doesn't
>> extends
>> Component?
>> I can't add the @AuthorizeAction to the panel, because the panel is only
>> created when the specific tab is clicked.
>>
>>
>>
>> Eelco Hillenius wrote:
>> >
>> > On Nov 26, 2007 10:38 PM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>> >>
>> >> That was my last solution, because i hoped it could be integrated with
>> >> the
>> >> auth-roles so i didn't have to check the role myself. Because if i'm
>> >> right,
>> >> before adding the tab to the list, i check with the role from the
>> user's
>> >> session?
>> >
>> > So did you try using @AuthorizeAction(action = Action.RENDER, roles =
>> > Roles.ADMIN)? That way you could just add the panels and they wouldn't
>> > be rendered when the user isn't authorized. And you can keep the
>> > actual authorization code out of your normal component construction
>> > code.
>> >
>> > Eelco
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13965770
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>>
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-tf4875256.html#a13968886
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel + authorization strategy

2007-11-27 Thread Eelco Hillenius
On Nov 27, 2007 3:15 AM, Marieke Vandamme <[EMAIL PROTECTED]> wrote:
>
> That gave me some hints indeed. Thanks !
> The authorization needs to be placed on the link (that is created when
> overriding the newlink method from TabbedPanel).

Yeah, that makes sense :-)

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic Tabbedpanel Page

2009-03-19 Thread Anton Veretennikov
All tabs may be instances of the same class.
If you can make it universal - make a loop of your fields (and of
markup) and provide a model for them that will look for exact fields
for values.

-- Tony

On Thu, Mar 19, 2009 at 9:34 PM, dyolf.knip  wrote:
>
> HI,
> I have a object with many properties(fields) which i want to display in my
> page. I want to organize them in tabs for clarity i look the examples for
> Tabbed Panel but they all are too static. If you want to add new tab you
> have to add pageName$panelName mark-up file for each new tab. What is the
> best way to develop my page so the adding of new fields in each tab and new
> tabs to be as dynamically as possible.
> --
> View this message in context: 
> http://www.nabble.com/Dynamic-Tabbedpanel-Page-tp22601006p22601006.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: Dynamic Tabbedpanel Page

2009-03-20 Thread dyolf.knip

Thanks for the replay but i didn't understand all. OK i will make super class
for all panels and provide a model to get the values but i didn't get how to
solve the problem with declaring a mark-up file for each panel i am not very
good in wicket and maybe i am missing something


Anton Veretennikov wrote:
> 
> All tabs may be instances of the same class.
> If you can make it universal - make a loop of your fields (and of
> markup) and provide a model for them that will look for exact fields
> for values.
> 
> -- Tony
> 
> On Thu, Mar 19, 2009 at 9:34 PM, dyolf.knip  wrote:
>>
>> HI,
>> I have a object with many properties(fields) which i want to display in
>> my
>> page. I want to organize them in tabs for clarity i look the examples for
>> Tabbed Panel but they all are too static. If you want to add new tab you
>> have to add pageName$panelName mark-up file for each new tab. What is the
>> best way to develop my page so the adding of new fields in each tab and
>> new
>> tabs to be as dynamically as possible.
>> --
>> View this message in context:
>> http://www.nabble.com/Dynamic-Tabbedpanel-Page-tp22601006p22601006.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-Tabbedpanel-Page-tp22601006p22616331.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



Formatting TabbedPanel with CSS

2009-03-27 Thread Christian Helmbold

Hello,

I have a page with a TabbedPanel and want to use my own css class names for 
formatting.

I tried to use a SimpleAttributeModifier to change the class attribute of the 
rendered html tag, but with no effect. Then I tried to use the following code:
tabbedPanel.add(new AttributeModifier("class", new Model("tabbed_panel")));

But the rendered html looks in both cases like this:

("tab-row" should be "tabbed_panel").

Why does it not work?

And it is possible to change the css-classes of the tabs? I'd like to have once 
css-class for the selected tab and a second one for not selected tabs.

Thanks in advance!

Christian





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



wicket:Interface TabbedPanel and INewBrowserWindowListener

2009-04-10 Thread Daniele Dellafiore
Hi everyone, I have this situation: a TabbedPanel with 2 panels each
containing a form.
Each panel have aa checkbox that trigger the enable/disable status of
each component of the form. So I enter the panel, click the "enable"
checkbox and then I can edit and save and press a discard button.

The discard button execute a:

setResponsePage(getPage().getClass(), getPage().getPageParameters());

becouse I need to reload the same entity I was editing and tipically I
have a single parameters that is the ID of the entity.

The effect is that the page is still in the initial situation, with
editing disabled and every modification, of course, has not been
saved.

This works in the first Tab of the TabbedPanel. In the second, what
happens is that fields values are reset but they do not go back to
disabled status. The reason I think is that instead of just the entity
ID I also found this pageParameter:

wicket:interface = "wicket-7:0:7:INewBrowserWindowListener::"

I am pretty sure that is related to the TabbedPanel but cannot
understand how. If I remove that parameter, the behavior is what
expected: page is restarted and I am back to the first tab with fields
disabled.

Two question:
1. when and why that parameter is added? I would like to read more
about wicket:interface and friends, can you point me to some doc?
2. What if I would like to reload the page on the same tab I was
before? You think is better to call a setSelectedTab before the
setResponsePage or to pass a pageParameter with the number of the
selected tab? Or what else?

Thanks.

-- 
Daniele Dellafiore
http://blog.ildella.net/

-
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



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 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



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 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 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 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-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-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

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
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-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-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 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



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
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 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 making AJAX?

2008-01-04 Thread Igor Vaynberg
why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi Guys,
>
> I was wondering if there's a way to implement TabbedPanel that when you click 
> the tab, it will do an ajax call to the backend, and update the body of the 
> tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.
>
> Any help will be gladly appreciated.
>
> Thanks,
> Wen Tong
>
> --
> The only constant in life is change.
>
>
>
>
>   
> 
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Igor Vaynberg
this has nothing to do with ajax. you should not store the hibernate
object itself in the model, you should use a model that can load the
object during next request - that way it is attached to the current
session and doesnt have lazy loading problems. see
LoadableDetachableModel, and maybe read up on detachable models.

-igor

On Jan 4, 2008 8:48 AM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi Igor,
>
> How are you? The AbstractTab  returns a Panel that  calls a backend object 
> using hibernate Lazy Loading.  (We have a session filter that closes the 
> hibernate session after the page is loaded ). So when you click the tab, it 
> throws a  Lazy Loading exception, because the session is already close.
>
> When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it already 
> throws the exception prior to reaching the function.
>
> Do I have to override and customize some method in AjaxTabbedPanel to achieve 
> this? Like finding the title link and change it to ajax link? I'm looking for 
> a solution that when you click the tab, it does an ajax call in the backend 
> and update the tab content. So I thought I'd email this problem to the group, 
> thinking somebody have encountered this problem before.
>
> thanks,
> Wen Tong
>
> --
> The only constant in life is change.
>
> - Original Message 
> From: Igor Vaynberg <[EMAIL PROTECTED]>
> To: users@wicket.apache.org
> Sent: Friday, January 4, 2008 8:25:26 AM
> Subject: Re: TabbedPanel making AJAX?
>
>
> why exactly isnt ajaxtabbedpanel the way to go?
>
> -igor
>
> On Jan 4, 2008 7:48 AM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
> >
> > Hi Guys,
> >
> > I was wondering if there's a way to implement TabbedPanel that when
>  you click the tab, it will do an ajax call to the backend, and update
>  the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
>  not the way to go.
> >
> > Any help will be gladly appreciated.
> >
> > Thanks,
> > Wen Tong
> >
> > --
> > The only constant in life is change.
> >
> >
> >
> >
> >
>  
> 
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now.
>   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
>   
> 
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Hi Igor,

How are you? The AbstractTab  returns a Panel that  calls a backend object 
using hibernate Lazy Loading.  (We have a session filter that closes the 
hibernate session after the page is loaded ). So when you click the tab, it 
throws a  Lazy Loading exception, because the session is already close.

When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it already 
throws the exception prior to reaching the function.

Do I have to override and customize some method in AjaxTabbedPanel to achieve 
this? Like finding the title link and change it to ajax link? I'm looking for a 
solution that when you click the tab, it does an ajax call in the backend and 
update the tab content. So I thought I'd email this problem to the group, 
thinking somebody have encountered this problem before.

thanks, 
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:25:26 AM
Subject: Re: TabbedPanel making AJAX?


why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi Guys,
>
> I was wondering if there's a way to implement TabbedPanel that when
 you click the tab, it will do an ajax call to the backend, and update
 the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
 not the way to go.
>
> Any help will be gladly appreciated.
>
> Thanks,
> Wen Tong
>
> --
> The only constant in life is change.
>
>
>
>
>  
 

> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Thanks Igor,

Let me try that.

Wen T.
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:53:36 AM
Subject: Re: TabbedPanel making AJAX?


this has nothing to do with ajax. you should not store the hibernate
object itself in the model, you should use a model that can load the
object during next request - that way it is attached to the current
session and doesnt have lazy loading problems. see
LoadableDetachableModel, and maybe read up on detachable models.

-igor

On Jan 4, 2008 8:48 AM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi Igor,
>
> How are you? The AbstractTab  returns a Panel that  calls a backend
 object using hibernate Lazy Loading.  (We have a session filter that
 closes the hibernate session after the page is loaded ). So when you click
 the tab, it throws a  Lazy Loading exception, because the session is
 already close.
>
> When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it
 already throws the exception prior to reaching the function.
>
> Do I have to override and customize some method in AjaxTabbedPanel to
 achieve this? Like finding the title link and change it to ajax link?
 I'm looking for a solution that when you click the tab, it does an ajax
 call in the backend and update the tab content. So I thought I'd email
 this problem to the group, thinking somebody have encountered this
 problem before.
>
> thanks,
> Wen Tong
>
> --
> The only constant in life is change.
>
> - Original Message 
> From: Igor Vaynberg <[EMAIL PROTECTED]>
> To: users@wicket.apache.org
> Sent: Friday, January 4, 2008 8:25:26 AM
> Subject: Re: TabbedPanel making AJAX?
>
>
> why exactly isnt ajaxtabbedpanel the way to go?
>
> -igor
>
> On Jan 4, 2008 7:48 AM, Beyonder Unknown <[EMAIL PROTECTED]>
 wrote:
> >
> > Hi Guys,
> >
> > I was wondering if there's a way to implement TabbedPanel that when
>  you click the tab, it will do an ajax call to the backend, and
 update
>  the body of the tab. I looked at AjaxTabbedPanel, but it seems like
 its
>  not the way to go.
> >
> > Any help will be gladly appreciated.
> >
> > Thanks,
> > Wen Tong
> >
> > --
> > The only constant in life is change.
> >
> >
> >
> >
> >
>
  

> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now.
>   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> >
> >
 -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
>  
 

> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: TabbedPanel making AJAX?

2008-01-04 Thread Stefan Lindner
Wen Tong,

I think the following code does what you want:

new AjaxTabbedPanel(..) {
private static final long serialVersionUID = 1L;
@Override
protected void onAjaxUpdate(AjaxRequestTarget target) {
System.out.println("OnAjaxUpdate aufgerufen");
if (target != null) {
int selectedTab = getSelectedTab(); 
// Do whatever you want with the now selected 
tab und use the target variable for AJAX-actions

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 4. Januar 2008 17:25
An: users@wicket.apache.org
Betreff: Re: TabbedPanel making AJAX?

why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown <[EMAIL PROTECTED]> wrote:
>
> Hi Guys,
>
> I was wondering if there's a way to implement TabbedPanel that when you click 
> the tab, it will do an ajax call to the backend, and update the body of the 
> tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.
>
> Any help will be gladly appreciated.
>
> Thanks,
> Wen Tong
>
> --
> The only constant in life is change.
>
>
>
>
>   
> __
> __
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel sidebar question

2008-01-06 Thread Igor Vaynberg
you can subclass tabbedpanel and override the default markup it uses
by providing your own .html file. the only thing to watch out is that
the nesting of wicket:ids matches between the two html files.

-igor


On Jan 6, 2008 2:54 PM, Fernando Wermus <[EMAIL PROTECTED]> wrote:
> Dears all,
>I have use the tabbed panel for a menu and a sub menu fine. I
> have a new need for the sub tabbedPanel menu. This subpanel is a sidebar and
> it is rendering in the nested wicket div, but I need to be rendered in
> another tag, the content div tag, which is not nested in the tabbed panel. I
> show you the tags,
>
> 
> 
> 
> *[I want the sub-tabbedpanel be added here, but the sub-pannel when
> is clicked should be added in the div id="content".
>  This is a sub-tabbedPanel sidebar] *
>  
> 
> 
> 
> 
> 
> *[The panel should be added here. The content goes
> here.]*
> 
> 
> 
> 
> 
>
> The tabs and the panel are not nested. They have a parent in common.
>
> I wanna know if I can solve this with tabbedPanel or another widget, or I
> would need to build my own widget.
>
> ps: I almost shure this cannot be solve using css.
>
> Thanks in advance!
>
> --
> Fernando Wermus.
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel and model load...

2008-02-09 Thread Martijn Lindhout
Hi,

I have a page, with those two constructors, the first for editing a new
employee, the second for editing an existing.

public EditEmployee() {
setModel(new CompoundPropertyModel(new LoadableDetachableModel(){
protected Object load() {
return new Employee();
}
}));
init();
}

public EditEmployee(final Long id) {
setModel(new CompoundPropertyModel(new LoadableDetachableModel(){
protected Object load() {
return empRepository.getEmployee(id);
}
}));
init();
}

Because the Employee info is relatively much, I separate it in two panels in
a tabpanel. The hierarchy is: Page <- Form <- TabbedPanel <- several Panels
The problem is, that when I enter the formfields on the panels, they got
valided, but then a new Employee instance is created, and the FormComponent
values are not copied to the newly instantiated Employee. They're null.

I did some tests and it appears that on each panel switch, the Model.load is
called, and a new Employee is returned.

What's going wrong here
-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: TabbedPanel tab names

2008-02-11 Thread James Carman
Oops.  That's what I meant. I had to use StringResourceModel in my
case because I had to supply parameters.

On 2/11/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> or just ResourceModel
>
> -igor
>
>
> On Feb 11, 2008 11:59 AM, James Carman <[EMAIL PROTECTED]> wrote:
> > Have you tried StringResourceModel?
> >
> >
> > On 2/11/08, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> > > Assuming the typical tabbed panel example below - is there a good way to
> > > grab the tab name from the page's properties file? What I need to do is
> > > to internationalize the tab name. I guess I could do my own call to grab
> > > it from the classpath + the property file name. Was hoping
> > >
> > > List tabs = new ArrayList();
> > > tabs.add(new AbstractTab(new Model("first tab"))
> > > { ^^
> > > public Panel getPanel(String panelId)
> > > {
> > > return new TabPanel1(panelId);
> > > }
> > > });
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel tab names

2008-02-11 Thread James Carman
Have you tried StringResourceModel?

On 2/11/08, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Assuming the typical tabbed panel example below - is there a good way to
> grab the tab name from the page's properties file? What I need to do is
> to internationalize the tab name. I guess I could do my own call to grab
> it from the classpath + the property file name. Was hoping
>
> List tabs = new ArrayList();
> tabs.add(new AbstractTab(new Model("first tab"))
> { ^^
> public Panel getPanel(String panelId)
> {
> return new TabPanel1(panelId);
> }
> });
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel tab names

2008-02-11 Thread Igor Vaynberg
or just ResourceModel

-igor


On Feb 11, 2008 11:59 AM, James Carman <[EMAIL PROTECTED]> wrote:
> Have you tried StringResourceModel?
>
>
> On 2/11/08, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> > Assuming the typical tabbed panel example below - is there a good way to
> > grab the tab name from the page's properties file? What I need to do is
> > to internationalize the tab name. I guess I could do my own call to grab
> > it from the classpath + the property file name. Was hoping
> >
> > List tabs = new ArrayList();
> > tabs.add(new AbstractTab(new Model("first tab"))
> > { ^^
> > public Panel getPanel(String panelId)
> > {
> > return new TabPanel1(panelId);
> > }
> > });
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TabbedPanel tab names

2008-02-11 Thread Michael Mehrle
That seems to work - thanks guys! Much cleaner than manually accessing a
resource bundle.

Thanks,

Michael

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of James Carman
Sent: Monday, February 11, 2008 12:04 PM
To: users@wicket.apache.org
Subject: Re: TabbedPanel tab names

Oops.  That's what I meant. I had to use StringResourceModel in my
case because I had to supply parameters.

On 2/11/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> or just ResourceModel
>
> -igor
>
>
> On Feb 11, 2008 11:59 AM, James Carman <[EMAIL PROTECTED]>
wrote:
> > Have you tried StringResourceModel?
> >
> >
> > On 2/11/08, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> > > Assuming the typical tabbed panel example below - is there a good
way to
> > > grab the tab name from the page's properties file? What I need to
do is
> > > to internationalize the tab name. I guess I could do my own call
to grab
> > > it from the classpath + the property file name. Was hoping
> > >
> > > List tabs = new ArrayList();
> > > tabs.add(new AbstractTab(new Model("first tab"))
> > > { ^^
> > > public Panel getPanel(String panelId)
> > > {
> > > return new TabPanel1(panelId);
> > > }
> > > });
> > >
> > >
-
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing (Ajax)TabbedPanel

2008-02-29 Thread Kent Tong


Sven Schliesing wrote:
> 
> This works quite good. But I'm having problems with using too much 
> "internal knowledge" (e.g. the tabs-container id) of the AjaxTabbedPanel.
> 

You can always create your own TabPanelTester that may have a getTab(id) 
method. This class will encapsulate the internal knowledge.


-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
-- 
View this message in context: 
http://www.nabble.com/Testing-%28Ajax%29TabbedPanel-tp15739429p15772312.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing (Ajax)TabbedPanel

2008-03-04 Thread Timo Rantalaiho
On Thu, 28 Feb 2008, Sven Schliesing wrote:
> This works quite good. But I'm having problems with using too much 
> "internal knowledge" (e.g. the tabs-container id) of the AjaxTabbedPanel.
> 
> Sure, this is more an academically problem. But I'd like to know if 

It's not plain academic, because this issue makes your tests
more fragile. From early 1.3 through the beta versions and
now to 1.3.1, our tests have been breaking up sometimes, for
example for issues like that. It can also happen with your
own code when its component hierarchy changes.

> there's a better approach.

Yes, you can use Component.visitChildren(Class, IVisitor) to
operate on the wanted component on the hierarchy. 

jdave-wicket has this built-in
(ComponentSpecification.selectFirst() and .selectAll()) and
even the cool feature of being able to find the component
with a Hamcrest matcher matching on its model object.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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



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: 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: 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



  1   2   3   >