Re: Using PageReference for a 'back' link

2012-10-23 Thread Dirk Forchel
Here a short example with two Pages (a kind of overview page and a
detailed view page) how it could work:

e.g. in OverviewPage.java:



in DetailedViewPage.java:






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212p4653235.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: WiQuery 6.0

2012-10-23 Thread Guillaume Smet
Hi Nick,

On Tue, Oct 23, 2012 at 1:28 AM, Nick Pratt nbpr...@gmail.com wrote:
 I do see the imports of jquery and jquery.ui.autocomplete (which I checked
 are available and served by the web server) - there's just no
 wiquery-gen-uniqueid script in the page

This is a bug.

See my pending pull request here:
https://github.com/WiQuery/wiquery/pull/9

If you don't use autoUpdate, this pull request is sufficient to get
the autocomplete working.

I'm working on another patch to get the autoUpdate feature working.

-- 
Guillaume

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



Wicket in PHP

2012-10-23 Thread martin.dilger
Hi,

I´m a freelance software developer in germany.
I recently got a problem, since my webhoster only provides php. I´m used to
work with wicket, so i didnt want to miss this pleasure for my own website.

So, the only solution was to implement wicket in php and call it (picket):).

This is just a hobby project in pre-alpha state and far from
production-ready, but my site
www.effectivetrainings.de is completely implemented in picket.

If you are interested, just have a look.

http://www.effectivetrainings.de/framework/examples/pages/ExamplesPage.php

Regards

Martin Dilger



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-PHP-tp4653237.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 6.1.0 default logging configuration

2012-10-23 Thread Martin Grigorov
Hi,

Wicket comes only with slf4j-api.jar. The application developer should
provide the implementation.
Check with 'mvn dependency:tree' that there is no other SLF4J impl
than yours (logback).
Additionally with ClassLoader#getResources(/logback.xml)
(logback-test.xml, logback.groovy, log4j.properties) you may find
whether there is one of those in the classpath and where exactly.

On Tue, Oct 23, 2012 at 1:31 AM, Wujek Srujek wujek.sru...@gmail.com wrote:
 Hi. I am using wicket 6.1.0 and logback-classic as my logging backend.
 There is no configuration anywhere but wicket (and wicket only) logs
 everything at level DEBUG - where can this be coming come from?

 wujek



-- 
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: Wicket in PHP

2012-10-23 Thread James mCruncher
Love the name picket.
Demo is impressive considering that it's in pre-alpha and in an entirely
new language.

On Tue, Oct 23, 2012 at 3:16 PM, martin.dilger martin.dil...@googlemail.com
 wrote:

 Hi,

 I´m a freelance software developer in germany.
 I recently got a problem, since my webhoster only provides php. I´m used to
 work with wicket, so i didnt want to miss this pleasure for my own website.

 So, the only solution was to implement wicket in php and call it
 (picket):).

 This is just a hobby project in pre-alpha state and far from
 production-ready, but my site
 www.effectivetrainings.de is completely implemented in picket.

 If you are interested, just have a look.

 http://www.effectivetrainings.de/framework/examples/pages/ExamplesPage.php

 Regards

 Martin Dilger



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-in-PHP-tp4653237.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




-- 
Thanks  regards
James Selvakumar


Re: Wicket page test

2012-10-23 Thread James mCruncher
Should that call be made on tearDown or tearDownClass?

On Mon, Oct 22, 2012 at 6:01 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Call it and try again.

 On Mon, Oct 22, 2012 at 11:45 AM, Arunachalam Sibisakkaravarthi
 arunacha...@mcruncher.com wrote:
  No, We don't call wicketTester.destroy() at the end of tests.
 
  On Mon, Oct 22, 2012 at 5:01 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  Hi,
 
  Do you call wicketTester.destroy() at the end of your tests ?
 
  On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi
  arunacha...@mcruncher.com wrote:
   Hai,
  
   Here we are using wicket 1.5.7.
  
   We have a simple test for each wicket page to assert rendering like
 this:
  
   WicketTester.assertRenderedPage(Page.class);
  
   In our module we have 52 tests w.r.t wicket pages.
  
   It takes so long to run these tests.
  
   Please give suggestion to improve test cases that how to reduce the
 time
   taken by this module.
  
   --
   *Thanks And Regards
   Sibi.Arunachalam
   mCruncher*
 
 
 
  --
  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
 
 
 
 
  --
  *Thanks And Regards
  Sibi.Arunachalam
  mCruncher*



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




-- 
Thanks  regards
James Selvakumar


Re: Wicket page test

2012-10-23 Thread Martin Grigorov
On Tue, Oct 23, 2012 at 10:38 AM, James mCruncher ja...@mcruncher.com wrote:
 Should that call be made on tearDown or tearDownClass?

It depends where WicketTester is initialized.


 On Mon, Oct 22, 2012 at 6:01 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Call it and try again.

 On Mon, Oct 22, 2012 at 11:45 AM, Arunachalam Sibisakkaravarthi
 arunacha...@mcruncher.com wrote:
  No, We don't call wicketTester.destroy() at the end of tests.
 
  On Mon, Oct 22, 2012 at 5:01 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  Hi,
 
  Do you call wicketTester.destroy() at the end of your tests ?
 
  On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi
  arunacha...@mcruncher.com wrote:
   Hai,
  
   Here we are using wicket 1.5.7.
  
   We have a simple test for each wicket page to assert rendering like
 this:
  
   WicketTester.assertRenderedPage(Page.class);
  
   In our module we have 52 tests w.r.t wicket pages.
  
   It takes so long to run these tests.
  
   Please give suggestion to improve test cases that how to reduce the
 time
   taken by this module.
  
   --
   *Thanks And Regards
   Sibi.Arunachalam
   mCruncher*
 
 
 
  --
  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
 
 
 
 
  --
  *Thanks And Regards
  Sibi.Arunachalam
  mCruncher*



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




 --
 Thanks  regards
 James Selvakumar



-- 
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: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Decebal Suiu
public class DesignModeListener implements IComponentInstantiationListener {

private boolean designMode = true;

@Override
public void onInstantiation(Component component) {
if (component instanceof WebMarkupContainer) {
Class? klass = component.getClass();
while (klass.isAnonymousClass()) {
klass = klass.getSuperclass();
}

if (klass.getName().startsWith(com.acme)) {
component.add(new DesignModeBehavior());
}
}
}

private class DesignModeBehavior extends Behavior {

private static final long serialVersionUID = 1L;

@Override
public void beforeRender(Component component) {
super.beforeRender(component);

if (designMode) {
// TODO
Class? klass = component.getClass();
while (klass.isAnonymousClass()) {
klass = klass.getSuperclass();
}

Response response = component.getResponse();
response.write(\n);
}
}

@Override
public void afterRender(Component component) {
super.afterRender(component);

if (designMode) {
// TODO
Class? klass = component.getClass();
while (klass.isAnonymousClass()) {
klass = klass.getSuperclass();
}

Response response = component.getResponse();
response.write(\n);
}   
}

}

}

In WicketApplication.init(): getComponentInstantiationListeners().add(new
DesignModeListener());

In WebPage.java: add(new HeaderPanel(header));

In WebPage.html:   div wicket:id=header id=header/div

My problem is that DesignModeBehavior decorates HeaderPanel with two
comments (before and after component tag) but the behavior what I want to
achieve is the same with setOutputMarkupContainerClassName on DebugSettings
(see MarkupContainer.renderAssociatedMarkup) - the comments are placed
before and after component tag body.

Is it more clear now?

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653243.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 page test

2012-10-23 Thread James Selvakumar
Sorry if this is asked previously. Is it advisable to use a shared wicket
tester across multiple unit tests?

On Tue, Oct 23, 2012 at 3:39 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Tue, Oct 23, 2012 at 10:38 AM, James mCruncher ja...@mcruncher.com
 wrote:
  Should that call be made on tearDown or tearDownClass?

 It depends where WicketTester is initialized.

 
  On Mon, Oct 22, 2012 at 6:01 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  Call it and try again.
 
  On Mon, Oct 22, 2012 at 11:45 AM, Arunachalam Sibisakkaravarthi
  arunacha...@mcruncher.com wrote:
   No, We don't call wicketTester.destroy() at the end of tests.
  
   On Mon, Oct 22, 2012 at 5:01 PM, Martin Grigorov 
 mgrigo...@apache.org
  wrote:
  
   Hi,
  
   Do you call wicketTester.destroy() at the end of your tests ?
  
   On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi
   arunacha...@mcruncher.com wrote:
Hai,
   
Here we are using wicket 1.5.7.
   
We have a simple test for each wicket page to assert rendering like
  this:
   
WicketTester.assertRenderedPage(Page.class);
   
In our module we have 52 tests w.r.t wicket pages.
   
It takes so long to run these tests.
   
Please give suggestion to improve test cases that how to reduce the
  time
taken by this module.
   
--
*Thanks And Regards
Sibi.Arunachalam
mCruncher*
  
  
  
   --
   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
  
  
  
  
   --
   *Thanks And Regards
   Sibi.Arunachalam
   mCruncher*
 
 
 
  --
  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
 
 
 
 
  --
  Thanks  regards
  James Selvakumar



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




-- 
Thanks  regards
James Selvakumar


Re: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Martin Grigorov
Hi,

On Tue, Oct 23, 2012 at 10:49 AM, Decebal Suiu decebal.s...@asf.ro wrote:
 public class DesignModeListener implements IComponentInstantiationListener {

 private boolean designMode = true;

 @Override
 public void onInstantiation(Component component) {
 if (component instanceof WebMarkupContainer) {
 Class? klass = component.getClass();
 while (klass.isAnonymousClass()) {
 klass = klass.getSuperclass();
 }

 if (klass.getName().startsWith(com.acme)) {
 component.add(new DesignModeBehavior());
 }
 }
 }

 private class DesignModeBehavior extends Behavior {

 private static final long serialVersionUID = 1L;

 @Override
 public void beforeRender(Component component) {
 super.beforeRender(component);

 if (designMode) {
 // TODO
 Class? klass = component.getClass();
 while (klass.isAnonymousClass()) {
 klass = klass.getSuperclass();
 }

 Response response = component.getResponse();
 response.write(\n);
 }
 }

 @Override
 public void afterRender(Component component) {
 super.afterRender(component);

 if (designMode) {
 // TODO
 Class? klass = component.getClass();
 while (klass.isAnonymousClass()) {
 klass = klass.getSuperclass();
 }

 Response response = component.getResponse();
 response.write(\n);
 }
 }

 }

 }

 In WicketApplication.init(): getComponentInstantiationListeners().add(new
 DesignModeListener());

 In WebPage.java: add(new HeaderPanel(header));

 In WebPage.html:   div wicket:id=header id=header/div

 My problem is that DesignModeBehavior decorates HeaderPanel with two
 comments (before and after component tag) but the behavior what I want to
 achieve is the same with setOutputMarkupContainerClassName on DebugSettings
 (see MarkupContainer.renderAssociatedMarkup) - the comments are placed
 before and after component tag body.

 Is it more clear now?

Yes, it is more clear.
There was a similar question few days ago by Jesse Long in users@ -
subject Behavior modifying component body.
 Currently Behavior.java doesn't provide methods to write in the
component tag body.
You can use AbstractTransformBehavior as a workaround.


 Best regards,
 Decebal



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653243.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Wicket 6 trees

2012-10-23 Thread PDiefent
yes, i've overridden this method:
@Override
protected Component newContentComponent(String id, IModelSerializable
model) {
return new StyledLinkLabelSerializable(id, model)
{
private static final long serialVersionUID = 1L;


@Override
protected String getStyleClass() {
return treeIcon;
}

}; 
}

Now I get a link without markup followed by the icon and the text from the
model:

div id=node78 class=tree-node
../page?4-1.ILinkListener-tree-subtree-branches-1-node-junction  


em
1 - The space is you - Kurt Klavier (more in time)
/em


/div



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-trees-tp4653082p4653246.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: Using PageReference for a 'back' link

2012-10-23 Thread Martin Grigorov
Hi,

The question was how to use PageReference with BookmarkablePageLink.

To do this the current page id can be passed as a parameter to the next page.

add(new BookmarkablePageLink(id).getPageParameters().add(prevPageId,
getPage().getPageId()));

In the NextPage.java do:

PageReference prev = new
PageReference(getPageParameters().get(prevPageId).toInteger());

On Tue, Oct 23, 2012 at 9:41 AM, Dirk Forchel dirk.forc...@exedio.com wrote:
 Here a short example with two Pages (a kind of overview page and a
 detailed view page) how it could work:

 e.g. in OverviewPage.java:



 in DetailedViewPage.java:






 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212p4653235.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Using PageReference for a 'back' link

2012-10-23 Thread Leonardo D'Alimonte
Hello Dirk,

thanks for the quick reply.

BookmarkablePageLink doesn't allow overriding of onClick behaviour, so I
don't know if I can implement a custom bookmarkable link the way you
described... :)

I attach down here an example of what I described before:

In MyPage.class I wnat to add the link below:

add(new BookmarkablePageLink(accertamento,
AccertamentoSerbatoiPage.class));

and inside AccertamentoSerbatoiPage.class I would link a link that points
back to MyPagehow can I pass the PageReference of MyPage inside that
constructor?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212p4653248.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 6 trees

2012-10-23 Thread Sven Meier

Hi,

if I paste your code into BeginnersTreePage from wicket-examples:

@Override
protected Component newContentComponent(String id, 
IModelFoo node)

{
return new StyledLinkLabelFoo(id, node)
{
private static final long serialVersionUID = 1L;


@Override
protected String getStyleClass()
{
return treeIcon;
}

};
}

... it works as expected.


Now I get a link without markup followed by the icon and the text from the model


Please check your markup in the containing component/page. Perhaps a tag isn't 
properly closed?

Sve



On 10/23/2012 10:06 AM, PDiefent wrote:

return new StyledLinkLabelSerializable(id, model)
{
private static final long serialVersionUID = 1L;


@Override
protected String getStyleClass() {
return treeIcon;
}

};



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



Re: wicket 6.1.0 default logging configuration

2012-10-23 Thread Wujek Srujek
I am not using maven but gradle, but otherwise:
* there is only one logback jar on the classpath
* there are no configuration files anywhere - I had checked this before
posting
But there may be programmatic configuration somewhere, and as I am seeing a
lot of wicket DEBUG output, I thought it were wicket's doing.


wujek

On Tue, Oct 23, 2012 at 9:24 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 Wicket comes only with slf4j-api.jar. The application developer should
 provide the implementation.
 Check with 'mvn dependency:tree' that there is no other SLF4J impl
 than yours (logback).
 Additionally with ClassLoader#getResources(/logback.xml)
 (logback-test.xml, logback.groovy, log4j.properties) you may find
 whether there is one of those in the classpath and where exactly.

 On Tue, Oct 23, 2012 at 1:31 AM, Wujek Srujek wujek.sru...@gmail.com
 wrote:
  Hi. I am using wicket 6.1.0 and logback-classic as my logging backend.
  There is no configuration anywhere but wicket (and wicket only) logs
  everything at level DEBUG - where can this be coming come from?
 
  wujek



 --
 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: Wicket page test

2012-10-23 Thread Martin Grigorov
On Tue, Oct 23, 2012 at 10:59 AM, James Selvakumar ja...@mcruncher.com wrote:
 Sorry if this is asked previously. Is it advisable to use a shared wicket
 tester across multiple unit tests?


I would not recommend that.
WicketTester keeps a reference to YourApplication which may keep
references to any services for your app.
By keeping reusing the same WicketTester you should make sure that all
your services are reusable, i.e. do not keep state.

 On Tue, Oct 23, 2012 at 3:39 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Tue, Oct 23, 2012 at 10:38 AM, James mCruncher ja...@mcruncher.com
 wrote:
  Should that call be made on tearDown or tearDownClass?

 It depends where WicketTester is initialized.

 
  On Mon, Oct 22, 2012 at 6:01 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  Call it and try again.
 
  On Mon, Oct 22, 2012 at 11:45 AM, Arunachalam Sibisakkaravarthi
  arunacha...@mcruncher.com wrote:
   No, We don't call wicketTester.destroy() at the end of tests.
  
   On Mon, Oct 22, 2012 at 5:01 PM, Martin Grigorov 
 mgrigo...@apache.org
  wrote:
  
   Hi,
  
   Do you call wicketTester.destroy() at the end of your tests ?
  
   On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi
   arunacha...@mcruncher.com wrote:
Hai,
   
Here we are using wicket 1.5.7.
   
We have a simple test for each wicket page to assert rendering like
  this:
   
WicketTester.assertRenderedPage(Page.class);
   
In our module we have 52 tests w.r.t wicket pages.
   
It takes so long to run these tests.
   
Please give suggestion to improve test cases that how to reduce the
  time
taken by this module.
   
--
*Thanks And Regards
Sibi.Arunachalam
mCruncher*
  
  
  
   --
   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
  
  
  
  
   --
   *Thanks And Regards
   Sibi.Arunachalam
   mCruncher*
 
 
 
  --
  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
 
 
 
 
  --
  Thanks  regards
  James Selvakumar



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




 --
 Thanks  regards
 James Selvakumar



-- 
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: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Decebal Suiu
AbstractTransformerBehavior can be a solution but I must parse the output to
retrieve the component tag body. For a particular situation (Jesse Long
situation) to parse the output it's not a big deal but in my situation
(something general for all my markup containers) I don't see a solution.
Maybe I suppose that all my container markups are divs (div .../div). Is
it an util class in wicket that can help me with the parsing operation? I
want to retrieve the component tag body only.

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653252.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: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Martin Grigorov
You just need to put something after the first closing tag and before
the last opening one.

For the first case it is something like (not tested, and better use
compiled Pattern):

String replaced = original.replaceAll(^(.*?])(.*), $1+theComment + $2);

Once again I agree that having the two additional methods in
Behavior.java will simplify these use cases.

On Tue, Oct 23, 2012 at 11:55 AM, Decebal Suiu decebal.s...@asf.ro wrote:
 AbstractTransformerBehavior can be a solution but I must parse the output to
 retrieve the component tag body. For a particular situation (Jesse Long
 situation) to parse the output it's not a big deal but in my situation
 (something general for all my markup containers) I don't see a solution.
 Maybe I suppose that all my container markups are divs (div .../div). Is
 it an util class in wicket that can help me with the parsing operation? I
 want to retrieve the component tag body only.

 Best regards,
 Decebal



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653252.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: How to set content of an ajax enabled link?

2012-10-23 Thread cosmindumy
Hi,
How can I set the text inside a ajaxlink. I use a table and on populateItem
on AbstractColumn I add a link. 
I don't want to use another component with onclick ajax behavior.I also
cannot add a child to ajaxlink. I do not have control on it on html. Here is
the code. 

public void populateItem(final ItemICellPopulatorlt;UserDetailsVO item,
final String componentId, final IModelUserDetailsVO rowModel)
{
item.add(new AjaxLink { ... });
}

Thanks. 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-set-content-of-an-ajax-enabled-link-tp1882634p4653254.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: How to set content of an ajax enabled link?

2012-10-23 Thread Martin Grigorov
See AbstractLink#setBody(IModelString)

On Tue, Oct 23, 2012 at 12:16 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 How can I set the text inside a ajaxlink. I use a table and on populateItem
 on AbstractColumn I add a link.
 I don't want to use another component with onclick ajax behavior.I also
 cannot add a child to ajaxlink. I do not have control on it on html. Here is
 the code.

 public void populateItem(final ItemICellPopulatorUserDetailsVO item,
 final String componentId, final IModelUserDetailsVO rowModel)
 {
 item.add(new AjaxLink { ... });
 }

 Thanks.




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-content-of-an-ajax-enabled-link-tp1882634p4653254.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Using PageReference for a 'back' link

2012-10-23 Thread Martijn Dashorst
Think for a moment about what you are asking: a bookmarkable page link
with a session relative component. Bookmarkable page link's URLs are
*bookmarkable*. They can be stored in favorites, and opened two
seconds, two weeks or two years from now.

What does the page ID point to in 2 weeks? Or 2 years from now?
Bookmarkable links and session relative stuff don't mix.

So instead of encoding such in the URL, why not let your base page (or
something similar) query the page store for a page of a certain type,
and get a page reference to that.

Martijn


 Mon, Oct 22, 2012 at 6:03 PM, Leonardo D'Alimonte
leonardo.dalimo...@loginet.it wrote:
 Hi,

 I'm working on the migration of our project from Wicket 1.4 to Wicket 1.5
 and I'm trying to fix support of a 'back' link, that before was implemented
 using PageMap and now.well, PageMap are gone!

 I read on different forums that PageReference could be an answer to my
 problem by calling inside onClick method
 setResponsePage(pageReference.getPage())but I cannot still understand
 how I can pass a PageReference to a BookmarkablePageLink.

 Is there a quick way to build a 'back' link with Wicket 1.5?

 Thanks in advance for your answer!

 Leonardo



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212.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




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: Using PageReference for a 'back' link

2012-10-23 Thread Dirk Forchel
Sorry, I did not read your question carefully. Yes my suggestion does not
work with BookmarkablePageLinks.
But Martin has given you already the right solution.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212p4653257.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: Using PageReference for a 'back' link

2012-10-23 Thread Martin Grigorov
On Tue, Oct 23, 2012 at 12:40 PM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:

 Think for a moment about what you are asking: a bookmarkable page link
 with a session relative component. Bookmarkable page link's URLs are
 *bookmarkable*. They can be stored in favorites, and opened two
 seconds, two weeks or two years from now.

 What does the page ID point to in 2 weeks? Or 2 years from now?
 Bookmarkable links and session relative stuff don't mix.

 So instead of encoding such in the URL, why not let your base page (or
 something similar) query the page store for a page of a certain type,
 and get a page reference to that.

Unfortunately the world is not perfect ..

Using BookmarkablePageLink or just Link is the same if the target page
is stateful, i.e. has the pageId parameter in the produced url.
The benefit is that BPL does one http redirect less then when using Link.

Bookmarking the target page doesn't know anything about the current
session/state by itself.
The only problem is when you bookmark a url like:
.../wicket/page?pageId  This may or may not be resolved to a page
if requested after 2 years. The real problem is if it is resolved then
most probably it is not the right page.
If the url is .../my/mount/path?pageId... then you will go to the
wanted page, just in its initial state.


 Martijn


  Mon, Oct 22, 2012 at 6:03 PM, Leonardo D'Alimonte
 leonardo.dalimo...@loginet.it wrote:
 Hi,

 I'm working on the migration of our project from Wicket 1.4 to Wicket 1.5
 and I'm trying to fix support of a 'back' link, that before was implemented
 using PageMap and now.well, PageMap are gone!

 I read on different forums that PageReference could be an answer to my
 problem by calling inside onClick method
 setResponsePage(pageReference.getPage())but I cannot still understand
 how I can pass a PageReference to a BookmarkablePageLink.

 Is there a quick way to build a 'back' link with Wicket 1.5?

 Thanks in advance for your answer!

 Leonardo



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212.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




 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com

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




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

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



Re: How to set content of an ajax enabled link?

2012-10-23 Thread Martin Grigorov
Use your own Link/AjaxLink and add the logic.
See the code in Wicket 1.5 for inspiration.

On Tue, Oct 23, 2012 at 12:48 PM, cosmindumy cosmind...@yahoo.com wrote:
 We are using Wicket 1.4.18.
 There is no setBody method on abstract link.
 Is there any possiblity?
 Thanks.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-content-of-an-ajax-enabled-link-tp1882634p4653258.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Jesse Long

This was my solution, works for me:

public abstract class AbstractBodyTransformerBehavior
extends AbstractTransformerBehavior
{
protected abstract CharSequence transformBody(Component component, 
CharSequence body) throws Exception;


private static int indexOfCharacterInSequence(CharSequence 
haystack, char needle)

{
int max = haystack.length();

for (int i = 0; i  max; i++){
if (haystack.charAt(i) == needle){
return i;
}
}

return -1;
}

private static int lastIndexOfCharacterInSequence(CharSequence 
haystack, char needle)

{
int max = haystack.length();

for (int i = (max - 1); i = 0; i--){
if (haystack.charAt(i) == needle){
return i;
}
}

return -1;
}

@Override
public CharSequence transform(Component component, CharSequence 
output) throws Exception

{
int bodyStart = indexOfCharacterInSequence(output, '') + 1;

int bodyEnd = lastIndexOfCharacterInSequence(output, '');

if (bodyStart  1 || bodyEnd  0){
throw new WicketRuntimeException(Unable to find body for 
component:  + output);

}

StringBuilder sb = new StringBuilder(output.length());

sb.append(output.subSequence(0, bodyStart));

sb.append(transformBody(component, 
output.subSequence(bodyStart, bodyEnd)));


sb.append(output.subSequence(bodyEnd, output.length()));

return sb;
}
}


On 23/10/2012 11:04, Martin Grigorov wrote:

You just need to put something after the first closing tag and before
the last opening one.

For the first case it is something like (not tested, and better use
compiled Pattern):

String replaced = original.replaceAll(^(.*?])(.*), $1+theComment + $2);

Once again I agree that having the two additional methods in
Behavior.java will simplify these use cases.

On Tue, Oct 23, 2012 at 11:55 AM, Decebal Suiu decebal.s...@asf.ro wrote:

AbstractTransformerBehavior can be a solution but I must parse the output to
retrieve the component tag body. For a particular situation (Jesse Long
situation) to parse the output it's not a big deal but in my situation
(something general for all my markup containers) I don't see a solution.
Maybe I suppose that all my container markups are divs (div .../div). Is
it an util class in wicket that can help me with the parsing operation? I
want to retrieve the component tag body only.

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653252.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: something similar with setOutputMarkupContainerClassName

2012-10-23 Thread Decebal Suiu
And this is my implementation:

private class DesignModeBehavior extends AbstractTransformerBehavior {

private static final long serialVersionUID = 1L;

@Override
public CharSequence transform(Component component, CharSequence 
output)
throws Exception {  
String className = 
component.getMetaData(CLASS_NAME_KEY);

StringBuilder pre = new StringBuilder();
pre.append(!- quot;);
pre.append(className);
pre.append(quot; BEGINquot;);
pre.append(quot; -\n);

StringBuilder post = new StringBuilder();
post.append(!- quot;);
post.append(className);
post.append(quot; ENDquot;);
post.append(quot; -\n);

StringBuilder tmp = new StringBuilder(output);
int i1 = tmp.indexOf();
int i2 = tmp.lastIndexOf();
tmp.insert(i2, post.toString());
tmp.insert(i1 + 1, pre.toString());

return tmp;
}

}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653263.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



wicket-bootstrap navbar - SEARCH button

2012-10-23 Thread Ronny.Voss
Hi There

Any with a quick answer on how to implement a search like in:
http://wb.agilecoders.de/demo/components?1#navbar

Ending up in some markup like: form class=navbar-search

Thx in advance.

Best regards/Med venlig hilsen
Ronny Voss

Nordea Bank Danmark A/S
Online  Securities Processing Solutions
Strandgade 3
DK-1401 København K
Mobile: +45 26711952
E-mail: ronny.v...@consult.nordea.commailto:ronny.v...@consult.nordea.com



Why is it forbidden to overwrite getString method in the Component class ?

2012-10-23 Thread seba.wag...@gmail.com
Hi,

I am wondering why it is forbidden to overwrite

public final String getString(final String key)

in org.apache.wicket.Component ?

What is the reason of forbidding anybody to use his custom resource loading
mechanism ?

Thanks!
Sebastian
-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wag...@gmail.com


Re: Why is it forbidden to overwrite getString method in the Component class ?

2012-10-23 Thread Martin Grigorov
Hi,

You can always use #getMyString() for custom loading.

Or you may just need to add an additional/custom IStringResourceLoader
instead of overriding #getString().

On Tue, Oct 23, 2012 at 3:56 PM, seba.wag...@gmail.com
seba.wag...@gmail.com wrote:
 Hi,

 I am wondering why it is forbidden to overwrite

 public final String getString(final String key)

 in org.apache.wicket.Component ?

 What is the reason of forbidding anybody to use his custom resource loading
 mechanism ?

 Thanks!
 Sebastian
 --
 Sebastian Wagner
 https://twitter.com/#!/dead_lock
 http://www.webbase-design.de
 http://www.wagner-sebastian.com
 seba.wag...@gmail.com



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



How to mount RenderedDynamicImageResource in Wicket 6?

2012-10-23 Thread Arne
In Wicket 1.5.x I used to mount a RenderedDynamicImageResource like this in my
Application:

mountResource(REF, new PackageResourceReference(REF) {  
@Override
public IResource getResource() {
return new MyImageResource();
}
});

In Wicket 6 PackageResourceReference#getResource() returns PackageResource
instead of IResource, of which RenderedDynamicImageResource is not a subclass
(RenderedDynamicImageResource  DynamicImageResource  IResource).

How is the mounting of a RenderedDynamicImageResource as a
PackageResourceReference supposed to work now?


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



Re: How to mount RenderedDynamicImageResource in Wicket 6?

2012-10-23 Thread Martin Grigorov
Hi,

No need to use PackageResRef.
Just use ResourceReference.

On Tue, Oct 23, 2012 at 5:21 PM, Arne arne-wigand.bag...@idealo.de wrote:
 In Wicket 1.5.x I used to mount a RenderedDynamicImageResource like this in my
 Application:

 mountResource(REF, new PackageResourceReference(REF) {
 @Override
 public IResource getResource() {
 return new MyImageResource();
 }
 });

 In Wicket 6 PackageResourceReference#getResource() returns PackageResource
 instead of IResource, of which RenderedDynamicImageResource is not a subclass
 (RenderedDynamicImageResource  DynamicImageResource  IResource).

 How is the mounting of a RenderedDynamicImageResource as a
 PackageResourceReference supposed to work now?


 -
 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: How to mount RenderedDynamicImageResource in Wicket 6?

2012-10-23 Thread Arne
Martin Grigorov mgrigorov at apache.org writes:

 
 Hi,
 
 No need to use PackageResRef.
 Just use ResourceReference.

Thank you, Martin, that worked.

Arne


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



Has DropDownChoice changed?

2012-10-23 Thread N. Metzger
I recently upgraded from 1.5.5 to 1.5.8, and I do have a DropDownChoice with
settings

dropDownChoice.setNullValid(false);
dropDownChoice.setRequired(true);
dropDownChoice.setOutputMarkupId(true);

It used to be that on the first load of the page Choose One was displayed
as the first option, which vanished after choosing one of the non-null
options. This is exactly what I wanted. Now under 1.5.8 the Choose one is
gone, and it displays the first choice. I have an Ajax update on the choice
change that displays a different expiration date for every choice. Now of
course the first choice doesn't show an expiration date as the Ajax on
update wasn't called yet. And if a user has only one option to choose from,
the expiration date never gets displayed. Could someone look into this?

Also, unrelated to this topic, did the wizard change? My next button used to
display Next , now it displays Next gt; which is annoying. I changed
the display to Next in my properties file, but I have to admit I liked the
Next  and would like to have it back. (Same with Previous.)

Thanks for your help,
Natalie



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Has-DropDownChoice-changed-tp4653271.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



Selected item into Palette

2012-10-23 Thread Marco Di Sabatino Di Diodoro
Hi all,

With Apache Wicket 6.1. 
How can I get hold of a palette's selected item?

Marco
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Has DropDownChoice changed?

2012-10-23 Thread Sven Meier

Has DropDownChoice changed?

There were some fixes for Wizard and input buttons in 1.5.x.

Next  displays fine in wicket-examples though.

Please create a quickstart and attach it to a Jira issue.

Sven


On 10/23/2012 04:49 PM, N. Metzger wrote:

I recently upgraded from 1.5.5 to 1.5.8, and I do have a DropDownChoice with
settings

dropDownChoice.setNullValid(false);
dropDownChoice.setRequired(true);
dropDownChoice.setOutputMarkupId(true);

It used to be that on the first load of the page Choose One was displayed
as the first option, which vanished after choosing one of the non-null
options. This is exactly what I wanted. Now under 1.5.8 the Choose one is
gone, and it displays the first choice. I have an Ajax update on the choice
change that displays a different expiration date for every choice. Now of
course the first choice doesn't show an expiration date as the Ajax on
update wasn't called yet. And if a user has only one option to choose from,
the expiration date never gets displayed. Could someone look into this?

Also, unrelated to this topic, did the wizard change? My next button used to
display Next , now it displays Next gt; which is annoying. I changed
the display to Next in my properties file, but I have to admit I liked the
Next  and would like to have it back. (Same with Previous.)

Thanks for your help,
Natalie



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Has-DropDownChoice-changed-tp4653271.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: Selected item into Palette

2012-10-23 Thread Sven Meier

selectedItems = (ListFoo)palette.getDefaultModelObject()

or

palette = new Palette(palette, model, choices, ...);
selectedItems = model.getObject();

Sven

On 10/23/2012 05:01 PM, Marco Di Sabatino Di Diodoro wrote:

Hi all,

With Apache Wicket 6.1.
How can I get hold of a palette's selected item?

Marco
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino








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



Ajax file manager 'CKFinder' and Wicket = 1.5.8

2012-10-23 Thread Steamus
Hello, Everybody

In my project I use JavaScript editor ‘CKEditor’ with Ajax file manager
‘CKFinder’. It worked fine a lot of months. But,  
just I migrated to version Wicket 1.5.8, the ‘CKFinder’ doesn’t work
properly any more. There are no visible crashes or bugs, but It can’t upload
file to server now. Looks like there were some little changes in the Wicket
Ajax mechanic. If I switch to Wicket 1.5.7 it work fine as before. I was
trying to migrate to Wicket 1.6.1. Project works fine, but ‘CKFinder’
doesn’t work (the same as for 1.5.8).

May be anybody has some idea what was changing in the 1.5.8 concerning Ajax
or server response or…?

I tested under Tomcat  6.0.35

Thanx in advance.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-file-manager-CKFinder-and-Wicket-1-5-8-tp4653275.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: Selected item into Palette

2012-10-23 Thread Marco Di Sabatino Di Diodoro
Thanks,

but i like have the current selected item in the palette. With Apache Wicket 
1.5.8 I use AjaxFormComponentUpdatingBehavior to see which item was selected.
Now, when I click on an item into palette the onUpdate method is never invoked.

Marco


On Oct 23, 2012, at 5:31 PM, Sven Meier wrote:

 selectedItems = (ListFoo)palette.getDefaultModelObject()
 
 or
 
 palette = new Palette(palette, model, choices, ...);
 selectedItems = model.getObject();
 
 Sven
 
 On 10/23/2012 05:01 PM, Marco Di Sabatino Di Diodoro wrote:
 Hi all,
 
 With Apache Wicket 6.1.
 How can I get hold of a palette's selected item?
 
 Marco
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570
 
 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net
 
 Apache Syncope PPMC Member
 http://people.apache.org/~mdisabatino
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino






Re: Selected item into Palette

2012-10-23 Thread Sven Meier
I'm not sure how you're using AjaxFormComponentUpdatingBehavior together 
with the palette component.


Please create a quickstart and attach it to a Jira issue.

Sven


On 10/23/2012 05:42 PM, Marco Di Sabatino Di Diodoro wrote:

Thanks,

but i like have the current selected item in the palette. With Apache Wicket 
1.5.8 I use AjaxFormComponentUpdatingBehavior to see which item was selected.
Now, when I click on an item into palette the onUpdate method is never invoked.

Marco


On Oct 23, 2012, at 5:31 PM, Sven Meier wrote:


selectedItems = (ListFoo)palette.getDefaultModelObject()

or

palette = new Palette(palette, model, choices, ...);
selectedItems = model.getObject();

Sven

On 10/23/2012 05:01 PM, Marco Di Sabatino Di Diodoro wrote:

Hi all,

With Apache Wicket 6.1.
How can I get hold of a palette's selected item?

Marco
--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino







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


--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PPMC Member
http://people.apache.org/~mdisabatino








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



Re: Why is it forbidden to overwrite getString method in the Component class ?

2012-10-23 Thread seba.wag...@gmail.com
Thanks Martin,

using IStringResourceLoader solved my issue.

However I did not understand what you meant with #getMyString()
I did not find any method #getMyString() that I could overwrite, also
Google gave me no pointers where this function is hidden.
Did you meant to overwrite the getString method in the Localizer?

Thanks!
Sebastian

2012/10/23 Martin Grigorov mgrigo...@apache.org

 Hi,

 You can always use #getMyString() for custom loading.

 Or you may just need to add an additional/custom IStringResourceLoader
 instead of overriding #getString().

 On Tue, Oct 23, 2012 at 3:56 PM, seba.wag...@gmail.com
 seba.wag...@gmail.com wrote:
  Hi,
 
  I am wondering why it is forbidden to overwrite
 
  public final String getString(final String key)
 
  in org.apache.wicket.Component ?
 
  What is the reason of forbidding anybody to use his custom resource
 loading
  mechanism ?
 
  Thanks!
  Sebastian
  --
  Sebastian Wagner
  https://twitter.com/#!/dead_lock
  http://www.webbase-design.de
  http://www.wagner-sebastian.com
  seba.wag...@gmail.com



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




-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wag...@gmail.com


HybridPageParamter encoder

2012-10-23 Thread vinitty
Hi 
I am using wicket 1.5.7 and i want my url to be formed as 

/mf/landing/param1/value1/param2/value2

and if i am hitting /mf/landing/?param1=value1param2=value2  then
it should also work and url in the browser should remain same.

Which is not happening when i am using HybridPageParamterEncoder , it is
redirecting again by changing the format 

Please help me 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HybridPageParamter-encoder-tp4653279.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: Custom CSS for Feedback message is broken in 1.5

2012-10-23 Thread Alec Swan
Technically it should be getListItemCSS, not getListCSS. Or maybe have
all three getListCSS, getListItemCSS and getLabelCSS

On Mon, Oct 22, 2012 at 12:46 PM, Sebastien seb...@gmail.com wrote:
 Done, https://issues.apache.org/jira/browse/WICKET-4831
 Please let me know if your encounter any issue (wrong base code for
 instance) or if you have any questions...

 Thanks,
 Sebastien.

 On Mon, Oct 22, 2012 at 8:06 PM, Sven Meier s...@meiers.net wrote:

 Please open a Jira issue and provide a patch as you suggested.

 Thanks
 Sven



 On 10/21/2012 01:06 AM, Sebastien wrote:

 Sven,

 If you agree to have two methods: getListCSSClass and getLabelCSSClass
 (which apply respectively on li and span), and mark getCSSClass as
 deprecated (until marked as private), then the path is ready for branch
 wicket-1.5.x. I am waiting for your go-ahead to send the patch somewhere
 or
 submit the pull request on github.

 If you do not agree, please tell me what I can do.

 Thanks  best regards,
 Sebastien.



 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-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: Apache Wicket 6.2.0 released!

2012-10-23 Thread vineet semwal
how come i don't see any tag related to 6.2.0 ?

On Wed, Oct 24, 2012 at 1:24 AM, Martijn Dashorst
martijn.dasho...@gmail.com wrote:
 The Apache Wicket PMC is proud to announce Apache Wicket 6.2.0!

 This release marks the second minor release of Wicket 6. Starting
 with Wicket 6 we use semantic versioning for the future development of
 Wicket, and as such no API breaks are present in this release compared
 to 6.0.0.

 New and noteworthy
 --

 SerializableChecker has been made easier to extend. It is now much easier
 to add your own checks at serialization time. For example, check whether your
 LoadableDetachableModels are detached, or no Hibernate entities are referenced
 directly from your component tree, etc.

 For the full changelog see the release notes attached to the end of
 this announcement.

 Using this release
 --

 With Apache Maven update your dependency to (and don't forget to
 update any other dependencies on Wicket projects to the same version):

 dependency
 groupIdorg.apache.wicket/groupId
 artifactIdwicket-core/artifactId
 version6.2.0/version
 /dependency

 Or download and build the distribution yourself, or use our
 convenience binary package

  * http://www.apache.org/dyn/closer.cgi/wicket/6.2.0
  * http://www.apache.org/dyn/closer.cgi/wicket/6.2.0/binaries

 Upgrading from earlier versions
 ---

 If you upgrade from 6.0.0, this release is a drop in replacement. If
 you come from a version prior to 6.0.0, please read our Wicket 6
 migration guide found at http://s.apache.org/wicket-6.0-migration

 Have fun!

 — The Wicket team

 Release Notes - Wicket - Version 6.2.0

 ** Sub-task
 * [WICKET-4752] - Revert Wicket-4715 -Read multipart request
 params in WebApplication

 ** Bug
 * [WICKET-4587] - URLRenderer renderFullUrl
 * [WICKET-4589] - Closing /wicket:container tag is incorrectly
 setup as autocomponent
 * [WICKET-4756] - AtmosphereWebRequest should return true on calls
 to #isAjax()
 * [WICKET-4759] - FilterForm/FilterToolbar don't work when there's
 more than one IColumn to be filtered
 * [WICKET-4769] - Clicking on Label of Radio doesn't update
 component with Ajax update
 * [WICKET-4771] - Submitting value filled in DropDownChoice fails
 when tinymce textarea is on the page
 * [WICKET-4776] - Problems with switching between HTTP/HTTPS
 * [WICKET-4777] - JavaScriptReference escapes given URL
 * [WICKET-4786] - AjaxTabbedPanel doesn't include constructor with model
 * [WICKET-4787] - Registering resource bundles with duplicate
 resource references gives an NPE
 * [WICKET-4788] - FilteringHeaderResponse does not unwrap
 PriorityHeaderItems for filtering
 * [WICKET-4789] - URL rendering regression
 * [WICKET-4791] - UploadProgressBar hides immediately after being shown.
 * [WICKET-4792] - wickettester#startcomponent(component) doesn't
 call oninitialize
 * [WICKET-4794] - RfcCompliantEmailAddressValidator error message
 not defined
 * [WICKET-4796] - DatePickerTest fails because of java
 inconsistensy on localizing March german shortname Mrz vs Mär
 * [WICKET-4797] - CheckBoxMultipleChoice loses state
 * [WICKET-4801] - BaseWicketTester.executeAjaxEvent only fires one
 of multiple behaviors bound to a given event
 * [WICKET-4806] - AjaxEditableChoiceLabel won't close select onblur
 * [WICKET-4810] - CLONE - BaseWicketTester.clickLink() does not
 work with a ResourceLink with ResourceReference
 * [WICKET-4816] - Handling of semicolons in form action URLs
 * [WICKET-4818] - NullPointerException while reading the POST parameters
 * [WICKET-4820] - Race condition in ResourceSettings:
 getResourceWatcher() is not thread safe
 * [WICKET-4822] - Wicket.Event.add requires Wicket.$, but
 wicket-ajax-jquery is not listed as a dependency
 * [WICKET-4824] - Redirect to HTTPS is using wrong port 80 if
 HttpsConfig with default ports 80/443 is used

 ** Improvement
 * [WICKET-4160] - Make AbstractAutoCompleteRenderer.renderHeader()
 and .renderFooter() non-final
 * [WICKET-4772] - DataTable API and handling of AbstractToolbar
 * [WICKET-4778] - Add factory methods to JavaScriptHeaderItem to
 create a deferred JavaScript header item.
 * [WICKET-4798] - Make IteratorFilter.onFilter protected
 * [WICKET-4804] - Add #setStatus(int) in AbstractResource.ResourceResponse
 * [WICKET-4808] - WebClientInfo.getRemoteAddr() handling
 Forwarded-For value tokens not being ip addresses
 * [WICKET-4812] - Make SerializationChecker easier for extending
 so custom checks can be added to it

 ** New Feature
 * [WICKET-4793] - Support Jetty 9.x websocket implementation
 * [WICKET-4802] - Add functionality to be able to export DataTable content
 * [WICKET-4815] - Interface to mark components with type safe models

 -
 To unsubscribe, 

Re: Custom CSS for Feedback message is broken in 1.5

2012-10-23 Thread Sebastien
Alec, you are right, I did thought about that.

My reflection was that getListCSS applies to list *element* (li) and it is
quite easy to understand that getLabelCSS (which applies to the label)
stands for the message itself (which is a span element).

But in another hand we can imagine that these naming are related to wicket
*component* instead; so, it is true that it would technically best to have
getListItemCSS (applies to ListItem) and getLabelCSS (applies to Label).
But what if the user overrides #newMessageDisplayComponent and return
something other than a Label? A Panel for instance? Maybe getLabelCSS
appears to not be logical anymore in this context: we have a getListItemCSS
which still applies to a ListItem and a getLabelCSS which applies to... a
Panel.

In another hand (again), we can also imagine that the HTML markup is
getting overridden (while extending FeedbackPanel), li and span elements
may have been replaced by other elements (2 divs for instance)... So
getListCSS may also not be logical in this context, and would have better
been getContainerCSS or something like that...

Not easy to find right naming; its a kind of Ouroboros* ** discussion in
this case...
But at the end, will the user better understand getListCSS or
getListItemCSS? Also, is getLabelCSS the best? What about getMessageCSS?

That's all open questions... I wish you a good night with that! ;)
Sebastien

* http://en.wikipedia.org/wiki/Ouroboros
** I am pretty sure this term has previously been used in this mailing list
but I don't remember who... So there is a credit for someone somewhere :)


On Tue, Oct 23, 2012 at 9:15 PM, Alec Swan alecs...@gmail.com wrote:

 Technically it should be getListItemCSS, not getListCSS. Or maybe have
 all three getListCSS, getListItemCSS and getLabelCSS

 On Mon, Oct 22, 2012 at 12:46 PM, Sebastien seb...@gmail.com wrote:
  Done, https://issues.apache.org/jira/browse/WICKET-4831
  Please let me know if your encounter any issue (wrong base code for
  instance) or if you have any questions...
 
  Thanks,
  Sebastien.
 
  On Mon, Oct 22, 2012 at 8:06 PM, Sven Meier s...@meiers.net wrote:
 
  Please open a Jira issue and provide a patch as you suggested.
 
  Thanks
  Sven
 
 
 
  On 10/21/2012 01:06 AM, Sebastien wrote:
 
  Sven,
 
  If you agree to have two methods: getListCSSClass and getLabelCSSClass
  (which apply respectively on li and span), and mark getCSSClass as
  deprecated (until marked as private), then the path is ready for branch
  wicket-1.5.x. I am waiting for your go-ahead to send the patch
 somewhere
  or
  submit the pull request on github.
 
  If you do not agree, please tell me what I can do.
 
  Thanks  best regards,
  Sebastien.
 
 
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 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: Custom CSS for Feedback message is broken in 1.5

2012-10-23 Thread Alec Swan
Sebastien, List, ListItem and Label make sense to me and match the
terms used in FeedbackPanel class. However, I try not to get too hung
up on naming for the sake of making progress :)

On Tue, Oct 23, 2012 at 3:39 PM, Sebastien seb...@gmail.com wrote:
 Alec, you are right, I did thought about that.

 My reflection was that getListCSS applies to list *element* (li) and it is
 quite easy to understand that getLabelCSS (which applies to the label)
 stands for the message itself (which is a span element).

 But in another hand we can imagine that these naming are related to wicket
 *component* instead; so, it is true that it would technically best to have
 getListItemCSS (applies to ListItem) and getLabelCSS (applies to Label).
 But what if the user overrides #newMessageDisplayComponent and return
 something other than a Label? A Panel for instance? Maybe getLabelCSS
 appears to not be logical anymore in this context: we have a getListItemCSS
 which still applies to a ListItem and a getLabelCSS which applies to... a
 Panel.

 In another hand (again), we can also imagine that the HTML markup is
 getting overridden (while extending FeedbackPanel), li and span elements
 may have been replaced by other elements (2 divs for instance)... So
 getListCSS may also not be logical in this context, and would have better
 been getContainerCSS or something like that...

 Not easy to find right naming; its a kind of Ouroboros* ** discussion in
 this case...
 But at the end, will the user better understand getListCSS or
 getListItemCSS? Also, is getLabelCSS the best? What about getMessageCSS?

 That's all open questions... I wish you a good night with that! ;)
 Sebastien

 * http://en.wikipedia.org/wiki/Ouroboros
 ** I am pretty sure this term has previously been used in this mailing list
 but I don't remember who... So there is a credit for someone somewhere :)


 On Tue, Oct 23, 2012 at 9:15 PM, Alec Swan alecs...@gmail.com wrote:

 Technically it should be getListItemCSS, not getListCSS. Or maybe have
 all three getListCSS, getListItemCSS and getLabelCSS

 On Mon, Oct 22, 2012 at 12:46 PM, Sebastien seb...@gmail.com wrote:
  Done, https://issues.apache.org/jira/browse/WICKET-4831
  Please let me know if your encounter any issue (wrong base code for
  instance) or if you have any questions...
 
  Thanks,
  Sebastien.
 
  On Mon, Oct 22, 2012 at 8:06 PM, Sven Meier s...@meiers.net wrote:
 
  Please open a Jira issue and provide a patch as you suggested.
 
  Thanks
  Sven
 
 
 
  On 10/21/2012 01:06 AM, Sebastien wrote:
 
  Sven,
 
  If you agree to have two methods: getListCSSClass and getLabelCSSClass
  (which apply respectively on li and span), and mark getCSSClass as
  deprecated (until marked as private), then the path is ready for branch
  wicket-1.5.x. I am waiting for your go-ahead to send the patch
 somewhere
  or
  submit the pull request on github.
 
  If you do not agree, please tell me what I can do.
 
  Thanks  best regards,
  Sebastien.
 
 
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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



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



RE: Custom CSS for Feedback message is broken in 1.5

2012-10-23 Thread Paul Bors
There is nothing stopping you from extending from the FeedBackPanel and
override the HTML the Wicket component is using.

This is how we did it.

The HTML:
html xmlns:wicket=http://wicket.apache.org;
wicket:panel
div wicket:id=feedbackul class=feedbackMessages
div wicket:id=messages
span wicket:id=message[Feedback message(s)]/span
/div
/div
/wicket:panel
/html

And the Java:
import org.apache.wicket.feedback.IFeedbackMessageFilter;
import org.apache.wicket.markup.html.panel.FeedbackPanel;

public class MyFeedbackPanel extends FeedbackPanel {
private static final long serialVersionUID = 1L;

public MyFeedbackPanel (String id) {
this(id, null);
}

public MyFeedbackPanel (String id, IFeedbackMessageFilter filter) {
super(id, filter);
setOutputMarkupId(true);
}
}

Our application wide CSS:

/* FEEDBACK MESSAGES */

.feedbackMessages {
padding-left: 0;
padding-top: 0;
text-align: left;
margin-left: 0;
margin-top: 0;
padding-bottom: 1em;
}

.feedbackMessages div {
padding: 0.5em;
font-size: xx-small;
border: none;
}

.feedbackMessages div.feedbackPanelERROR {
background-color: lightsalmon;
border: 1px solid darkred;
}

.feedbackMessages div.feedbackPanelWARNING {
background-color: #FFB90F;
border: 1px solid darkgoldenrod;
}

.feedbackMessages div.feedbackPanelINFO {
background-color: lightgreen;
border: 1px solid darkgreen;
}

This code was written for Wicket 1.3.x and migrated to 1.5.x w/o any changes
(we're not yet up to 6.x).

~ Thank you,
  Paul Bors

-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com] 
Sent: Tuesday, October 23, 2012 6:08 PM
To: users@wicket.apache.org
Subject: Re: Custom CSS for Feedback message is broken in 1.5

Sebastien, List, ListItem and Label make sense to me and match the terms
used in FeedbackPanel class. However, I try not to get too hung up on naming
for the sake of making progress :)

On Tue, Oct 23, 2012 at 3:39 PM, Sebastien seb...@gmail.com wrote:
 Alec, you are right, I did thought about that.

 My reflection was that getListCSS applies to list *element* (li) and 
 it is quite easy to understand that getLabelCSS (which applies to the 
 label) stands for the message itself (which is a span element).

 But in another hand we can imagine that these naming are related to 
 wicket
 *component* instead; so, it is true that it would technically best to 
 have getListItemCSS (applies to ListItem) and getLabelCSS (applies to
Label).
 But what if the user overrides #newMessageDisplayComponent and return 
 something other than a Label? A Panel for instance? Maybe getLabelCSS 
 appears to not be logical anymore in this context: we have a 
 getListItemCSS which still applies to a ListItem and a getLabelCSS 
 which applies to... a Panel.

 In another hand (again), we can also imagine that the HTML markup is 
 getting overridden (while extending FeedbackPanel), li and span 
 elements may have been replaced by other elements (2 divs for 
 instance)... So getListCSS may also not be logical in this context, 
 and would have better been getContainerCSS or something like that...

 Not easy to find right naming; its a kind of Ouroboros* ** discussion 
 in this case...
 But at the end, will the user better understand getListCSS or 
 getListItemCSS? Also, is getLabelCSS the best? What about getMessageCSS?

 That's all open questions... I wish you a good night with that! ;) 
 Sebastien

 * http://en.wikipedia.org/wiki/Ouroboros
 ** I am pretty sure this term has previously been used in this mailing 
 list but I don't remember who... So there is a credit for someone 
 somewhere :)


 On Tue, Oct 23, 2012 at 9:15 PM, Alec Swan alecs...@gmail.com wrote:

 Technically it should be getListItemCSS, not getListCSS. Or maybe 
 have all three getListCSS, getListItemCSS and getLabelCSS

 On Mon, Oct 22, 2012 at 12:46 PM, Sebastien seb...@gmail.com wrote:
  Done, https://issues.apache.org/jira/browse/WICKET-4831
  Please let me know if your encounter any issue (wrong base code for
  instance) or if you have any questions...
 
  Thanks,
  Sebastien.
 
  On Mon, Oct 22, 2012 at 8:06 PM, Sven Meier s...@meiers.net wrote:
 
  Please open a Jira issue and provide a patch as you suggested.
 
  Thanks
  Sven
 
 
 
  On 10/21/2012 01:06 AM, Sebastien wrote:
 
  Sven,
 
  If you agree to have two methods: getListCSSClass and 
  getLabelCSSClass (which apply respectively on li and span), and 
  mark getCSSClass as deprecated (until marked as private), then 
  the path is ready for branch wicket-1.5.x. I am waiting for your 
  go-ahead to send the patch
 somewhere
  or
  submit the pull request on github.
 
  If you do not agree, please tell me what I can do.
 
  Thanks  best regards,
  Sebastien.
 
 
 
 
 --**--**-
 
  To unsubscribe, e-mail: