RE: memory leak

2011-03-03 Thread Ladislav DANKO
and wicket is 1.4.16  :-)
 

> -Original Message-
> From: Ladislav DANKO [mailto:em...@1ac0.net] 
> Sent: Friday, March 04, 2011 7:27 AM
> To: users@wicket.apache.org
> Subject: memory leak
> 
> Hi folks,
> 
> I have JDK 1.6_20, Tomcat 6.0.29 and code:
> 
> public class Start extends WebApplication {
>   public Start()
>   {
>   }
> 
>   protected void init()
>   {
>   super.init();
> 
>   mountBookmarkablePage("/index.html", Index.class);
> 
>   mountSharedResource("/resources/img/cover.jpg", 
> new ResourceReference(Images.class, 
> "cover.jpg").getSharedResourceKey());
> 
>   getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
>   
> getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
>   }
> 
>   public Class getHomePage()
>   {
>   return Index.class;
>   }
> 
> }
> 
> When I deploy it then I get:
> INFO: Deploying web application archive ROOT.war
> 4.3.2011 7:22:14 org.apache.catalina.core.StandardContext start
> SEVERE: Error filterStart
> 4.3.2011 7:22:14 org.apache.catalina.core.StandardContext start
> SEVERE: Context [] startup failed due to previous errors
> 4.3.2011 7:22:14 org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [] appears to have started a 
> thread named [PageSavingThread-WicketFilter] but has failed 
> to stop it. This is very likely to create a memory leak.
> 329 [main] INFO org.apache.wicket.RequestListenerInterface - 
> registered listener interface [RequestListenerInterface 
> name=INewBrowserWindowListener, method=public abstract void
> org.apache.wicket.markup.html.INewBrowserWindowListener.onNewB
> rowserWindow()
> ]
> 329 [main] INFO org.apache.wicket.RequestListenerInterface - 
> registered listener interface [RequestListenerInterface 
> name=IResourceListener, method=public abstract void 
> org.apache.wicket.IResourceListener.onResourceRequested()]
> 360 [main] INFO org.apache.wicket.RequestListenerInterface - 
> registered listener interface [RequestListenerInterface 
> name=ILinkListener, method=public abstract void 
> org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> 360 [main] INFO org.apache.wicket.RequestListenerInterface - 
> registered listener interface [RequestListenerInterface 
> name=IRedirectListener, method=public abstract void 
> org.apache.wicket.IRedirectListener.onRedirect()]
> 
> But when I remove:
> mountSharedResource("/resources/img/cover.jpg", new 
> ResourceReference(Images.class, "cover.jpg").getSharedResourceKey());
> 
> everythinkg works fine.
> 
> Does someone know where is the problem? Googling throught web 
> and list not helps.
> 
> Thanks, Laco
> 
> 
> -
> 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



memory leak

2011-03-03 Thread Ladislav DANKO
Hi folks,

I have JDK 1.6_20, Tomcat 6.0.29 and code:

public class Start extends WebApplication
{
public Start()
{
}

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

mountBookmarkablePage("/index.html", Index.class);

mountSharedResource("/resources/img/cover.jpg", new
ResourceReference(Images.class, "cover.jpg").getSharedResourceKey());

getMarkupSettings().setDefaultMarkupEncoding("UTF-8");

getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
}

public Class getHomePage()
{
return Index.class;
}

}

When I deploy it then I get:
INFO: Deploying web application archive ROOT.war
4.3.2011 7:22:14 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
4.3.2011 7:22:14 org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
4.3.2011 7:22:14 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named
[PageSavingThread-WicketFilter] but has failed to stop it. This is very
likely to create a memory leak.
329 [main] INFO org.apache.wicket.RequestListenerInterface - registered
listener interface [RequestListenerInterface name=INewBrowserWindowListener,
method=public abstract void
org.apache.wicket.markup.html.INewBrowserWindowListener.onNewBrowserWindow()
]
329 [main] INFO org.apache.wicket.RequestListenerInterface - registered
listener interface [RequestListenerInterface name=IResourceListener,
method=public abstract void
org.apache.wicket.IResourceListener.onResourceRequested()]
360 [main] INFO org.apache.wicket.RequestListenerInterface - registered
listener interface [RequestListenerInterface name=ILinkListener,
method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
360 [main] INFO org.apache.wicket.RequestListenerInterface - registered
listener interface [RequestListenerInterface name=IRedirectListener,
method=public abstract void
org.apache.wicket.IRedirectListener.onRedirect()]

But when I remove:
mountSharedResource("/resources/img/cover.jpg", new
ResourceReference(Images.class, "cover.jpg").getSharedResourceKey());

everythinkg works fine.

Does someone know where is the problem? Googling throught web and list not
helps.

Thanks, Laco


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



Re: Apache wicket eBook

2011-03-03 Thread Josh Kamau
You can buy Wicket In Action From manning. Its the best book so far. I think
it would be piracy if i send you my copy. May be with permission from the
authors.

Josh.

On Fri, Mar 4, 2011 at 8:51 AM, Jehan  wrote:

> Dear All
>
> If any one have apache wicket eBook then please email it,
>
> I will be very thankfull to him.
>


Re: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Gonzalo Aguilar Delgado
Martin, 

I tried the filter and the filter runs quite well but no change on the
tag... Everything remains the same.

Do you see something wrong? It also runs several times, not just one.
One for each component that has body in it's html. I suppose that is
normal Right? But how to know which one is the one that is going to be
rendered? The others are discarded...

Thank you.


package com.level2.dojo.core.commons.filter;

import java.text.ParseException;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Component;
import org.apache.wicket.RequestCycle;
import org.apache.wicket.behavior.AbstractBehavior;
import org.apache.wicket.behavior.IBehavior;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.MarkupElement;
import org.apache.wicket.markup.parser.AbstractMarkupFilter;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.IRequestCodingStrategy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DojoBodyMarkupFilter extends AbstractMarkupFilter {
/** Logger */
private static final Logger log =
LoggerFactory.getLogger(DojoBodyMarkupFilter.class);

/**
 * Behavior that adds a prefix to src, href and background
attributes to
make them
 * context-relative
 */
public static final IBehavior RELATIVE_PATH_BEHAVIOR = new
AbstractBehavior()
{
private static final long serialVersionUID = 1L;

@Override
public void onComponentTag(Component component,
ComponentTag tag)
{
IRequestCodingStrategy coder =
RequestCycle.get()
.getProcessor()
.getRequestCodingStrategy();

// Modify all relevant attributes
String attrName = "class";
String attrValue =
tag.getAttributes().getString(attrName);
attrValue = "mytest";
tag.getAttributes().put(attrName,
coder.rewriteStaticRelativeUrl(attrValue));
}
};

public MarkupElement nextTag() throws ParseException {
// Get next tag. Null, if no more tag available
final ComponentTag tag =
(ComponentTag)getParent().nextTag();
if (tag == null)
{
return tag;
}

// For all  tags which probably change
the
// current autolink status.
if (tag.getName().equals("body"))
{

// Beginning of the region
if (tag.isOpen() || tag.isOpenClose())
{
if (tag.isOpen())
{
//
log.debug("Tag: " +
tag.getName() + " Will add new class " +
tag.getId());

tag.addBehavior(RELATIVE_PATH_BEHAVIOR);
tag.setModified(true);
}

}
else if (tag.isClose())
{

}
}

return tag;
}

}





-- 


  Gonzalo Aguilar Delgado
  Consultor CRM - Ingeniero en
Informática

M. +34 607 81 42 76



"No subestimes el poder de la gente estúpida en grupos grandes" 

El jue, 03-03-2011 a las 12:39 +0200, Martin Grigorov escribió:

> Hi,
> 
> you may use TransparentWebMarkupContainer for the body.
> Or create your own IMarkupFilter that adds a Behavior to the  open
> tag, and this behavior appends/sets the class attribute depending on the
> user session or whatever the Dojo theme depends on.
> See org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler for
> example.
> 
> 
> On Thu, Mar 3, 2011 at 12:15 PM, Gonzalo Aguilar Delgado <
> gagui...@aguilardelgado.com> wrote:
> 
> > Hello Matt,
> >
> > It does not work as I cannot override add method from webmarkupcontainer.
> >
> > Even if it works I will have to add something to the htlm. Right?
> >
> >
> > Tnx again
> >
> > Matt Brictson  wrote:
> >
> > >Since isTransparentResolver() is going away in 1.5, the trick that I found
> > is to create a normal WebMarkupContainer for the  element, then
> > override add(Component...) of the page to mimic the transparent resolver
> > feature.
> > >
> > >Your pages can then contribute to the  element by adding
> > AttributeModifier, etc. to the WebMarkupContainer.
> > >
> > >See:
> > ><
> > https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-MarkupContainer.isTransparentResolver%2528%2529removed
> > >
> > >
> > >

Re: [1.5.0-rc2] possible bug with danish characters

2011-03-03 Thread Gonzalo Aguilar Delgado
Have you tried 1.5?


-- 


  Gonzalo Aguilar Delgado
  Consultor CRM - Ingeniero en
Informática

M. +34 607 81 42 76



"No subestimes el poder de la gente estúpida en grupos grandes" 

El jue, 03-03-2011 a las 20:09 +0200, Martin Grigorov escribió:

> trunk from today runs at http://www.wicket-library.com/wicket-examples
> 
> On Wed, Mar 2, 2011 at 9:21 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
> 
> > is there a server somewhere where rc2 live examples are running on?
> >
> >
> > 2011/3/2 Martin Grigorov 
> >
> > > quickstart will help us to debug it.
> > > attach it to jira
> > > thanks!
> > >
> > > On Wed, Mar 2, 2011 at 3:16 PM, nino martinez wael <
> > > nino.martinez.w...@gmail.com> wrote:
> > >
> > > > anyone have an idea why changing from rc1 to rc2 would have an have an
> > > > impact on this..? There was no issue that looked related to me (in the
> > > > change log).
> > > >
> > > > 2011/3/2 nino martinez wael 
> > > >
> > > > > Charset are UTF8... Anyhow there's no problem on rc1..
> > > > >
> > > > > 2011/3/2 Wilhelmsen Tor Iver 
> > > > >
> > > > > > I just noticed that after upgrading to rc2, my some of my texts
> > like
> > > > >> > "håndteret kald" when getting saved/posted becomes this:
> > "håndteret
> > > > >> kald"..
> > > > >>
> > > > >> Charset issue, they get posted as UTF-8; you probably  either need
> > to
> > > > test
> > > > >> for charset or assume UTF-8 across the board.
> > > > >>
> > > > >> - Tor Iver
> > > > >>
> > > > >>
> > -
> > > > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> >


Re: [1.5.0-rc2] possible bug with danish characters

2011-03-03 Thread Gonzalo Aguilar Delgado
Hi


Will try it.

Is there a complete example with the html in place there?

Tnx


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



Apache wicket eBook

2011-03-03 Thread Jehan
Dear All

If any one have apache wicket eBook then please email it,

I will be very thankfull to him.


Re: Wicket 1.5 events and Eclipse

2011-03-03 Thread Jim Pinkham
Yes, happens to me also.  I've just been ignoring it.

I'm on 1.5-M3

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



Wicket 1.5 events and Eclipse

2011-03-03 Thread Bertrand Guay-Paquet

Hi,

Since integrating the 1.5 branch in my project, I have an annoying 
behavior in Eclipse 3.6 with the new Wicket events. Whenever I subclass 
Component or one of its subclasses and click on "Add unimplemented 
methods", the following method is added :

public  void send(IEventSink a_sink, Broadcast a_broadcast, T a_payload)
even though it is not abstract in the super class. Not only is it not 
abstract, it's final!


Somehow, I have never experienced this kind of problem (too many added 
methods) with other classes.


Does anybody have a clue as to why this is happening? Is anybody else 
experiencing this issue?


Thanks

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



Re: [announce] Wicket Stuff Core 1.5-rc2 is released

2011-03-03 Thread Martin Grigorov
annotation project is not yet migrated to 1.5
it is commented in jdk-1.5/pom.xml

On Thu, Mar 3, 2011 at 9:17 PM, Zilvinas Vilutis  wrote:

> Hi,
>
> I'm getting a missing resource error:
>
> Missing:
> --
> 1) org.wicketstuff:annotation:jar:1.5-rc2
>
>  Try downloading the file manually from the project website.
>
> Seems that the project version is not changed in the pom.xml:
>
>
> https://github.com/wicketstuff/core/blob/wicketstuff-core-1.5-rc2/jdk-1.5-parent/annotation/pom.xml
>
>
>
> Regards
>
>
> Žilvinas Vilutis
>
> Mobile:   (+370) 652 38353
> E-mail:   cika...@gmail.com
>
>
>
> On Sat, Feb 26, 2011 at 2:44 PM, Michael O'Cleirigh
>  wrote:
> > Hello,
> >
> > Following the release of wicket 1.5-rc2 I've cut a matching release for
> > wicketstuff-core (https://github.com/wicketstuff/core).
> >
> > The artifacts have been promoted and are now available through the maven
> > central repository.
> >
> > They can be retrieved like this:
> >
> > 
> > org.wicketstuff
> > wicketstuff-springreference
> > 1.5-rc2
> > 
> >
> > The release tag is here:
> > https://github.com/wicketstuff/core/tree/wicketstuff-core-1.5-rc2
> >
> > Issues can be reported here: https://github.com/wicketstuff/core/issues
> >
> > The Project Wiki is available here:
> https://github.com/wicketstuff/core/wiki
> >
> > Release Notes - WicketStuff Core - Version 1.5-rc2:
> >
> > akiraly (35 commits):
> > Summary:
> >Contributed new wicketstuff-springreference project.
> >Contributed new wicketstuff-logback project.
> >Various pom updates to better align with upstream wicket release.
> >Upgrade from jetty 6 to jetty 7.
> >Assorted pom changes to improve the consistency of dependencies used.
> >
> > Martin Grigorov (22):
> > Summary:
> >
> >  Issue 10 - Fix wicket-scala-sample in master branch due to upstream
> > change
> >  Issue 11 - shiro-example-spring-hibernate pom has a wrong parent
> > version.
> >  Update Maven dependencies to newer versions (version that match
> > Wicket's dependencies)
> >  Improvements to the scala integration project.
> >
> > Michael O'Cleirigh (7 commits):
> > Summary:
> >  Fixing breakage caused by upstream wicket changes since 1.5-RC1.
> >  Minor changes related to the release.
> >
> > Christian Strempfer (3 commits):
> > Summary:
> >  Fixed a bug, which causes the InputBehavior to execute multiple
> times
> > after an AJAX update.
> >
> > To see a list of all the commits between wicketstuff-core-1.5-RC1.1 and
> > wicketstuff-core-1.5-rc2 use this command (on branch master in the root
> > directory):
> >
> > git log --name-only wicketstuff-core-1.5-rc2 wicketstuff-core-1.5-RC1.1..
> >
> > The plan is to release a 1.5 series version within one month from today.
> >  If you commit code and/or want a release sooner let me know as one month
> is
> > the worst case target.
> >
> > Regards,
> >
> > Mike
> >
> >
> > -
> > 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: [announce] Wicket Stuff Core 1.5-rc2 is released

2011-03-03 Thread Zilvinas Vilutis
Hi,

I'm getting a missing resource error:

Missing:
--
1) org.wicketstuff:annotation:jar:1.5-rc2

  Try downloading the file manually from the project website.

Seems that the project version is not changed in the pom.xml:

https://github.com/wicketstuff/core/blob/wicketstuff-core-1.5-rc2/jdk-1.5-parent/annotation/pom.xml



Regards


Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Sat, Feb 26, 2011 at 2:44 PM, Michael O'Cleirigh
 wrote:
> Hello,
>
> Following the release of wicket 1.5-rc2 I've cut a matching release for
> wicketstuff-core (https://github.com/wicketstuff/core).
>
> The artifacts have been promoted and are now available through the maven
> central repository.
>
> They can be retrieved like this:
>
> 
> org.wicketstuff
> wicketstuff-springreference
> 1.5-rc2
> 
>
> The release tag is here:
> https://github.com/wicketstuff/core/tree/wicketstuff-core-1.5-rc2
>
> Issues can be reported here: https://github.com/wicketstuff/core/issues
>
> The Project Wiki is available here: https://github.com/wicketstuff/core/wiki
>
> Release Notes - WicketStuff Core - Version 1.5-rc2:
>
> akiraly (35 commits):
> Summary:
>    Contributed new wicketstuff-springreference project.
>    Contributed new wicketstuff-logback project.
>    Various pom updates to better align with upstream wicket release.
>    Upgrade from jetty 6 to jetty 7.
>    Assorted pom changes to improve the consistency of dependencies used.
>
> Martin Grigorov (22):
> Summary:
>
>      Issue 10 - Fix wicket-scala-sample in master branch due to upstream
> change
>      Issue 11 - shiro-example-spring-hibernate pom has a wrong parent
> version.
>      Update Maven dependencies to newer versions (version that match
> Wicket's dependencies)
>      Improvements to the scala integration project.
>
> Michael O'Cleirigh (7 commits):
> Summary:
>      Fixing breakage caused by upstream wicket changes since 1.5-RC1.
>      Minor changes related to the release.
>
> Christian Strempfer (3 commits):
> Summary:
>      Fixed a bug, which causes the InputBehavior to execute multiple times
> after an AJAX update.
>
> To see a list of all the commits between wicketstuff-core-1.5-RC1.1 and
> wicketstuff-core-1.5-rc2 use this command (on branch master in the root
> directory):
>
> git log --name-only wicketstuff-core-1.5-rc2 wicketstuff-core-1.5-RC1.1..
>
> The plan is to release a 1.5 series version within one month from today.
>  If you commit code and/or want a release sooner let me know as one month is
> the worst case target.
>
> Regards,
>
> Mike
>
>
> -
> 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: [1.5.0-rc2] possible bug with danish characters

2011-03-03 Thread Martin Grigorov
trunk from today runs at http://www.wicket-library.com/wicket-examples

On Wed, Mar 2, 2011 at 9:21 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> is there a server somewhere where rc2 live examples are running on?
>
>
> 2011/3/2 Martin Grigorov 
>
> > quickstart will help us to debug it.
> > attach it to jira
> > thanks!
> >
> > On Wed, Mar 2, 2011 at 3:16 PM, nino martinez wael <
> > nino.martinez.w...@gmail.com> wrote:
> >
> > > anyone have an idea why changing from rc1 to rc2 would have an have an
> > > impact on this..? There was no issue that looked related to me (in the
> > > change log).
> > >
> > > 2011/3/2 nino martinez wael 
> > >
> > > > Charset are UTF8... Anyhow there's no problem on rc1..
> > > >
> > > > 2011/3/2 Wilhelmsen Tor Iver 
> > > >
> > > > > I just noticed that after upgrading to rc2, my some of my texts
> like
> > > >> > "håndteret kald" when getting saved/posted becomes this:
> "håndteret
> > > >> kald"..
> > > >>
> > > >> Charset issue, they get posted as UTF-8; you probably  either need
> to
> > > test
> > > >> for charset or assume UTF-8 across the board.
> > > >>
> > > >> - Tor Iver
> > > >>
> > > >>
> -
> > > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > > >>
> > > >>
> > > >
> > >
> >
>


Re: DropDownChoice choice rendering

2011-03-03 Thread Martin Makundi
Hi!

> List carList = getCars(); //getting from db

DropDownChoice carChoice = new DropDownChoice("cars", model, carList,
new IChoiceRenderer() {  display(Car car) { return car.getName();
}  }

You might want to use  carList as a loadabledetachablemodel.

**
Martin

> I could not write end of the code because I think I do not know how to do
> it?
> Can you give me a suggestion for adding data into dropdownchoice?
> With my best regards.
>
>
> -
> Developer
> Wicket
> Java
> JSP
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-choice-rendering-tp876p876.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



DropDownChoice choice rendering

2011-03-03 Thread tech7
I have a problem with dropdownchoice component
I have a car class containing Long id, String name and etc.
I am getting all car information as list of objects from database and I want
to display only the car name on the dropdownchoice and also want to put car
objects into dropdownchoice.
How can it be possible?
List carList = getCars(); //getting from db
DropDownChoice carChoice = new DropDownChoice("cars", new
PropertyModel(this, ...

I could not write end of the code because I think I do not know how to do
it?
Can you give me a suggestion for adding data into dropdownchoice?
With my best regards.


-
Developer
Wicket
Java
JSP
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-choice-rendering-tp876p876.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: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Matt Brictson
On Mar 3, 2011, at 2:15 AM, Gonzalo Aguilar Delgado wrote:

> It does not work as I cannot override add method from webmarkupcontainer.

Are you sure? In Wicket 1.5-rc2 and well as in trunk, 
MarkupContainer#add(Component...) is not final. To clarify: in order to mimic 
the transparent resolver feature, you need to override add(Component...) on 
BasePage, not on the body WebMarkupContainer.


> Even if it works I will have to add something to the htlm. Right?

Right. You will need this in your HTML:




If you decide to take Martin's IMarkupFilter approach can you post your share 
your solution with the list? I am curious to try this as well, as overriding 
add(Component...) is a bit of hack.


-- 
Matt


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



Re: Integrating jquery scripts with wicket

2011-03-03 Thread tech7
Thank you for responses I have done that

-
Developer
Wicket
Java
JSP
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p811.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: AjaxEventBehaviour on page onload

2011-03-03 Thread Pedro Santos
You can implement an IHeaderContributor:

http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/IHeaderContributor.html
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/IHeaderResponse.html#renderOnLoadJavascript(java.lang.String)

On Thu, Mar 3, 2011 at 1:00 PM, drf  wrote:

> I wonder if anyone can help with the following:
> I've added this code to a the constructor of a WebPage:
>
>this.add(new AjaxEventBehavior("onload") {
>
>@Override
>protected void onEvent(AjaxRequestTarget target) {
>System.out.println(" IN
> on-LOAD");
>}
>});
>
> Am expecting the event to be called when the page loads, but it is not.
> Here is the snippet for the page head:
>
>
>
>VCF
>
>
>
> Any ideas are appreciated!
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxEventBehaviour-on-page-onload-tp618p618.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
>
>


-- 
Pedro Henrique Oliveira dos Santos


AjaxEventBehaviour on page onload

2011-03-03 Thread drf
I wonder if anyone can help with the following:
I've added this code to a the constructor of a WebPage:

this.add(new AjaxEventBehavior("onload") {

@Override
protected void onEvent(AjaxRequestTarget target) {
System.out.println(" IN on-LOAD");
}
});

Am expecting the event to be called when the page loads, but it is not.
Here is the snippet for the page head:



VCF



Any ideas are appreciated!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxEventBehaviour-on-page-onload-tp618p618.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



How to stop concurrent logins?

2011-03-03 Thread shetc
Hi All,

Following a security assessment, I have been asked to tighten the security
in
a Wicket-based web application. In particular, I need to prevent a user from
having concurrent logins to the app. I would like to know if there is a
preferred
"Wicket Way" of implementing this feature. Reviewing the Wicket forum, it
seemed
like the approach would be to extend SecondLevelCacheSessionStore, and use
its
onBind template method to catch when a session is created. In onBind, use
the
RequestLogger to look through all the live sessions to determine if the user
has multiple sessions. But I think I saw a comment that this won't work in
a clustered environment. Is there a better way to clear extra user sessions?

Thanks very much,
Steve

P.S. Using v1.4.9

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-stop-concurrent-logins-tp3332127p3332127.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: German umlauts in Wicket-Message Tag

2011-03-03 Thread Peter Ertl
if you read my last post carefully you will see that using umlauts in markup 
attributes does work

Am 03.03.2011 um 07:35 schrieb MattyDE:

> Okay, i know what you all mean. But what i have misappropriated from you, is
> my own implementation of an IStringResourceLoader so iam not loading any
> String-Ressources from Property Files. Iam using a Database-Logic to
> translate the application.
> 
> So iam still disappointed not to use ANY tag and ANY character inside the
> key=" " brackets.
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/German-umlauts-in-Wicket-Message-Tag-tp3331297p3332827.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: How to automate clicking of a link or button

2011-03-03 Thread drf
I've got some code now which does what I want - different from what you
suggested with London-Paint - still need to return to that as once I have it
working it will be probably be better. I can click on a link/button, and run
a piece of code which runs a javascript function and returns the value to
the java code. My particular use case is to call an activeX function to see
if a security minikey is attatched, configured, and so on. I think what I
have is a bit of a hack right now, but it works, and now I want to package
it up better so it can be used as a component, kind of like this:

Object obj = new JSFunctionCaller("function-name").getReturnValue();

This is what I am thinking: put the functionality I have in a seperate panel
(JSFunctionCaller), instantiate the panel and then, within the constructor,
automatically call the ajax ink which, right now, I have to manually click
on to get this thing to work. I am also thinking now that I may be able to
just add an AjaxEventListener to the onload of the page - that would also
work as it would give me an AjaxRequestTarget which I could then use for
appendJavascript()




On Thu, Mar 3, 2011 at 2:23 PM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+227-1044453854-65...@n4.nabble.com> wrote:

> What do you want to do exactly ?
>
> There is no need to click a button in Wicket.
> E.g.:
> btn = new Button(...) {
>public void onClick() {
>   myService.doSomething();
>}
> }
>
> so you can just call: myService.doSomething() instead.
>
> In javascript you can do: Wicket.$("myButtonId").click()
>
> On Thu, Mar 3, 2011 at 2:16 PM, drf <[hidden 
> email]>
> wrote:
>
> > Is there any way to automate the clicking of a link or button, similar to
>
> > WicketTester, but within a running Wicket WebApplication ?
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp220p220.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp220p227.html
>  To unsubscribe from How to automate clicking of a link or button, click
> here.
>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp220p358.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: Integrating jquery scripts with wicket

2011-03-03 Thread Cemal Bayramoglu
... a lot of people say they are having a good experience with wiQuery [1].
See if it works for you.

Regards - Cemal
jWeekend
Training, Consulting, Development
http://jWeekend.com

[1] http://code.google.com/p/wiquery/

On 3 March 2011 11:59, tech7  wrote:

> Can anyone explain how can i integrate(runnable) my jquery scripts in my
> wicket project?
> I will be thankful.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p200.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: Integrating jquery scripts with wicket

2011-03-03 Thread Hans Lesmeister 2
Maybe you can find something here: 
http://www.google.de/#q=wicket+jquery+integration&fp=1


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p234.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: Integrating jquery scripts with wicket

2011-03-03 Thread Pedro Santos
A good place is to override your component or
behavior IHeaderContributor#renderHead and respond with needed
javascript/css references or some the javascript function call.

On Thu, Mar 3, 2011 at 8:59 AM, tech7  wrote:

> Can anyone explain how can i integrate(runnable) my jquery scripts in my
> wicket project?
> I will be thankful.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p200.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
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: How to automate clicking of a link or button

2011-03-03 Thread Martin Grigorov
What do you want to do exactly ?

There is no need to click a button in Wicket.
E.g.:
btn = new Button(...) {
   public void onClick() {
  myService.doSomething();
   }
}

so you can just call: myService.doSomething() instead.

In javascript you can do: Wicket.$("myButtonId").click()

On Thu, Mar 3, 2011 at 2:16 PM, drf  wrote:

> Is there any way to automate the clicking of a link or button, similar to
> WicketTester, but within a running Wicket WebApplication ?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp220p220.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
>
>


How to automate clicking of a link or button

2011-03-03 Thread drf
Is there any way to automate the clicking of a link or button, similar to
WicketTester, but within a running Wicket WebApplication ?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp220p220.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: Integrating jquery scripts with wicket

2011-03-03 Thread tech7
Can anyone explain how can i integrate(runnable) my jquery scripts in my
wicket project?
I will be thankful.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p200.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: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Martin Grigorov
With TransparentWebMarkupContainer attached to the  you don't need to
override Component#add()

On Thu, Mar 3, 2011 at 1:07 PM, Gonzalo Aguilar Delgado <
gagui...@aguilardelgado.com> wrote:

> Hi Martin,
>
> I will try the IMarkupFilter approach.
>
> The problem with Matt approach  is not in the body component but in
> BasePage of the Matt example.
>
> Since Webpage inherits from MarkupContainer I cannot override the add
> method to add childs to body component instead of the page. So this approach
> will not work.
>
>
> Tnx a lot
>
> Martin Grigorov  wrote:
>
> >Hi,
> >
> >you may use TransparentWebMarkupContainer for the body.
> >Or create your own IMarkupFilter that adds a Behavior to the  open
> >tag, and this behavior appends/sets the class attribute depending on the
> >user session or whatever the Dojo theme depends on.
> >See org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler for
> >example.
> >
> >
> >On Thu, Mar 3, 2011 at 12:15 PM, Gonzalo Aguilar Delgado <
> >gagui...@aguilardelgado.com> wrote:
> >
> >> Hello Matt,
> >>
> >> It does not work as I cannot override add method from
> webmarkupcontainer.
> >>
> >> Even if it works I will have to add something to the htlm. Right?
> >>
> >>
> >> Tnx again
> >>
> >> Matt Brictson  wrote:
> >>
> >> >Since isTransparentResolver() is going away in 1.5, the trick that I
> found
> >> is to create a normal WebMarkupContainer for the  element, then
> >> override add(Component...) of the page to mimic the transparent resolver
> >> feature.
> >> >
> >> >Your pages can then contribute to the  element by adding
> >> AttributeModifier, etc. to the WebMarkupContainer.
> >> >
> >> >See:
> >> ><
> >>
> https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-MarkupContainer.isTransparentResolver%2528%2529removed
> >> >
> >> >
> >> >Here's an example:
> >> >
> >> >public abstract class BasePage extends WebPage
> >> >{
> >> >private WebMarkupContainer _body;
> >> >
> >> >public BasePage(PageParameters params)
> >> >{
> >> >super(params);
> >> >
> >> >// Allow subclasses to register CSS classes on the body tag
> >> >WebMarkupContainer body = new WebMarkupContainer("body");
> >> >body.setOutputMarkupId(true);
> >> >add(body);
> >> >
> >> >// From now on add() will add to _body instead of page
> >> >this._body = body;
> >> >}
> >> >
> >> >/**
> >> > * Return a component that represents the {@code } of the
> page.
> >> > * Use this to add CSS classes or set the markup ID for styling
> >> purposes.
> >> > */
> >> >public WebMarkupContainer getBody()
> >> >{
> >> >return _body;
> >> >}
> >> >
> >> >/**
> >> > * When subclasses of BasePage add components to the page, in
> reality
> >> > * they need to be added as children of the {@code }
> container.
> >> > * This implementation ensures the page hierarchy is correctly
> >> enforced.
> >> > *
> >> > * @return {@code this} to allow chaining
> >> > */
> >> >@Override
> >> >public BasePage add(Component... childs)
> >> >{
> >> >for(Component c : childs)
> >> >{
> >> >// Wicket automatically translates  into an
> >> >// HtmlHeaderContainer and adds it to the page. Make sure
> this
> >> >// is registered as a direct child of the page itself, not
> the
> >> >// body.
> >> >if(null == _body || c instanceof HtmlHeaderContainer)
> >> >{
> >> >super.add(c);
> >> >}
> >> >// Everything else goes into the .
> >> >else
> >> >{
> >> >_body.add(c);
> >> >}
> >> >}
> >> >return this;
> >> >}
> >> >}
> >> >
> >> >--
> >> >Matt
> >> >
> >> >On Mar 2, 2011, at 11:35 AM, Gonzalo Aguilar Delgado wrote:
> >> >
> >> >> Hello,
> >> >>
> >> >> I'm building a wiJQuery equivalent for Dojo. And it seems to work
> nice
> >> >> with new wicket 1.5. HeaderContributions are really nice... Great
> work!
> >> >>
> >> >> But I ran into problems when trying to setup the themes.
> >> >>
> >> >> I have to put something like this in the body:
> >> >>
> >> >> 
> >> >>
> >> >> 
> >> >>
> >> >> But I rode a lot and discovered that wicket no longer supports
> >> >> contributing to body because onLoad handler as well others.
> >> >>
> >> >> Reading in forums I found the BodyTagAttributeModifier but you need a
> >> >> panel that I wont have.
> >> >>
> >> >> And the:
> >> >>
> >> >> 
> >> >>
> >> >>add(new WebMarkupContainer("body"){
> >> >>@Override
> >> >>public boolean isTransparentResolver() {
> >> >>return true;
> >> >>}
> >> >>@Override
> >> >>protected void onComponentTag(ComponentTag tag) {
> >> >>tag.put("class",  "somestyle");
> >> >>}
> >> >>});
> >> >> It will not 

Re: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Gonzalo Aguilar Delgado
Hi Martin,

I will try the IMarkupFilter approach.

The problem with Matt approach  is not in the body component but in BasePage of 
the Matt example. 

Since Webpage inherits from MarkupContainer I cannot override the add method to 
add childs to body component instead of the page. So this approach will not 
work. 


Tnx a lot

Martin Grigorov  wrote:

>Hi,
>
>you may use TransparentWebMarkupContainer for the body.
>Or create your own IMarkupFilter that adds a Behavior to the  open
>tag, and this behavior appends/sets the class attribute depending on the
>user session or whatever the Dojo theme depends on.
>See org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler for
>example.
>
>
>On Thu, Mar 3, 2011 at 12:15 PM, Gonzalo Aguilar Delgado <
>gagui...@aguilardelgado.com> wrote:
>
>> Hello Matt,
>>
>> It does not work as I cannot override add method from webmarkupcontainer.
>>
>> Even if it works I will have to add something to the htlm. Right?
>>
>>
>> Tnx again
>>
>> Matt Brictson  wrote:
>>
>> >Since isTransparentResolver() is going away in 1.5, the trick that I found
>> is to create a normal WebMarkupContainer for the  element, then
>> override add(Component...) of the page to mimic the transparent resolver
>> feature.
>> >
>> >Your pages can then contribute to the  element by adding
>> AttributeModifier, etc. to the WebMarkupContainer.
>> >
>> >See:
>> ><
>> https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-MarkupContainer.isTransparentResolver%2528%2529removed
>> >
>> >
>> >Here's an example:
>> >
>> >public abstract class BasePage extends WebPage
>> >{
>> >private WebMarkupContainer _body;
>> >
>> >public BasePage(PageParameters params)
>> >{
>> >super(params);
>> >
>> >// Allow subclasses to register CSS classes on the body tag
>> >WebMarkupContainer body = new WebMarkupContainer("body");
>> >body.setOutputMarkupId(true);
>> >add(body);
>> >
>> >// From now on add() will add to _body instead of page
>> >this._body = body;
>> >}
>> >
>> >/**
>> > * Return a component that represents the {@code } of the page.
>> > * Use this to add CSS classes or set the markup ID for styling
>> purposes.
>> > */
>> >public WebMarkupContainer getBody()
>> >{
>> >return _body;
>> >}
>> >
>> >/**
>> > * When subclasses of BasePage add components to the page, in reality
>> > * they need to be added as children of the {@code } container.
>> > * This implementation ensures the page hierarchy is correctly
>> enforced.
>> > *
>> > * @return {@code this} to allow chaining
>> > */
>> >@Override
>> >public BasePage add(Component... childs)
>> >{
>> >for(Component c : childs)
>> >{
>> >// Wicket automatically translates  into an
>> >// HtmlHeaderContainer and adds it to the page. Make sure this
>> >// is registered as a direct child of the page itself, not the
>> >// body.
>> >if(null == _body || c instanceof HtmlHeaderContainer)
>> >{
>> >super.add(c);
>> >}
>> >// Everything else goes into the .
>> >else
>> >{
>> >_body.add(c);
>> >}
>> >}
>> >return this;
>> >}
>> >}
>> >
>> >--
>> >Matt
>> >
>> >On Mar 2, 2011, at 11:35 AM, Gonzalo Aguilar Delgado wrote:
>> >
>> >> Hello,
>> >>
>> >> I'm building a wiJQuery equivalent for Dojo. And it seems to work nice
>> >> with new wicket 1.5. HeaderContributions are really nice... Great work!
>> >>
>> >> But I ran into problems when trying to setup the themes.
>> >>
>> >> I have to put something like this in the body:
>> >>
>> >> 
>> >>
>> >> 
>> >>
>> >> But I rode a lot and discovered that wicket no longer supports
>> >> contributing to body because onLoad handler as well others.
>> >>
>> >> Reading in forums I found the BodyTagAttributeModifier but you need a
>> >> panel that I wont have.
>> >>
>> >> And the:
>> >>
>> >> 
>> >>
>> >>add(new WebMarkupContainer("body"){
>> >>@Override
>> >>public boolean isTransparentResolver() {
>> >>return true;
>> >>}
>> >>@Override
>> >>protected void onComponentTag(ComponentTag tag) {
>> >>tag.put("class",  "somestyle");
>> >>}
>> >>});
>> >> It will not work because wicket:id attribute removed from body in
>> version 1.5.
>> >>
>> >>
>> >> So... What's they way to go?
>> >>
>> >>
>> >> -
>> >> 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 ad

Re: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Martin Grigorov
Hi,

you may use TransparentWebMarkupContainer for the body.
Or create your own IMarkupFilter that adds a Behavior to the  open
tag, and this behavior appends/sets the class attribute depending on the
user session or whatever the Dojo theme depends on.
See org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler for
example.


On Thu, Mar 3, 2011 at 12:15 PM, Gonzalo Aguilar Delgado <
gagui...@aguilardelgado.com> wrote:

> Hello Matt,
>
> It does not work as I cannot override add method from webmarkupcontainer.
>
> Even if it works I will have to add something to the htlm. Right?
>
>
> Tnx again
>
> Matt Brictson  wrote:
>
> >Since isTransparentResolver() is going away in 1.5, the trick that I found
> is to create a normal WebMarkupContainer for the  element, then
> override add(Component...) of the page to mimic the transparent resolver
> feature.
> >
> >Your pages can then contribute to the  element by adding
> AttributeModifier, etc. to the WebMarkupContainer.
> >
> >See:
> ><
> https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-MarkupContainer.isTransparentResolver%2528%2529removed
> >
> >
> >Here's an example:
> >
> >public abstract class BasePage extends WebPage
> >{
> >private WebMarkupContainer _body;
> >
> >public BasePage(PageParameters params)
> >{
> >super(params);
> >
> >// Allow subclasses to register CSS classes on the body tag
> >WebMarkupContainer body = new WebMarkupContainer("body");
> >body.setOutputMarkupId(true);
> >add(body);
> >
> >// From now on add() will add to _body instead of page
> >this._body = body;
> >}
> >
> >/**
> > * Return a component that represents the {@code } of the page.
> > * Use this to add CSS classes or set the markup ID for styling
> purposes.
> > */
> >public WebMarkupContainer getBody()
> >{
> >return _body;
> >}
> >
> >/**
> > * When subclasses of BasePage add components to the page, in reality
> > * they need to be added as children of the {@code } container.
> > * This implementation ensures the page hierarchy is correctly
> enforced.
> > *
> > * @return {@code this} to allow chaining
> > */
> >@Override
> >public BasePage add(Component... childs)
> >{
> >for(Component c : childs)
> >{
> >// Wicket automatically translates  into an
> >// HtmlHeaderContainer and adds it to the page. Make sure this
> >// is registered as a direct child of the page itself, not the
> >// body.
> >if(null == _body || c instanceof HtmlHeaderContainer)
> >{
> >super.add(c);
> >}
> >// Everything else goes into the .
> >else
> >{
> >_body.add(c);
> >}
> >}
> >return this;
> >}
> >}
> >
> >--
> >Matt
> >
> >On Mar 2, 2011, at 11:35 AM, Gonzalo Aguilar Delgado wrote:
> >
> >> Hello,
> >>
> >> I'm building a wiJQuery equivalent for Dojo. And it seems to work nice
> >> with new wicket 1.5. HeaderContributions are really nice... Great work!
> >>
> >> But I ran into problems when trying to setup the themes.
> >>
> >> I have to put something like this in the body:
> >>
> >> 
> >>
> >> 
> >>
> >> But I rode a lot and discovered that wicket no longer supports
> >> contributing to body because onLoad handler as well others.
> >>
> >> Reading in forums I found the BodyTagAttributeModifier but you need a
> >> panel that I wont have.
> >>
> >> And the:
> >>
> >> 
> >>
> >>add(new WebMarkupContainer("body"){
> >>@Override
> >>public boolean isTransparentResolver() {
> >>return true;
> >>}
> >>@Override
> >>protected void onComponentTag(ComponentTag tag) {
> >>tag.put("class",  "somestyle");
> >>}
> >>});
> >> It will not work because wicket:id attribute removed from body in
> version 1.5.
> >>
> >>
> >> So... What's they way to go?
> >>
> >>
> >> -
> >> 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: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-03 Thread Gonzalo Aguilar Delgado
Hello Matt,

It does not work as I cannot override add method from webmarkupcontainer.

Even if it works I will have to add something to the htlm. Right?


Tnx again

Matt Brictson  wrote:

>Since isTransparentResolver() is going away in 1.5, the trick that I found is 
>to create a normal WebMarkupContainer for the  element, then override 
>add(Component...) of the page to mimic the transparent resolver feature.
>
>Your pages can then contribute to the  element by adding 
>AttributeModifier, etc. to the WebMarkupContainer.
>
>See:
>
>
>Here's an example:
>
>public abstract class BasePage extends WebPage
>{
>private WebMarkupContainer _body;
>
>public BasePage(PageParameters params)
>{
>super(params);
>
>// Allow subclasses to register CSS classes on the body tag
>WebMarkupContainer body = new WebMarkupContainer("body");
>body.setOutputMarkupId(true);
>add(body);
>
>// From now on add() will add to _body instead of page
>this._body = body;
>}
>
>/**
> * Return a component that represents the {@code } of the page.
> * Use this to add CSS classes or set the markup ID for styling purposes.
> */
>public WebMarkupContainer getBody()
>{
>return _body;
>}
>
>/**
> * When subclasses of BasePage add components to the page, in reality
> * they need to be added as children of the {@code } container.
> * This implementation ensures the page hierarchy is correctly enforced.
> * 
> * @return {@code this} to allow chaining
> */
>@Override
>public BasePage add(Component... childs)
>{
>for(Component c : childs)
>{
>// Wicket automatically translates  into an
>// HtmlHeaderContainer and adds it to the page. Make sure this
>// is registered as a direct child of the page itself, not the
>// body.
>if(null == _body || c instanceof HtmlHeaderContainer)
>{
>super.add(c);
>}
>// Everything else goes into the .
>else
>{
>_body.add(c);
>}
>}
>return this;
>}
>}
>
>-- 
>Matt
>
>On Mar 2, 2011, at 11:35 AM, Gonzalo Aguilar Delgado wrote:
>
>> Hello, 
>> 
>> I'm building a wiJQuery equivalent for Dojo. And it seems to work nice
>> with new wicket 1.5. HeaderContributions are really nice... Great work!
>> 
>> But I ran into problems when trying to setup the themes. 
>> 
>> I have to put something like this in the body:
>> 
>> 
>> 
>> 
>> 
>> But I rode a lot and discovered that wicket no longer supports
>> contributing to body because onLoad handler as well others.
>> 
>> Reading in forums I found the BodyTagAttributeModifier but you need a
>> panel that I wont have.
>> 
>> And the:
>> 
>>  
>> 
>>add(new WebMarkupContainer("body"){
>>@Override
>>public boolean isTransparentResolver() {
>>return true;
>>}
>>@Override
>>protected void onComponentTag(ComponentTag tag) {
>>tag.put("class",  "somestyle");
>>}
>>}); 
>> It will not work because wicket:id attribute removed from body in version 
>> 1.5.
>> 
>> 
>> So... What's they way to go?
>> 
>> 
>> -
>> 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: Attribute Inheritance or Copying?

2011-03-03 Thread Hans Lesmeister 2


> I've to access the ComponentTag of my Panel but dont know how, except
> iam in "onComponentTag". 
> 

Yes, in onComponentTag of the surrounding WebmarkupContainer, you can get
and preserve the desired attributes and then remove them.

In onComponentTag of the TextArea you add the previously preserved
attributes.


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Attribute-Inheritance-or-Copying-tp3332828p014.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and Amazon EC2

2011-03-03 Thread Korbinian Bachl - privat

PS:

please forget the link to ubuntu-setup - they try to promote their 
landscape there, made a mistake :(


instead just use the aws-console with these preconfigured AMIs: 
http://uec-images.ubuntu.com/releases/lucid/release/



Am 03.03.11 06:15, schrieb ookpalm:

Not at all?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Amazon-EC2-tp3332718p3332775.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: Wicket and Amazon EC2

2011-03-03 Thread Korbinian Bachl - privat
As long as you're using any EC2 instance with an EBS-AMI its just 
another server you can deploy any operating system on you like.


Only remind that you mustn't terminate the machine but only stop/pause 
it as terminating equals to throwing away the server in reality while 
pausing means to shut it down (not pause it in memory);


So to use wicket on I suggest you to first create an Ubuntu LTS AMI 
following these instructions:

http://www.ubuntu.com/cloud/public/deploy

Then you install java on it using apt-get or aptitude (make sure to 
update indices first) and install the wanted appserver like e.g.: tomcat 
or glassfish and do the startup-scripts, and thats it.


After that I suggest you to clone the EBS drive to a SNAPSHOT, so 
instantly can launch more instances on exact same config (see EC2/EBS doc).


Then you bind any needed elastic-IP's to it and deploy you wicket app - 
thats it :D


In case you run low on power or memory you can adjust the instance type 
to the one you need, but bear in mind that the micro instance only 
provides you 32 BIT while the rest is 64 BIT, so in case you did a 64BIT 
OS you can't go to micro;


thats it :)





Am 03.03.11 06:15, schrieb ookpalm:

Not at all?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Amazon-EC2-tp3332718p3332775.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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