Re: Exceptional upgrade experience 6.14.0 - 6.17.0

2014-10-17 Thread Martin Grigorov
I don't believe you !
Especially with OSGi involved !
:)

I hope the experience will be similar when upgrading to Wicket 7.x
following our most detailed to date migration guide
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
.

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

On Fri, Oct 17, 2014 at 1:26 AM, Matt Pavlovich mattr...@gmail.com wrote:

 Hi all-

 I wanted to take a minute to thank all the Wicket Project contributors—
 committers, users and the community as whole. We just completed a seamless
 upgrade from 6.14.0 to 6.17.0 and had to make *zero* code changes.  This is
 extremely impressive for any software project, and especially notable due
 to the fact that we use all sorts of complex Wicket features, extend
 components, and implement custom extensions in our Integrated Console
 product.

 Our Wicket feature list includes, but isn’t limited to:
  * Modules
  * Events
  * Modals
  * Ajax everywhere— Input, Fields, Validation
  * Custom Authorization Strategy
  * Sortable Tables
  * Feedback panels
  * Breadcrumb bar
  * Ajax auto-refreshing components
  * .. many more

 AND, we support running in Tomcat and Apache Karaf (OSGi runtime).

 Great work and thank you!

 Matt Pavlovich

 Founding Partner
 Media Driver
 https://mediadriver.com


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




Adding custom string resource bundle

2014-10-17 Thread Maxim Solodovnik
Hello All,

I'm currently migration huge 1.4.x project to 6.17.0 and have question
about custom string bundle

CommonWebApplication.java
CommonWebApplication.xml
CommonWebApplication_de.xml

class CommonWebApplication extends AuthenticatedWebApplication {
@Override
protected void init() {
super.init();
//getResourceSettings().getStringResourceLoaders().add(new
BundleStringResourceLoader(CommonWebApplication.xml));
//getResourceSettings().getStringResourceLoaders().add(new
ClassStringResourceLoader(CommonWebApplication.class));
getResourceSettings().getStringResourceLoaders().add(new
BundleStringResourceLoader(CommonWebApplication.class.getSimpleName()));
}
}

MyApplication.java
MyApplication.xml
MyApplication_de.xml

class MyApplication extends CommonWebApplication {
@Override
protected void init() {
super.init();
}
}

Unfortunately I'm unable to load strings from CommonWebApplication.xml
What am I doing wrong?

-- 
WBR
Maxim aka solomax


Re: Adding custom string resource bundle

2014-10-17 Thread Martin Grigorov
Hi,

Try with properties.xml as extension.

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

On Fri, Oct 17, 2014 at 11:11 AM, Maxim Solodovnik solomax...@gmail.com
wrote:

 Hello All,

 I'm currently migration huge 1.4.x project to 6.17.0 and have question
 about custom string bundle

 CommonWebApplication.java
 CommonWebApplication.xml
 CommonWebApplication_de.xml

 class CommonWebApplication extends AuthenticatedWebApplication {
 @Override
 protected void init() {
 super.init();
 //getResourceSettings().getStringResourceLoaders().add(new
 BundleStringResourceLoader(CommonWebApplication.xml));
 //getResourceSettings().getStringResourceLoaders().add(new
 ClassStringResourceLoader(CommonWebApplication.class));
 getResourceSettings().getStringResourceLoaders().add(new
 BundleStringResourceLoader(CommonWebApplication.class.getSimpleName()));
 }
 }

 MyApplication.java
 MyApplication.xml
 MyApplication_de.xml

 class MyApplication extends CommonWebApplication {
 @Override
 protected void init() {
 super.init();
 }
 }

 Unfortunately I'm unable to load strings from CommonWebApplication.xml
 What am I doing wrong?

 --
 WBR
 Maxim aka solomax



Re: Adding custom string resource bundle

2014-10-17 Thread Maxim Solodovnik
doesn't help :( will try to create quckstart

On 17 October 2014 15:16, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 Try with properties.xml as extension.

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

 On Fri, Oct 17, 2014 at 11:11 AM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Hello All,
 
  I'm currently migration huge 1.4.x project to 6.17.0 and have question
  about custom string bundle
 
  CommonWebApplication.java
  CommonWebApplication.xml
  CommonWebApplication_de.xml
 
  class CommonWebApplication extends AuthenticatedWebApplication {
  @Override
  protected void init() {
  super.init();
  //getResourceSettings().getStringResourceLoaders().add(new
  BundleStringResourceLoader(CommonWebApplication.xml));
  //getResourceSettings().getStringResourceLoaders().add(new
  ClassStringResourceLoader(CommonWebApplication.class));
  getResourceSettings().getStringResourceLoaders().add(new
  BundleStringResourceLoader(CommonWebApplication.class.getSimpleName()));
  }
  }
 
  MyApplication.java
  MyApplication.xml
  MyApplication_de.xml
 
  class MyApplication extends CommonWebApplication {
  @Override
  protected void init() {
  super.init();
  }
  }
 
  Unfortunately I'm unable to load strings from CommonWebApplication.xml
  What am I doing wrong?
 
  --
  WBR
  Maxim aka solomax
 




-- 
WBR
Maxim aka solomax


Re: Adding custom string resource bundle

2014-10-17 Thread Martin Grigorov
On Fri, Oct 17, 2014 at 11:11 AM, Maxim Solodovnik solomax...@gmail.com
wrote:

 Hello All,

 I'm currently migration huge 1.4.x project to 6.17.0 and have question
 about custom string bundle

 CommonWebApplication.java
 CommonWebApplication.xml
 CommonWebApplication_de.xml

 class CommonWebApplication extends AuthenticatedWebApplication {
 @Override
 protected void init() {
 super.init();



 //getResourceSettings().getStringResourceLoaders().add(new
 BundleStringResourceLoader(CommonWebApplication.xml));
 //getResourceSettings().getStringResourceLoaders().add(new
 ClassStringResourceLoader(CommonWebApplication.class));
 getResourceSettings().getStringResourceLoaders().add(new
 BundleStringResourceLoader(CommonWebApplication.class.getSimpleName()));


remove those. Wicket detects a bundle named as the Application class
automatically


 }
 }

 MyApplication.java
 MyApplication.xml
 MyApplication_de.xml

 class MyApplication extends CommonWebApplication {
 @Override
 protected void init() {
 super.init();
 }
 }

 Unfortunately I'm unable to load strings from CommonWebApplication.xml
 What am I doing wrong?

 --
 WBR
 Maxim aka solomax



Re: Adding custom string resource bundle

2014-10-17 Thread Maxim Solodovnik
It helps!
thanks a lot!

On 17 October 2014 15:49, Martin Grigorov mgrigo...@apache.org wrote:

 On Fri, Oct 17, 2014 at 11:11 AM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Hello All,
 
  I'm currently migration huge 1.4.x project to 6.17.0 and have question
  about custom string bundle
 
  CommonWebApplication.java
  CommonWebApplication.xml
  CommonWebApplication_de.xml
 
  class CommonWebApplication extends AuthenticatedWebApplication {
  @Override
  protected void init() {
  super.init();
 


  //getResourceSettings().getStringResourceLoaders().add(new
  BundleStringResourceLoader(CommonWebApplication.xml));
  //getResourceSettings().getStringResourceLoaders().add(new
  ClassStringResourceLoader(CommonWebApplication.class));
  getResourceSettings().getStringResourceLoaders().add(new
  BundleStringResourceLoader(CommonWebApplication.class.getSimpleName()));
 

 remove those. Wicket detects a bundle named as the Application class
 automatically


  }
  }
 
  MyApplication.java
  MyApplication.xml
  MyApplication_de.xml
 
  class MyApplication extends CommonWebApplication {
  @Override
  protected void init() {
  super.init();
  }
  }
 
  Unfortunately I'm unable to load strings from CommonWebApplication.xml
  What am I doing wrong?
 
  --
  WBR
  Maxim aka solomax
 




-- 
WBR
Maxim aka solomax


Wicket Bootstrap 0.9.7 is released

2014-10-17 Thread Martin Grigorov
Hi,

Wicket Bootstrap 0.9.7 has been released and soon will be available at
Maven Central.

New features:
- three state checkbox based on
https://github.com/kartik-v/bootstrap-checkbox-x/
- automatic detection of IE6-8 and contribution of html5shiv.js and
respond.js
- Integration with https://github.com/twbs/bootlint - a linter tool for
Bootstrap based markup

The list of commits is:

Martin Tzvetanov Grigorov (20):
  [maven-release-plugin] prepare for next development iteration
  Update the versions in the README
  [openwebicons] Update OpenWebIcons from master branch
  [coverage] Use coveralls for coverage notifications
  Revert Travis-CI builds fail with BootstrapSettings.Holder cannot be
initialized error
  [affix] Make AffixBehavior lighter by using #onComponentTag() instead
of adding extra behaviors (AttributeModifier)
  [openwebicons] Add minified version of openwebicons-bootstrap.css
  Fixes #444 - Bootstrap ASL2 - MIT
  [datepicker] Add support for 'calendarWeeks' option. Shows the week
number in the lest side
  Issue #444 - better phrasing
  [bootlint] Update BootLint from 0.2.0 to 0.4.0
  [tooltip] Do not render 'title' attribute if there is no value for it
  Fixes #445 - Add integration with
https://github.com/kartik-v/bootstrap-checkbox-x
  Fixes #448 - Contributes IE 6-8 related dependencies (respond.js and
html5shiv.js)
  Issue #445 - Add default and copy constructors
  Issue #445 - Simplify the impl by using non-submitting behavior
(AjaxEventBehavior)
  Issue #445 - Update checkbox-x to 1.2.0 with a fix for
https://github.com/kartik-v/bootstrap-checkbox-x/issues/3
  [less] Make the test Windows line break resilient
  Update the version to 0.9.7
  [maven-release-plugin] prepare release bootstrap-parent-0.9.7

Chris Rebert (1):
  Twitter Bootstrap = Bootstrap


Dependencies:

core maven dependency:

dependency
  groupIdde.agilecoders.wicket/groupId
  artifactIdwicket-bootstrap-core/artifactId
  version0.9.7/version
/dependency

for all extensions:

dependency
  groupIdde.agilecoders.wicket/groupId
  artifactIdwicket-bootstrap-extensions/artifactId
  version0.9.7/version
/dependency

for all themes:

dependency
  groupIdde.agilecoders.wicket/groupId
  artifactIdwicket-bootstrap-themes/artifactId
  version0.9.7/version
/dependency

if you want to use a less compiler:

dependency
  groupIdde.agilecoders.wicket/groupId
  artifactIdwicket-bootstrap-less/artifactId
  version0.9.7/version
/dependency

all samples can be used with this dependency:

dependency
  groupIdde.agilecoders.wicket/groupId
  artifactIdwicket-bootstrap-samples/artifactId
  version0.9.7/version
/dependency


Wicket Bootstrap team!


Re: Is this possible?

2014-10-17 Thread Wayne W
Many thanks - I will have a look.

On Thu, Oct 16, 2014 at 7:21 PM, Zala Pierre GOUPIL goupilpie...@gmail.com
wrote:

 You can try wicket-quickview, which is based on the stuff in the link
 Martin provided. It works pretty well IMHO, and it is Wicket 6.0 compliant:

 https://github.com/vineetsemwal/quickview

 Regards,

 Pierre





 On Thu, Oct 16, 2014 at 6:28 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  I'd recommend you to use JS for something like this.
  See
 
 
 http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
  .
  Additionally I'd recommend to use event delegation, i.e. one change
  listener on the dataview that handles 'change' for all items.
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Thu, Oct 16, 2014 at 7:09 PM, Wayne W waynemailingli...@gmail.com
  wrote:
 
   We have a page that has a rather big DataView list. We need to be able
 to
   make insertions and removals of this list without sending back the
 whole
   list via AJAX as its a bit slow over the wire.
  
   Is it possible to add a new element and return and insert that into the
   list? Obviously we could insert in new item with JS on the page but we
   still want to take advantage to any handlers in wicket for that new
 item
   inserted into the list.
  
   So something like:
  
   onSubmit(AjaxRequestTarget target)
  
   {
  
   ItemMyModel item = new Item(); //!!
  
   item.add(new AjaxFormComponentUpdatingBehavior(onchange)
  
   { protected void onUpdate(AjaxRequestTarget target) {...}});
  
  
   thelist.add(item); //!!
  
   ...
  
   target.appendJavaScript(js);
  
   }
  
  
  
   thanks
  
   Wayne
  
 



 --
 La vie est source de joie, la mort est source de paix, seule la transition
 est difficile.



Re: Table Tree expand node

2014-10-17 Thread Sven Meier

Hi,

can you reproduce the same problem here?

http://wicket-dnd-jquery.appspot.com

On the bottom of the page you'll find a TableTree, once you expand a 
node the scrollbars appear correctly.


Regards
Sven



On 10/16/2014 11:20 PM, Mihir Chhaya wrote:

Thanks, Sven for your suggestion. I am using custom CSS, and also the
project is using Wicket Bootstrap.

But, the scroll bar is not displayed even after making TableTree page
independent (removing CSS, and free from bootstrap). Following is from my
modified version of AdvancedTreePage.html.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns:wicket
head
 titleFolder structure/title
/head
body
form wicket:id=form
 p
 a wicket:id=collapseAllcollapse all/a a
wicket:id=expandAllexpand all/a
 /p

 p
 wicket:child/
 /p

 input type=submit wicket:id=submit value=OK/
/form
/body
/html

And here is for from wicket:child/ page:

html xmlns:wicket=
http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd; 
head
 wicket:head
 style
 table {
 width: 90%;
 border: 1px solid #DD;
 }
 tr.even {
 background-color: #FF;
 }
 tr.odd {
 background-color: #EE;
 }
 td.number {
 text-align: right;
 padding-right: 1em;
 }
 /style
 /wicket:head
/head
body
wicket:extend
 div wicket:id=tree[tree]/div
/wicket:extend
/body
/html

Thanks,
-Mihir.

On Thu, Oct 16, 2014 at 4:36 PM, Sven Meier s...@meiers.net wrote:


Hi,


Expand and collapse of the node using '+' icon next to Folder path.
It shows the scroll bar only if I revisit the same page by clicking the

menu option.

are you using custom CSS to style your page?
What happens if you run without this CSS, does the scrollbar appear
immedtiately?

Sven


On 10/16/2014 09:41 PM, Mihir Chhaya wrote:


Hello,

Could anybody please help me on following?

This is related to:
-
Table Tree with custom Tree Provider to display folder structure.
I am referring to Sven Meier's Advanced Tabular Tree Structure example for
Wicket 6.x. (
http://www.wicket-library.com/wicket-examples-6.0.x/tree/
wicket/bookmarkable/org.apache.wicket.examples.tree.
TableTreePage?0foo=AAA
)


My goal is:
-
To display vertical scroll bar on expanding single folder/subfolder in
Table Tree.


The part working is:
-
Expand and collapse of the node using '+' icon next to Folder path.


The part I am struggling with is:
---
Table Tree is not showing vertical scroll bar if there are more files, so
not allowing to view complete folder/sub folder content. It shows the
scroll bar only if I revisit the same page by clicking the menu option.


Thanks,
-Mihir.



-
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: Could not clear select2Choice component model value.

2014-10-17 Thread Maxim Solodovnik
Martin,

I have forked select2, unfortunately I'm still not sure how to fix the
issue :(
Clean link is added to the form and select data is being restored from
requestParameters :(

On 13 October 2014 19:06, Martin Grigorov mgrigo...@apache.org wrote:

 Maxim,

 Feel free to fork it! I.e. move it to WicketStuff.

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

 On Thu, Oct 9, 2014 at 8:53 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Additionally select2 seems to need to be forked to wicketstuff to be
 fixed,
  should I do this?
 
  On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com wrote:
 
   @Paul, @Martin
  
   Select2Choice sets back its value
   to getWebRequest().getRequestParameters().getParameterNames()
   in renderInitializationScript method [1]
   It seems like JS code like: $(#country1).select2(data, null); can
 be
   executed on clear input, but this seems to be workaround
  
   I'm not sure why [1] method is used to get value, maybe you can suggest
   correct way of fixing this?
  
  
   [1]
  
 
 https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62
  
   On 9 October 2014 16:39, MadasamySankarapandian 
 madas...@mcruncher.com
   wrote:
  
   Thanks Maxim Solodovnik.
  
   On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik 
 solomax...@gmail.com
  
   wrote:
  
I also noticed this issue in our project,
Will try to take a look at it
   
On 9 October 2014 07:33, MadasamySankarapandian 
  madas...@mcruncher.com
   
wrote:
   
 Thankyou very much for yours reply.

 I call formComponent.clearInput() in my ClearFormVisitor class.
 But
  It
does
 not work.
 I have created issue-96
 https://github.com/ivaynberg/wicket-select2/issues/96 in
wicket-select2
 project.






 On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik 
   solomax...@gmail.com
 wrote:

  Done, thanks for pointing this out
 
  On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
 
   Can you update this issue then?
  
   https://github.com/ivaynberg/wicket-select2/issues/93
  
   On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
we recently moved this component to wicketstuff:
   
   
  
 

   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
   
to get Wicket7 compatible version
   
   
On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:
   
 You can also ask the developer via:
 https://github.com/ivaynberg/wicket-select2/issues

 You should probably take a look over the open issues so
 that
   you
 are
 familiar with that other developers faced. Maybe one of
  those
 issues
might
 be a road block for you?

 Although you will get a faster reply from Igor or another
   Wicket
developer
 via this list :)

 On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
  mgrigo...@apache.org
 wrote:

  Hi,
 
  You should call formComponent.clearInput() too.
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
  madas...@mcruncher.com wrote:
 
  
   This is regarding wicket-select2 project. I could not
  find
any
mailing
   list for this project. That is why sending here.
 Please
   some
 one
   help
 me.
  
   I have created clear link to clear the form input
  values.
After
   click
 the
   clear link,  all components values are cleared except
  Select2Choice
   component.
  
   Here with attached quickstart to recreate this
 problem.
  
   Follow below steps to recreate this problem
  
   * Download attachment and extract it.
   * cd select2-quickstart.
   * Then execute mvn clean package jetty:run
   * Type localhost:8080 in browser
   * Give the input to name and country field.
   * Click clear link
  
   Now name(*TextField*) field value is cleared and
 country(*Select2Choice*)
   field value is not cleared.
  
  
  
   --
   Thanks and regards
Madasamy
  
  
  
  
   -
   To unsubscribe, e-mail:
   users-unsubscr...@wicket.apache.org
   For additional commands, e-mail:
users-h...@wicket.apache.org
  
 

   
   
   
  

Stateful StatelessForm works most of the time. How to make it crash?

2014-10-17 Thread pureza
Dear Wicket users,

I believe I have found the cause of a long standing issue in my application.
Basically, a form would submit with everything set to null or the default
values even when the user filled in all the information. The problem is that
this only happened once in a while and I was never able to reproduce it, so
I couldn't figure out what was wrong.

However, today I was looking at that code to reuse it somewhere else and
something odd caught my attention. It turns out that my form is a
StatelessForm when it shouldn't be. I don't remember why I made it like
that, but I think it was because I was still learning Wicket at the time.
Anyway, it always worked for me and for 99.9% of the users, so I was never
able to identify the cause.

I tried StatelessChecker and indeed it complains that the form is stateful.
However, that still doesn't guarantee that this mistake is the cause of my
problem. Can you think of any way to exploit this erroneous StatelessForm
declaration so that it doesn't behave correctly?

Thanks,

Luis

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateful-StatelessForm-works-most-of-the-time-How-to-make-it-crash-tp4667977.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: Anyway of stopping this?

2014-10-17 Thread Wayne W
Hi Sven,

We don't set the RenderStrategy so we should (in wicket 6) be using this
default strategy.

Any other idea?

On Thu, Oct 16, 2014 at 8:28 PM, Sven Meier s...@meiers.net wrote:

 Hi,

 what RenderStrategy are you using?

 WIth REDIRECT_TO_BUFFER Wicket should send a redirect to the search
 results page after your form's submit.

 Sven


 On 10/16/2014 07:16 PM, Wayne W wrote:

 Hi,

 we have a simple search form:

 FormString form = new FormString(searchForm) {

 @Override

 protected void onSubmit() {

 PageParameters params = new PageParameters();

 params.add(0, search);

 setResponsePage(SearchResultsPage.class, params);

 }


   };


 This displays a list of results with each row having a
 BookmarkablePageLink
 to another page. If the user uses the form , the results are displayed.
 Then they click on any of the links they are taken to the next page.


 However when they click 'Back' on the browser they always get 'Confirm
 Form
 Resubmission' in Chrome, 'Document Expired' in Firefox etc. How can we
 stop
 this and just display the result page?


 What I actually see in the URLs is:

 server.com/searchFormPage

 server.com?34-1.IFormSubmitListener-baseCont-search-searchForm

 server.com/specificPage/842978

 Then they click on back and you get

 server.com?34-1.IFormSubmitListener-baseCont-search-searchForm



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




Re: Anyway of stopping this?

2014-10-17 Thread Wayne W
Ah sorry please ignore me. It seems we had this in the code:

// use this page renderer provider to avoid useless 302 redirections

setPageRendererProvider(new IPageRendererProvider() {

@Override

public PageRenderer get(RenderPageRequestHandler context) {

return new WebPageRenderer(context) {

@Override

protected RedirectPolicy getRedirectPolicy() {

RedirectPolicy result;

if (!((WebRequest) RequestCycle.get().getRequest()).isAjax()) {

result = RedirectPolicy.NEVER_REDIRECT;

} else {

result = super.getRedirectPolicy();

}

return result;

}

};

}

});

On Fri, Oct 17, 2014 at 4:28 PM, Wayne W waynemailingli...@gmail.com
wrote:

 Hi Sven,

 We don't set the RenderStrategy so we should (in wicket 6) be using this
 default strategy.

 Any other idea?

 On Thu, Oct 16, 2014 at 8:28 PM, Sven Meier s...@meiers.net wrote:

 Hi,

 what RenderStrategy are you using?

 WIth REDIRECT_TO_BUFFER Wicket should send a redirect to the search
 results page after your form's submit.

 Sven


 On 10/16/2014 07:16 PM, Wayne W wrote:

 Hi,

 we have a simple search form:

 FormString form = new FormString(searchForm) {

 @Override

 protected void onSubmit() {

 PageParameters params = new PageParameters();

 params.add(0, search);

 setResponsePage(SearchResultsPage.class, params);

 }


   };


 This displays a list of results with each row having a
 BookmarkablePageLink
 to another page. If the user uses the form , the results are displayed.
 Then they click on any of the links they are taken to the next page.


 However when they click 'Back' on the browser they always get 'Confirm
 Form
 Resubmission' in Chrome, 'Document Expired' in Firefox etc. How can we
 stop
 this and just display the result page?


 What I actually see in the URLs is:

 server.com/searchFormPage

 server.com?34-1.IFormSubmitListener-baseCont-search-searchForm

 server.com/specificPage/842978

 Then they click on back and you get

 server.com?34-1.IFormSubmitListener-baseCont-search-searchForm



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





Re: Table Tree expand node

2014-10-17 Thread Mihir Chhaya
Thanks, Sven.

I tried to play around with CSS in chrome dev tools to reproduce the error
on web link above but could not. Also, I compared CSS with my code from
chrome dev tools. I can see some additional Bootstrap css for my page, but
un-checking those references did not do help.

I have made some progress though. I realized I did not have tree.expand(t)
and tree.collapse(t) when clicking on folder path (as I am using
SelectedFolderContent from Tree example, and have 'select' method which is
calling tree.update()). With those in, the folder click is now toggle, and
with setReponsePage(MyTreePage.class) followed, the sub-folder is opened
completely with scrollbar for page.

So, now scroll bar + toggle (expand/collapse) is working when clicking on
folder path link. But still no luck when clicking '+' button.

Additionally, while debugging I found the Folder onClick is called only
when clicking on Folder path (C:\folderA\folderAA\), but it is not when
clicking on '+'.

Thanks again for your time,
-Mihir.

On Fri, Oct 17, 2014 at 10:07 AM, Sven Meier s...@meiers.net wrote:

 Hi,

 can you reproduce the same problem here?

 http://wicket-dnd-jquery.appspot.com

 On the bottom of the page you'll find a TableTree, once you expand a node
 the scrollbars appear correctly.

 Regards
 Sven




 On 10/16/2014 11:20 PM, Mihir Chhaya wrote:

 Thanks, Sven for your suggestion. I am using custom CSS, and also the
 project is using Wicket Bootstrap.

 But, the scroll bar is not displayed even after making TableTree page
 independent (removing CSS, and free from bootstrap). Following is from my
 modified version of AdvancedTreePage.html.

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

 html xmlns:wicket
 head
  titleFolder structure/title
 /head
 body
 form wicket:id=form
  p
  a wicket:id=collapseAllcollapse all/a a
 wicket:id=expandAllexpand all/a
  /p

  p
  wicket:child/
  /p

  input type=submit wicket:id=submit value=OK/
 /form
 /body
 /html

 And here is for from wicket:child/ page:

 html xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd; 
 head
  wicket:head
  style
  table {
  width: 90%;
  border: 1px solid #DD;
  }
  tr.even {
  background-color: #FF;
  }
  tr.odd {
  background-color: #EE;
  }
  td.number {
  text-align: right;
  padding-right: 1em;
  }
  /style
  /wicket:head
 /head
 body
 wicket:extend
  div wicket:id=tree[tree]/div
 /wicket:extend
 /body
 /html

 Thanks,
 -Mihir.

 On Thu, Oct 16, 2014 at 4:36 PM, Sven Meier s...@meiers.net wrote:

  Hi,

  Expand and collapse of the node using '+' icon next to Folder path.
 It shows the scroll bar only if I revisit the same page by clicking the

 menu option.

 are you using custom CSS to style your page?
 What happens if you run without this CSS, does the scrollbar appear
 immedtiately?

 Sven


 On 10/16/2014 09:41 PM, Mihir Chhaya wrote:

  Hello,

 Could anybody please help me on following?

 This is related to:
 -
 Table Tree with custom Tree Provider to display folder structure.
 I am referring to Sven Meier's Advanced Tabular Tree Structure example
 for
 Wicket 6.x. (
 http://www.wicket-library.com/wicket-examples-6.0.x/tree/
 wicket/bookmarkable/org.apache.wicket.examples.tree.
 TableTreePage?0foo=AAA
 )


 My goal is:
 -
 To display vertical scroll bar on expanding single folder/subfolder in
 Table Tree.


 The part working is:
 -
 Expand and collapse of the node using '+' icon next to Folder path.


 The part I am struggling with is:
 ---
 Table Tree is not showing vertical scroll bar if there are more files,
 so
 not allowing to view complete folder/sub folder content. It shows the
 scroll bar only if I revisit the same page by clicking the menu option.


 Thanks,
 -Mihir.


  -
 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




Return to an html id on a response page

2014-10-17 Thread Nigel P. Weymont
Can somebody point me in the right direction with the following? 

I have the following scenario: I have a link from Page A to Page B. On page B a 
search is performed and the results are presented in a DataView. The user 
clicks on a row to select the result and is returned to Page A. 

I would like the user to be returned to a specific html id on Page A rather 
than the top of the page but I am not sure how to do this. 

These are the pertinent details as currently implemented: 

I am using a submit button to link to Page B (named NpiSearch) from page A 
(named Documentation) and the following: 

setResponsePage( new NpiSearch(Documentation. this )); 

to link from Page A to page B so that I can return to Page A when I am finsihed 
with Page B. 

public NpiSearch( final Page returnTo) {... 

// display search results 
final DataViewIDataProviderObject dataView. 

public void populateItem( final Item item) {… 

// display the search results details..for example 
item.add( new Label( lastName , jsonNpiSearchDTO.getLastName())); 

// select line and return to documentation page 
final AjaxEventBehavior selectNpi = new AjaxEventBehavior( onclick ) { 

@ Override 
protected void onEvent(AjaxRequestTarget target) { 
setResponsePage(returnTo); 
} 
} 
} 
} 

In other parts of the application I am using code such as: 

finishButton.add( new AttributeAppender( href , #diagnosis )); 

But obviously this does not work in the code above. 

So how do I return to a specific id after selecting a line in the DataView? 

Any pointers would be great. 

Nigel 



Re: Return to an html id on a response page

2014-10-17 Thread Sven Meier

Hi,

you should not keep references from one page to other pages, use a 
PageReference instead.


See the following for some ideas on how to scroll to an anchor:

http://stackoverflow.com/questions/14436899/how-to-add-anchor-in-wickets-setresponsepage

Regards
Sven


On 10/17/2014 07:57 PM, Nigel P. Weymont wrote:

Can somebody point me in the right direction with the following?

I have the following scenario: I have a link from Page A to Page B. On page B a 
search is performed and the results are presented in a DataView. The user 
clicks on a row to select the result and is returned to Page A.

I would like the user to be returned to a specific html id on Page A rather 
than the top of the page but I am not sure how to do this.

These are the pertinent details as currently implemented:

I am using a submit button to link to Page B (named NpiSearch) from page A 
(named Documentation) and the following:

setResponsePage( new NpiSearch(Documentation. this ));

to link from Page A to page B so that I can return to Page A when I am finsihed 
with Page B.

public NpiSearch( final Page returnTo) {...

// display search results
final DataViewIDataProviderObject dataView.

public void populateItem( final Item item) {…

// display the search results details..for example
item.add( new Label( lastName , jsonNpiSearchDTO.getLastName()));

// select line and return to documentation page
final AjaxEventBehavior selectNpi = new AjaxEventBehavior( onclick ) {

@ Override
protected void onEvent(AjaxRequestTarget target) {
setResponsePage(returnTo);
}
}
}
}

In other parts of the application I am using code such as:

finishButton.add( new AttributeAppender( href , #diagnosis ));

But obviously this does not work in the code above.

So how do I return to a specific id after selecting a line in the DataView?

Any pointers would be great.

Nigel





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



Re: Return to an html id on a response page

2014-10-17 Thread Nigel W
Thank you Sven, I will take a look at these,

Nigel

On Fri, Oct 17, 2014 at 4:27 PM, Sven Meier s...@meiers.net wrote:

 Hi,

 you should not keep references from one page to other pages, use a
 PageReference instead.

 See the following for some ideas on how to scroll to an anchor:

 http://stackoverflow.com/questions/14436899/how-to-add-anchor-in-wickets-
 setresponsepage

 Regards
 Sven



 On 10/17/2014 07:57 PM, Nigel P. Weymont wrote:

 Can somebody point me in the right direction with the following?

 I have the following scenario: I have a link from Page A to Page B. On
 page B a search is performed and the results are presented in a DataView.
 The user clicks on a row to select the result and is returned to Page A.

 I would like the user to be returned to a specific html id on Page A
 rather than the top of the page but I am not sure how to do this.

 These are the pertinent details as currently implemented:

 I am using a submit button to link to Page B (named NpiSearch) from page
 A (named Documentation) and the following:

 setResponsePage( new NpiSearch(Documentation. this ));

 to link from Page A to page B so that I can return to Page A when I am
 finsihed with Page B.

 public NpiSearch( final Page returnTo) {...

 // display search results
 final DataViewIDataProviderObject dataView.

 public void populateItem( final Item item) {…

 // display the search results details..for example
 item.add( new Label( lastName , jsonNpiSearchDTO.getLastName()));

 // select line and return to documentation page
 final AjaxEventBehavior selectNpi = new AjaxEventBehavior( onclick ) {

 @ Override
 protected void onEvent(AjaxRequestTarget target) {
 setResponsePage(returnTo);
 }
 }
 }
 }

 In other parts of the application I am using code such as:

 finishButton.add( new AttributeAppender( href , #diagnosis ));

 But obviously this does not work in the code above.

 So how do I return to a specific id after selecting a line in the
 DataView?

 Any pointers would be great.

 Nigel




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