Determine session size for Wicket 1.5

2012-06-19 Thread Walter Rugora
Hi there, for Wicket 1.3 I determine session size like this: RequestCycle.get().getSession().getSizeInBytes() But the RequestCycle underwent some changes and I cannot figure out how to do it for Wicket 1.5? Appreciate your help! Walter ---

Re: Determine session size for Wicket 1.5

2012-06-19 Thread Martin Grigorov
Hi, This method has been removed because it just delegated to org.apache.wicket.util.lang.WicketObjects#sizeof(Serializable) long sessionSize = WicketObjects.sizeOf(Session.get()); On Tue, Jun 19, 2012 at 2:03 PM, Walter Rugora wrote: > Hi there, > > for Wicket 1.3 I determine session size like

Re: Determine session size for Wicket 1.5

2012-06-19 Thread Thomas Götz
Session.get().getSizeInBytes(); -Tom On 19.06.2012 at 13:03 Walter Rugora wrote: > Hi there, > > for Wicket 1.3 I determine session size like this: > RequestCycle.get().getSession().getSizeInBytes() > > But the RequestCycle underwent some changes and I cannot figure out how > to do it for

Re: Determine session size for Wicket 1.5

2012-06-19 Thread Martin Grigorov
On Tue, Jun 19, 2012 at 2:10 PM, Thomas Götz wrote: > Session.get().getSizeInBytes(); Apparently it is not removed ... > >   -Tom > > > On 19.06.2012 at 13:03 Walter Rugora wrote: > >> Hi there, >> >> for Wicket 1.3 I determine session size like this: >> RequestCycle.get().getSession().getSizeIn

Re: Determine session size for Wicket 1.5

2012-06-19 Thread Walter Rugora
Thanks guys! On Tue 19 Jun 2012 21:12:48 EST, Martin Grigorov wrote: > On Tue, Jun 19, 2012 at 2:10 PM, Thomas Götz wrote: >> Session.get().getSizeInBytes(); > > Apparently it is not removed ... > >> >> -Tom >> >> >> On 19.06.2012 at 13:03 Walter Rugora wrote: >> >>> Hi there, >>> >>> for Wicke

Verifying image HREF with Wicket tester

2012-06-19 Thread Alec Swan
Hello, How can I access and verify the HREF attribute of an Image with WicketTester? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Martin Grigorov
See #getTagBy*** methods. This way you get a TagTester and then you can check the attributes. On Tue, Jun 19, 2012 at 5:39 PM, Alec Swan wrote: > Hello, > > How can I access and verify the HREF attribute of an Image with WicketTester? > > Thanks, > > Alec > > -

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Alec Swan
Martin, this method works fine on the top page elements but not on the nested panel's elements. I need to get the HREF attribute of "myForm:rows:1:cols:2:myPanel:myImage" on the top page. THIS WORKS: tester.getTagByWicketId("myForm") THIS WORKS: tester.getTagByWicketId("rows") THIS WORKS: tester.g

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Martin Grigorov
On Tue, Jun 19, 2012 at 6:26 PM, Alec Swan wrote: > Martin, this method works fine on the top page elements but not on the > nested panel's elements. I need to get the HREF attribute of > "myForm:rows:1:cols:2:myPanel:myImage" on the top page. '2' is the component id of an item inside a repeater.

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Alec Swan
getTagByWicketId(..) JavaDoc says that if there are multiple components with this wicket:id it will return the first one. Besides, we only have one cell in the table, so there should be only one myImage element. On Tue, Jun 19, 2012 at 9:37 AM, Martin Grigorov wrote: > On Tue, Jun 19, 2012 at 6:2

Models and Session Size

2012-06-19 Thread Douglas Ferguson
I've been working in wicket for awhile now. I was just reading this post last night. http://www.small-improvements.com/10-things-about-apache-wicket-i-love/wicket:pageMapName/wicket-0 I was intrigued by the comment that more extensive use of Model would reduce session size. Why would this be?

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Alec Swan
Martin, if there was a problem with repeater wouldn't I have had multiple myPanel components? Yet, tester.getTagByWicketId("myPanel") works. On Tue, Jun 19, 2012 at 9:46 AM, Alec Swan wrote: > getTagByWicketId(..) JavaDoc says that if there are multiple > components with this wicket:id it will re

Re: validation without form

2012-06-19 Thread srinash
srinash wrote > > thank you , will take a look > > Sri > Was able to use the ajaxformcomponentupdatingbehavior, this is my scenario textfield select box submit (for these 2 fields after validation) Can you let me know how i can validate and click on submit. Once I submit i take those

Wicket Events

2012-06-19 Thread Douglas Ferguson
Anybody have a good pattern for using Events without having lots of instanceOf, if/else, or switch statements? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache

Re: Models and Session Size

2012-06-19 Thread Carl-Eric Menzel
On Tue, 19 Jun 2012 14:01:13 -0500 Douglas Ferguson wrote: > I was intrigued by the comment that more extensive use of Model > would reduce session size. > > Why would this be? Won't models still wind up in the data graph for > the Page and thus be in the pagemap? Well, apart from the fact tha

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Martin Grigorov
Fire the debugger and see what happens. On Tue, Jun 19, 2012 at 8:56 PM, Alec Swan wrote: > Martin, if there was a problem with repeater wouldn't I have had > multiple myPanel components? Yet, tester.getTagByWicketId("myPanel") > works. > > On Tue, Jun 19, 2012 at 9:46 AM, Alec Swan wrote: >> ge

Re: Wicket Events

2012-06-19 Thread Martin Grigorov
See org.apache.wicket.EventDispatcherTest in wicket-core's tests On Tue, Jun 19, 2012 at 9:58 PM, Douglas Ferguson wrote: > Anybody have a good pattern for using Events without having lots of > instanceOf, if/else, or switch statements? > -

Re: Wicket Events

2012-06-19 Thread Douglas Ferguson
Where's the source repository located? On Jun 19, 2012, at 2:20 PM, Martin Grigorov wrote: > See org.apache.wicket.EventDispatcherTest in wicket-core's tests > > On Tue, Jun 19, 2012 at 9:58 PM, Douglas Ferguson wrote: >> Anybody have a good pattern for using Events without having lots of >>

Re: Models and Session Size

2012-06-19 Thread Douglas Ferguson
Yes.. LoadableDetachable makes more sense. Douglas On Jun 19, 2012, at 2:17 PM, Carl-Eric Menzel wrote: > On Tue, 19 Jun 2012 14:01:13 -0500 > Douglas Ferguson wrote: > >> I was intrigued by the comment that more extensive use of Model >> would reduce session size. >> >> Why would this be? W

Re: Wicket Events

2012-06-19 Thread Igor Vaynberg
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.wicket/wicket-core/6.0.0-beta1/org/apache/wicket/EventDispatcherTest.java#EventDispatcherTest -igor On Tue, Jun 19, 2012 at 12:31 PM, Douglas Ferguson wrote: > Where's the source repository located? > > > On Jun 19, 2012, at 2:20 PM, Mar

Re: Wicket Events

2012-06-19 Thread Jeremy Thomerson
Have we talked about adding an IEventDispatcher that dispatches events by their class type based on event method signature? Example: class MyComponent { @EventListener // or some annotation public void onUserAddedEvent(UserAddedEvent event) { // do something here } } Then when someone calls

Re: wicket 1.6

2012-06-19 Thread Douglas Ferguson
Martin, You still up for fixing issues? We found one. ;) The auto complete text field throws a javascript here. Would you like me to post the details here? Douglas On Jun 5, 2012, at 11:15 AM, Martin Grigorov wrote: > Hi, > > I think 6.0.0-beta2 is good enough for production. > If you find

Re: Wicket Events

2012-06-19 Thread Douglas Ferguson
This seems similar to the google EventBus approach. On Jun 19, 2012, at 2:58 PM, Jeremy Thomerson wrote: > Have we talked about adding an IEventDispatcher that dispatches events by > their class type based on event method signature? > > Example: > > class MyComponent { > > @EventListener // or

Re: wicket 1.6

2012-06-19 Thread Martin Grigorov
Use Jira for bug reports. On Tue, Jun 19, 2012 at 11:13 PM, Douglas Ferguson wrote: > Martin, > > You still up for fixing issues? We found one. ;) > > The auto complete text field throws a javascript here. > Would you like me to post the details here? > > Douglas > > > > On Jun 5, 2012, at 11:15

Re: Wicket Events

2012-06-19 Thread Douglas Ferguson
Ok.. So I took a look at it and it is ignoring the IEvent. I'm actually interested in how to cleanly handle multiple type of IEvents without having to do if/else or instanceOf. Was curious if anybody had a nice pattern to follow. @Override 115 public void onEvent(Component c

Re: validation without form

2012-06-19 Thread vineet semwal
you dont need that inner form if you are using ajaxformcomponentupdatingbehavior, for validation you can just add validator ,you will need to add the behaviors to both formcomponents if you use ajaxformcomponentupdatingbehavior if you want that inner form and you want it to submit than either add

Re: Wicket Events

2012-06-19 Thread Martin Grigorov
This is what the test shows partially. The test shows the usage of a custom annotation, but doesn't do the additional step of checking the argument type. At my job we use such implementation and it works for us. What you miss this way is the IEvent API - like stopping the event, for example. Addi

Re: Wicket Events

2012-06-19 Thread Martin Grigorov
Wicket always sends ComponentEvent. The dynamic part is the event's payload. The test shows how to receive the payload in a type-safe way. On Tue, Jun 19, 2012 at 11:16 PM, Douglas Ferguson wrote: > Ok.. So I took a look at it and it is ignoring the IEvent. > > I'm actually interested in how to c

Re: wicket 1.6

2012-06-19 Thread Martin Grigorov
Do you hit https://issues.apache.org/jira/browse/WICKET-4581 ? This is fixed in -SNAPSHOT On Tue, Jun 19, 2012 at 11:14 PM, Martin Grigorov wrote: > Use Jira for bug reports. > > On Tue, Jun 19, 2012 at 11:13 PM, Douglas Ferguson wrote: >> Martin, >> >> You still up for fixing issues? We found o

Properly share data model in TabbedPanel

2012-06-19 Thread nunofaria11
Hi, I am trying to properly share a model between tabs in a TabbedPanel. I've been trying to pass the model to the Panels returned in the getPanel hook (below), but it seems not to work. tabs.add(new AbstractTab(new Model("Title")) { @Override public WebMarkupContainer g

Re: validation without form

2012-06-19 Thread srinash
vineetsemwal wrote > > you dont need that inner form if you are using > ajaxformcomponentupdatingbehavior, > for validation you can just add validator ,you will need to add the > behaviors to both formcomponents if you use > ajaxformcomponentupdatingbehavior > > if you want that inner form and y

Re: Properly share data model in TabbedPanel

2012-06-19 Thread Martin Grigorov
On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11 wrote: > Hi, I am trying to properly share a model between tabs in a TabbedPanel. > I've been trying to pass the model to the Panels returned in the getPanel > hook (below), but it seems not to work. "Doesn't work" doesn't explain much. Give us more i

Re: Properly share data model in TabbedPanel

2012-06-19 Thread nunofaria11
By doesn't work I meant the data (inside the model) that was supposed to change does not change. 2012/6/19 Martin Grigorov-4 [via Apache Wicket] < ml-node+s1842946n4650084...@n4.nabble.com> > On Tue, Jun 19, 2012 at 11:26 PM, nunofaria11 <[hidden > email]

Re: Wicket Events

2012-06-19 Thread Douglas Ferguson
Yeah... i just don't like the idea of unpacking the payload and doing instanceOf, if/else do decide if I care about that message. The GoogleEvent buss approach seems better. I.E. Implement the specific methods for the specific event types. Douglas On Jun 19, 2012, at 3:20 PM, Martin Grigorov w

Re: Properly share data model in TabbedPanel

2012-06-19 Thread Martin Grigorov
it sounds like you are using static models. read about dynamic models at: https://cwiki.apache.org/WICKET/working-with-wicket-models.html On Tue, Jun 19, 2012 at 11:36 PM, nunofaria11 wrote: > By doesn't work I meant the data (inside the model) that was supposed to > change does not change. > > 2

Re: Wicket Events

2012-06-19 Thread Martin Grigorov
As the tests shows this is pluggable in Wicket. There is a default impl that uses casting of the payload and there is a way to setup your own impl that does it your way. See Jeremy's message in this thread for a solution that works as Google's one. On Tue, Jun 19, 2012 at 11:36 PM, Douglas Ferguso

Re: wicket 1.6

2012-06-19 Thread Douglas Ferguson
Cool.. that works.. On Jun 19, 2012, at 3:25 PM, Martin Grigorov wrote: > Do you hit https://issues.apache.org/jira/browse/WICKET-4581 ? > This is fixed in -SNAPSHOT > > On Tue, Jun 19, 2012 at 11:14 PM, Martin Grigorov > wrote: >> Use Jira for bug reports. >> >> On Tue, Jun 19, 2012 at 11:

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Alec Swan
I had to make sure that my element had a closing The problem is that org.apache.wicket.util.tester.TagTester#createTagByAttribute requires the element to be closed, i.e. or . Otherwise closeTag variable is never set and the loop does not exit. Seems like a bug to me, isn't it? On Tue, Jun 19

Re: Properly share data model in TabbedPanel

2012-06-19 Thread nunofaria11
That is indeed a useful link. Thank you... However, I still get the same behavior Here is what I have: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private ArrayList coords = new ArrayList(); public HomePage() { final ArrayList ta

Re: Wicket Events

2012-06-19 Thread Douglas Ferguson
Yeah.. when I read Jeremy's reply it was the kind of thing I was looking for but my understanding was that Jeremy was suggesting it as a possible approach. Are you saying this will work out of the box? On Jun 19, 2012, at 3:40 PM, Martin Grigorov wrote: > As the tests shows this is pluggable

DynamicImageResource in ajax panel

2012-06-19 Thread mlabs
I have a panel that I update via ajax. In that panel is an Image. The Image uses a DynamicWebResource, whose getImageData() method produces a PNG file. The getImageData() override gets called the first time the page renders but upon subsequent refreshes of the panel via ajax, it does not... so my i

Re: Ajaxbutton, updating forms, broken persistence: strange, seemingly unrelated behaviour

2012-06-19 Thread Sven Meier
Hi, without code its difficult to say what's going wrong in your project. wicket-dnd uses normal Wicke ajax request, so you can do anything what you would do with any other ajax enabled component: change models and components. >The way I did this is I passed the parent tabbed panel wrapped i

Re: Properly share data model in TabbedPanel

2012-06-19 Thread Sven Meier
when I click a submit button the data gets refreshed inside the model and I can see the changes when I switch tabs, but only then In the second panel there is nothing special, only an AjaxSubmitLink that repaints a WebMarkupContainer. TabbedPanel uses links by default, so form values are los

How to reload a Wicket-page from Wicket-panel.

2012-06-19 Thread vaibhav2012
Hi, I want to reload Wicket-page from a Wicket-panel. The scenario is like : 1) I have a SignInPanel. I am adding this panel in different pages, lets for example say PageA, PageB, PageC etc. 2) Now when user is in PageA, and user signs in from SignInPanel. I want the contents of PageA to change

AW: How to reload a Wicket-page from Wicket-panel.

2012-06-19 Thread Hans Lesmeister
Hi, panel.getPage() gives you the current page which you can reload i.e. with setResponsePage() Cheers Hans -Ursprüngliche Nachricht- Von: vaibhav2012 [mailto:vaibhav.bit2...@gmail.com] Gesendet: Mittwoch, 20. Juni 2012 07:54 An: users@wicket.apache.org Betreff: How to reload a Wicket-

Re: AW: How to reload a Wicket-page from Wicket-panel.

2012-06-19 Thread vaibhav2012
Hi Hans, I have already tried this, but it doesn't work. SignInPanel is a seperate class which extends *org.apache.wicket.markup.html.panel.Panel*, and it is having its seperate markup. I am adding this SignInPanel as a Component in different wicket pages, as mentioned in the scenario in my origi

Re: How to reload a Wicket-page from Wicket-panel.

2012-06-19 Thread Hans Lesmeister
Please post your code -Ursprüngliche Nachricht- Von: vaibhav2012 [mailto:vaibhav.bit2...@gmail.com] Gesendet: Mittwoch, 20. Juni 2012 08:20 An: users@wicket.apache.org Betreff: Re: AW: How to reload a Wicket-page from Wicket-panel. Hi Hans, I have already tried this, but it doesn't work

Re: How to reload a Wicket-page from Wicket-panel.

2012-06-19 Thread Hans Lesmeister
>> I used this.getPage() in SignInPanel's constructor In the constructor, the page is not yet set (See onInitialize and onConfigure) -Ursprüngliche Nachricht- Von: vaibhav2012 [mailto:vaibhav.bit2...@gmail.com] Gesendet: Mittwoch, 20. Juni 2012 08:20 An: users@wicket.apache.org Betreff:

Re: Verifying image HREF with Wicket tester

2012-06-19 Thread Martin Grigorov
Yes, this should be improved. Please create a ticket with a test case. On Wed, Jun 20, 2012 at 12:21 AM, Alec Swan wrote: > I had to make sure that my element had a closing > > The problem is that > org.apache.wicket.util.tester.TagTester#createTagByAttribute requires > the element to be close

Re: How to reload a Wicket-page from Wicket-panel.

2012-06-19 Thread vaibhav2012
Hi Hans, Thanks for the information. Its working :). - Regards, Vaibhav Gupta -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-reload-a-Wicket-page-from-Wicket-panel-tp4650097p4650103.html Sent from the Users forum mailing list archive at Nabble.com. -