I made the following changes:
In MyNestedTree :
public MyNestedTree(String id, ITreeProvider<MyFoo> provider, 
IModel<Set<MyFoo>> state) { super(id, provider, state); add(new 
BootswatchThemeProvider().getTheme(Bootstrap.getSettings(getApplication()).getActiveThemeProvider().getActiveTheme().name().toLowerCase()));
Where BootswatchThemeProvider is:
public class BootswatchThemeProvider  { Map<String,Behavior> map = new 
HashMap<String,Behavior>();   public BootswatchThemeProvider() {  
map.put("windows", new WindowsTheme());  map.put("human", new HumanTheme());  
map.put("flatly", new FlatlyTheme()); }
   public Behavior getTheme(String name){  if(map.containsKey(name)) return 
(Behavior) map.get(name); else return (Behavior) map.get("windows"); }
 }
When I open the Tree it's OKBut when I change the Theme I get the error:

| Last cause: Unable to find component with id 'tree' in 
[TransparentWebMarkupContainer [Component id = wicket_extend2]]
 Expected: 'html:wicket_child1:wicket_extend2:tree'.
 Found with similar names: ''
 |


Markup
The problem is in 
"file:/home/java/wicket/appfuse/braunimmobilien-eclipse-maven/project/webapp-bootstrap/target/classes/braunimmobilien/bootstrap/webapp/pages/angebot/AngebotTree.html":
| <wicket:extend>
<header class="jumbotron subhead" id="overview">
    <div class="container">
        <h1>Offers</h1>        <p class="lead">All offers ever available.</p>
    </div>
</header><div class="container"><div class="row"><div class="col-lg-9">         
 <div class="bs-docs-example">    <div wicket:id="tree">[tree]</div>
</div>
</div>
</div>
</div>
 </wicket:extend> |


Stacktrace

| Root cause:Unable to find component with id 'tree' in 
[TransparentWebMarkupContainer [Component id = wicket_extend2]]
 Expected: 'html:wicket_child1:wicket_extend2:tree'.
 Found with similar names: ''
 MarkupStream: [markup = 
file:/home/java/wicket/appfuse/braunimmobilien-eclipse-maven/project/webapp-bootstrap/target/classes/braunimmobilien/bootstrap/webapp/pages/angebot/AngebotTree.html
<wicket:extend>
<header class="jumbotron subhead" id="overview">
 <div class="container">
 <h1>Offers</h1> <p class="lead">All offers ever available.</p>
 </div>
</header><div class="container"><div class="row"><div class="col-lg-9">   
 <div class="bs-docs-example"> <div wicket:id="tree">[tree]</div>
</div>
</div>
</div>
</div>
 </wicket:extend>, index = 2, current = '<div wicket:id="tree">' (line 0, 
column 0)]
 at 
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
 at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
 at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
 at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2536)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1496)
 at org.apache.wicket.Component.internalRender(Component.java:2366)
 at org.apache.wicket.Component.render(Component.java:2294)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1392)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
 at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
 at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
 at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2536)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1496)
 at org.apache.wicket.Component.internalRender(Component.java:2366)
 at org.apache.wicket.Component.render(Component.java:2294)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1392)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
 at 
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
 at 
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
 at 
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2536)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1496)
 at org.apache.wicket.Component.internalRender(Component.java:2366)
 at org.apache.wicket.Component.render(Component.java:2294)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1392)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
 at org.apache.wicket.Page.onRender(Page.java:887)
 at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
 at org.apache.wicket.Component.internalRender(Component.java:2366)
 at org.apache.wicket.Component.render(Component.java:2294)
 at org.apache.wicket.Page.renderPage(Page.java:1024)
 at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:139)
 at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:229)
 at 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
 at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
 at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
 at 
org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
 at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
 at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
 at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
 at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
 at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
 at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
 at org.eclipse.jetty.server.Server.handle(Server.java:350)
 at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
 at 
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
 at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
 at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
 at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
 at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
 at java.lang.Thread.run(Thread.java:745) |

      Von: Martin Grigorov <[email protected]>
 An: "[email protected]" <[email protected]> 
 Gesendet: 10:02 Dienstag, 26.Mai 2015
 Betreff: Re: Re: Re: Re: Wicket Bootstrap and Wizard
   
I am not CSS expert but what I'd do is:
- copy windows.css to theme.paper.css
- edit theme.paper.css to match with the sizes and colors defined
bootswatch.paper.css
- do the same for all other Bootswatch themes I need to support

With Less (http://lesscss.org/) it would be easier for you to re-use
Bootswatch's themes variables/parameters and thus make it future proof. But
you will have to introduce a build step for Less->CSS, or do it at runtime.
This will add extra complexity for you.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov



On Tue, May 26, 2015 at 10:46 AM, hansheinrichbraun <
[email protected]> wrote:

> Everything what is defined in the folder human or windows for a folder for
> example flatly
>
>
> Von Samsung Mobile gesendet
>
> <div>-------- Ursprüngliche Nachricht --------</div><div>Von: Martin
> Grigorov <[email protected]> </div><div>Datum:26.05.2015  08:09
> (GMT+01:00) </div><div>An: [email protected] </div><div>Betreff:
> Re: Re: Re: Wicket Bootstrap and Wizard </div><div>
> </div>What parameters?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, May 26, 2015 at 8:24 AM, hansheinrichbraun <
> [email protected]> wrote:
>
> > Must I define the parameters for the css files myself or  does ther
> > already exist something anywhere?
> >
> >
> > Von Samsung Mobile gesendet
> >
> > <div>-------- Ursprüngliche Nachricht --------</div><div>Von: Martin
> > Grigorov <[email protected]> </div><div>Datum:25.05.2015  22:10
> > (GMT+01:00) </div><div>An: [email protected] </div><div>Betreff:
> > Re: Re: Wicket Bootstrap and Wizard </div><div>
> > </div>Hi,
> >
> > I'd use the theme name.
> > E.g. create tree.paper.css, tree.flatly.css, ...
> > Also create BootswatchTreeBehavior, which #renderHead() will use
> > BootstrapSettings.getActiveThemeProvider().getTheme().getName() to
> > construct the name of the CSS tree theme.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, May 25, 2015 at 6:14 PM, hansheinrichbraun <
> > [email protected]> wrote:
> >
> > > Hello Martin,
> > > I made a first trial to bring the bootswatch Themes to the tree
> > > component.In the  wicket component there are 2 themes HumanTheme and
> > > WindowsTheme which are added as Behaviors.In Your Bootstrap adaption
> the
> > > Boutswatch Themes are interfaced by ITheme.I didn't yet get out how
> they
> > > are brought in the Components and my first trial to turn them in
> > Behaviors
> > > didn't work.I tried to use the renderHead of the ITheme and to add
> class=
> > > theme-theme.name() to the Treecomponent.Maybe you  can give me a hint.
> > > Heiner Braun
> > >
> > >
> > > Von Samsung Mobile gesendet
> > >
> > > <div>-------- Ursprüngliche Nachricht --------</div><div>Von: Martin
> > > Grigorov <[email protected]> </div><div>Datum:25.05.2015  08:45
> > > (GMT+01:00) </div><div>An: [email protected],Hans-Heinrich
> Braun <
> > > [email protected]> </div><div>Betreff: Re: Wicket Bootstrap
> and
> > > Wizard </div><div>
> > > </div>Hi,
> > >
> > > Wicket-Extensions Tree component uses CSS themes for styling. It is
> very
> > > easy to provide Bootstrap theme for it.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Sun, May 24, 2015 at 10:47 PM, Hans-Heinrich Braun <
> > > [email protected]> wrote:
> > >
> > > > Martin thank you problem solved.I used Ajax for making visible  new
> > > select
> > > > fields and making the choices in dependence of the choice of other
> > select
> > > > fields like country location street person .Maybe i didn't use
> > everywhere
> > > > BasePage or didn't change all html files.I am using  a real estate
> > > > application with wicket hibernate spring with a lot of google  mail
> > > > calendar and contacts integration.I want now to make it accessible in
> > > > internet responsive and therefore start to use Bootstrap.After a used
> > my
> > > > own solution for the management of inter page operations i want to
> > change
> > > > to  Wizard and Breadcrumb style.Question: I show  my datastructures
> > in a
> > > > tree view.I don't really see a Bootstrap tree structure. I found
> > > something
> > > > in internet which is totally javascript.Somebody recommended HTML5
> > > Although
> > > > the normal wicket treestructure looks rather good on the handy. What
> > > would
> > > > you recommend?Heiner Braun
> > > >
> > > >      Von: Martin Grigorov <[email protected]>
> > > >  An: "[email protected]" <[email protected]>;
> > Hans-Heinrich
> > > > Braun <[email protected]>
> > > >  Gesendet: 10:16 Sonntag, 24.Mai 2015
> > > >  Betreff: Re: Wicket Bootstrap and Wizard
> > > >
> > > > Hi Henry,
> > > >
> > > > It is hard for me to say what is wrong.
> > > > AFAIR wicket-extensions' Wizard uses non-Ajax buttons.
> > > >
> > > > Can you create a quickstart project at GitHub/BitBucket ?
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > >
> > > >
> > > > On Sat, May 23, 2015 at 10:57 AM, Hans-Heinrich Braun <
> > > > [email protected]> wrote:
> > > >
> > > > > Hello Martin,
> > > > > I try to include a Wizard Example in your Wicket Bootstrap
> > > environment.In
> > > > > the center of the adaption is the Class WizardPage:
> > > > > package braunimmobilien.bootstrap.webapp.pages.wizard;
> > > > > import java.lang.reflect.Constructor;import
> > > > > org.apache.wicket.request.mapper.parameter.PageParameters;import
> > > > > braunimmobilien.bootstrap.webapp.pages.WicketExamplePage;import
> > > > > org.apache.wicket.extensions.wizard.Wizard;
> > > > >
> > > > > /** * Page for displaying a wizard. *  * @author Eelco Hillenius
> > > */public
> > > > > class WizardPage extends WicketExamplePage{ /**  * Construct.  *  *
> > > > @param
> > > > > <C>  *  * @param wizardClass  *            class of the wizard
> > > component
> > > > > */ public <C extends Wizard> WizardPage(Class<C> wizardClass) {  if
> > > > > (wizardClass == null) { throw new
> IllegalArgumentException("argument
> > > > > wizardClass must be not null"); } try { Constructor<? extends
> Wizard>
> > > > ctor
> > > > > = wizardClass.getConstructor(String.class); Wizard wizard =
> > > > > ctor.newInstance("wizard"); add(wizard); } catch (Exception e) {
> > throw
> > > > new
> > > > > RuntimeException(e); } } public <C extends Wizard>
> > WizardPage(Class<C>
> > > > > wizardClass,Class responsepage,PageParameters pageparameters) { if
> > > > > (wizardClass == null) { throw new
> IllegalArgumentException("argument
> > > > > wizardClass must be not null"); } try { Constructor<? extends
> Wizard>
> > > > ctor
> > > > > =
> > > > >
> > > >
> > >
> >
> wizardClass.getConstructor(String.class,Class.class,PageParameters.class);
> > > > > Wizard wizard =
> > ctor.newInstance("wizard",responsepage,pageparameters);
> > > > > add(wizard); } catch (Exception e) { throw new
> RuntimeException(e); }
> > > > > }}which shows  the pages but Ajax functions don't work.Even i have
> no
> > > > > Bootstrap.I didn't succeed to turn the corresponding pages in
> > > inheritance
> > > > > of BasePage.After several trials I thought it better to ask you.
> > > > > Regards Henry.
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>

  

Reply via email to