Re: RSS

2013-03-11 Thread Jeroen Steenbeeke
I usually just implement RSS as a page rather than a resource. You
simply create a Page like you normally would, and override
getMarkupType:

@Override
public MarkupType getMarkupType() {
return new MarkupType("rss", "application/rss+xml");
}

Then, instead of an HTML file you provide an RSS file that contains
your markup (with wicket:id attributes and such).

Maybe not exactly what you're looking for, but I hope it helps regardless.

- Jeroen

2013/3/12 Stephen Walsh :
> Anyone have a working solution for producing RSS feeds from content stored
> in a DB on a Wicket 6.5+ page?  I've been reading through all of the old
> docs on wicketstuff-rome, but it seems it's not supported with the changes
> made to 6.5+.
>
> I can generate my xml file, but not really sure how to go about actually
> publishing it and having Wicket recognize it as a resource once it's on the
> file system.  Hope that makes sense...
>
> ___
> Stephen Walsh | http://connectwithawalsh.com



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



RSS

2013-03-11 Thread Stephen Walsh
Anyone have a working solution for producing RSS feeds from content stored
in a DB on a Wicket 6.5+ page?  I've been reading through all of the old
docs on wicketstuff-rome, but it seems it's not supported with the changes
made to 6.5+.

I can generate my xml file, but not really sure how to go about actually
publishing it and having Wicket recognize it as a resource once it's on the
file system.  Hope that makes sense...

___
Stephen Walsh | http://connectwithawalsh.com


Re: NumberTextField Issue

2013-03-11 Thread William Speirs
OK... so it's not Wicket related, it is a combination of Bootstrap + Chrome
+ HTML5. This blog post I found actually explains it quite well:
http://blog.isotoma.com/2012/03/html5-input-typenumber-and-decimalsfloats-in-chrome/

The short version is that there is a step attribute when an input's type is
number. If you don't specify a step then it defaults to 1 making decimal
values invalid. As soon as I set step="0.01" it worked like a champ (I did
that because it's a currency, but you can also set step="any").

Coming back to Wicket, since the NumberTextField component has the ability
to setMaximum & setMinimum, should it also have a setStep method? Otherwise
you're forced to use a combination of Wicket methods & HTML attributes to
control the input box.

Thoughts?

Bill-


On Mon, Mar 11, 2013 at 4:51 PM, William Speirs  wrote:

> I'll need to double check and get back to you, but I think it might be a
> bootstrap issue. The input box gets styled with controls to increase and
> decrease the number and that might be the issue.
>
> Thanks...
>
> Bill-
> On Mar 11, 2013 5:30 AM, "Martin Grigorov"  wrote:
>
>> Hi,
>>
>>
>> On Sun, Mar 10, 2013 at 9:38 PM, William Speirs 
>> wrote:
>>
>> > I'm trying to use a NumberTextField with a type of Double and the form
>> will
>> > only let me type in integers (or doubles that end in .0). Is this a
>> known
>> > issue? Is there a workaround?
>> >
>>
>> Can you explain more ? I don't remember having such restrictions when I
>> used NTF.
>> Which browser do you use ?
>> Can you create a plain HTML file (without using Wicket) and try to use
>>  with a double with higher precision ?
>>
>>
>> >
>> > My basic code...
>> >
>> > *Java*
>> > private IModel doubleModel;
>> >
>> > final NumberTextField d = new
>> NumberTextField("d",
>> > doubleModel, Double.class);
>> >
>> > d.setMinimum(1.0d);
>> > d.setMaximum(1000.0d);
>> > d.setRequired(true);
>> >
>> > form.add(d);
>> >
>> > *HTML*
>> >
>> >   
>> > Double
>> > 
>> >   
>> > 
>> >   
>> >
>> >
>> > Am I using the wrong component or HTML input type or something? Every
>> time
>> > I type in a number like 5.5 and try to submit the form I get the pop-up
>> > that say, "Invalid value."
>> >
>> > Thoughts?
>> >
>> > Thanks...
>> >
>> > Bill-
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com 
>>
>


Re: NumberTextField Issue

2013-03-11 Thread William Speirs
I'll need to double check and get back to you, but I think it might be a
bootstrap issue. The input box gets styled with controls to increase and
decrease the number and that might be the issue.

Thanks...

Bill-
On Mar 11, 2013 5:30 AM, "Martin Grigorov"  wrote:

> Hi,
>
>
> On Sun, Mar 10, 2013 at 9:38 PM, William Speirs 
> wrote:
>
> > I'm trying to use a NumberTextField with a type of Double and the form
> will
> > only let me type in integers (or doubles that end in .0). Is this a known
> > issue? Is there a workaround?
> >
>
> Can you explain more ? I don't remember having such restrictions when I
> used NTF.
> Which browser do you use ?
> Can you create a plain HTML file (without using Wicket) and try to use
>  with a double with higher precision ?
>
>
> >
> > My basic code...
> >
> > *Java*
> > private IModel doubleModel;
> >
> > final NumberTextField d = new
> NumberTextField("d",
> > doubleModel, Double.class);
> >
> > d.setMinimum(1.0d);
> > d.setMaximum(1000.0d);
> > d.setRequired(true);
> >
> > form.add(d);
> >
> > *HTML*
> >
> >   
> > Double
> > 
> >   
> > 
> >   
> >
> >
> > Am I using the wrong component or HTML input type or something? Every
> time
> > I type in a number like 5.5 and try to submit the form I get the pop-up
> > that say, "Invalid value."
> >
> > Thoughts?
> >
> > Thanks...
> >
> > Bill-
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 
>


Re: Wicket 6 Migration (getEventHandler())

2013-03-11 Thread Martin Grigorov
Hi,

What do you do in this method ?


On Mon, Mar 11, 2013 at 6:37 PM, Ramin  wrote:

> Hi
>
> In my code, getEventHandler() has been Overriden a few times but now
> getEventHandler() of AjaxFormSubmitBehavior/AjaxEventBehavior no longer
> exists in Wicket 6.
>
> I keep finding myself on the following page when looking for an answer but
> even after reading it a few times I still don't understand what the
> replacement is.
>
> https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax
> 
>
> Any advice on what the replacement could be?
>
> Many thanks
> Ramin
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-getEventHandler-tp4657169.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 


Re: atmosphere: urls erased from response

2013-03-11 Thread Martin Geisse
Thank you very much. After reading the bugs you linked to, I ended up using an 
older version of Atmosphere (not wicket-atmosphere) -- atmosphere 1.0.9 -- and 
it works fine now.

Greetings,
Martin Geisse

On Mar 11, 2013, at 10:58 AM, Martin Grigorov wrote:

> Hi,
> 
> This is a known bug in Atmosphere.
> https://github.com/Atmosphere/atmosphere/issues/949
> https://issues.apache.org/jira/browse/WICKET-5084
> 
> I think you can use the previous version of wicket-atmosphere until the fix
> is incorporated.
> 
> 
> On Sun, Mar 10, 2013 at 4:46 PM, Martin Geisse
> wrote:
> 
>> Hi,
>> 
>> sorry if this mail arrives twice, but the mailing list seems to have
>> dropped the first one.
>> 
>> I'm having problems with wicket-atmosphere. It seems like the various
>> urlFor() methods return null when called from the "artificial" request
>> cycle that gets triggered by EventBus.post(Object). Specifically, I have
>> traced down the problem to be encodeUrl() returning null in such a case,
>> which I *think* comes from the fake HttpServletResponse defined at the top
>> of AtmosphereResponse. That class seems to be lacking other important
>> methods as well.
>> 
>> I was able to reproduce the problem in the example from
>> https://github.com/papegaaij/wicket-atmosphere-quickstart -- just add a
>> Link with an empty onClick() handler to the page,
>> setOutputMarkupId(true) and re-render the link in the subscribed methods.
>> The link will appear correctly on the page when it is first requested, but
>> the href attribute turns to nothing (null) when the link gets re-rendered.
>> 
>> As far as I can tell, Atmosphere uses WebSockets in my experiment.
>> 
>> So far I have been unsuccessful in building a workaround. Atmosphere seems
>> to be especially stubborn about using that fake HttpServletResponse
>> implementation, even though it is missing all important features. The
>> wicket-atmosphere module isn't easily modified either -- both
>> AtmosphereWebResponse and the relevant methods in EventBus are private.
>> Short of actually building my own modified version of it, I can't seem to
>> make it work.
>> 
>> Any ideas?
>> 
>> Greetings,
>> Martin Geisse
> 
> 
> 
> 
> -- 
> 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: DropDown in palette's header ?

2013-03-11 Thread grazia
If this is the statespanel;


http://wicket.apache.org";>


Select a State: 




public class StatePanel extends Panel {

/**
 *
 */
private static final long serialVersionUID = 1L;

public StatePanel(final String id, final IModel stateModel,
final IModel> stateChoicesModel) {
super(id);

final DropDownChoice stateDropdown = new
DropDownChoice(
"states", stateModel, stateChoicesModel);


}

}

And on the page:

final Palette palette = new Palette(
"palette", selectedInstallations, availableInstallations,
new ChoiceRenderer("location", "locationId"),
25, false) {

@Override
protected Component newAvailableHeader(String componentId) {
return new StatePanel(componentId, stateModel,
stateChoicesModel);

}
};
palette.setOutputMarkupId(true);

Iam getting:

WARNING: Detected inconsistency in choice component: class ...
LocAssociation/form:states. Model returned object: , but this
object is not available in the list of selected objects.
Mar 11, 2013 12:57:22 PM org.apache.wicket.MarkupContainer renderNext
SEVERE: Unable to find component with id 'states' in [StatePanel [Component
id = availableHeader]]
Expected: 'form:palette:availableHeader.states'.
Found with similar names: 'form:states'
Mar 11, 2013 12:57:22 PM org.apache.wicket.DefaultExceptionMapper
internalMap
SEVERE: Unexpected error occurred
Unable to find component with id 'states' in [StatePanel [Component id = ava
ilableHeader]]
Expected: 'form:palette:availableHeader.states'.
Found with similar names: 'form:states'
 MarkupStream: [markup =
file:/C:/home/Workspaces/mrdss-dev2/mrdss/web/target/classes/.../StatePanel.html
http://wicket.apache.org";>


Select a
State:



, index = 2, current =  '' (line
0, co
lumn 0)]
at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStre

On Mon, Mar 11, 2013 at 11:39 AM, Paul Bors [via Apache Wicket] <
ml-node+s1842946n4657167...@n4.nabble.com> wrote:

> Sorry, you wanted inside the selected header... same thing only a
> different
> override.
> Look up the API of the Palette.
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Paul Bors [mailto:[hidden 
> email]]
>
> Sent: Monday, March 11, 2013 12:25 PM
> To: [hidden email] 
> Subject: RE: DropDown in palette's header ?
>
> @Override
> protected Component newAvailableHeader(String componentId) {
> return new AvailableHeaderPanel(componentId, form); }
>
> Where AvailableHeaderPanel is your own panel.
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: grazia [mailto:[hidden 
> email]]
>
> Sent: Monday, March 11, 2013 11:54 AM
> To: [hidden email] 
> Subject: DropDown in palette's header ?
>
> Hi,
>
> is there a way to place a dropdown inside the selected header of a palette
> ?
>
> Thanks
>
>
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
> 57163.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>  ~ Thank you,
> p...@bors.ws
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657167.html
>  To unsubscribe from DropDown in palette's header ?, click 
> here
> .
> NAML
>




--
View this message in c

Re: wiquery ResizableBehavior weird results on stop

2013-03-11 Thread Ernesto Reinaldo Barreiro
Check your JS libraries inclusion against quick-start... There might be
something weird going on (like several versions of wiquery-UI)

On Mon, Mar 11, 2013 at 5:17 PM, Pieter Claassen  wrote:

> Ok, I can confirm that the request URI contains the wrong (old
> parameters). Below is a request URI I get after resizing the window to max
> width (note the width here is 4px while the real panel is 800px).
>
> Could this be that I have some dud JS floating around that is messing this
> up?
>
>
> wicket/page?140-1.IBehaviorListener.1-templateeditdetailpanel-questionrenderpanel-container-rows-0-row-0-question-holder&eventName=stop&resizeHeight=29&resizeWidth=4&_=1363018206108
>
> This is what I have loaded ito ajax libraries in my header.
>
> [image: Inline image 1]
>
> Regards,
> Pieter
>
>
> On Mon, Mar 11, 2013 at 5:34 PM, Pieter Claassen wrote:
>
>> Ernesto,
>>
>> This is very strange. When I use your snapshot code in a quickstart
>> project, it functions fine. But when I include it in my project, I always
>> get the old x and y values (of one resize ago) in my callback.
>>
>> Can you think of any reason why this would be happening? Could this be an
>> issue with the javascript code? I see my wicket ajax debug window does not
>> show my function parameters being used in the call so I can't see if it is
>> JS or wicket issue. How do I start to debug this?
>>
>> Regards,
>> Pieter
>>
>>
>> On Sun, Mar 10, 2013 at 10:02 AM, Ernesto Reinaldo Barreiro <
>> reier...@gmail.com> wrote:
>>
>>> Pieter,
>>>
>>> Can you create a quickstart or "something" I can give it a try? Or give
>>> it
>>> a try to what I have added to wiquery: test panel I have created there
>>> seems to be working fine. If those changes work fine for you I can as
>>> other
>>> team member to roll out a new version of wiquery next week;-)
>>>
>>> On Sun, Mar 10, 2013 at 8:56 AM, Pieter Claassen 
>>> wrote:
>>>
>>> > Ernesto,
>>> >
>>> > Ok, I implemented your changes but something very strange is
>>> happening. In
>>> > my callback, I get the resizeHeight and resizeWidth values of the
>>> previous
>>> > window resize event, not the current one.
>>> >
>>> > I don't really know how to debug this other than drag the window
>>> smaller
>>> > and larger and checking whether the values increase or decrease.
>>> >
>>> > Any suggestion for how to debug this?
>>> >
>>> > Regards,
>>> > Pieter
>>> >
>>> >
>>> >
>>> > On Sat, Mar 9, 2013 at 4:56 PM, Ernesto Reinaldo Barreiro <
>>> > reier...@gmail.com> wrote:
>>> >
>>> > > Pieter,
>>> > >
>>> > > I have just fixed wiquery to support the stop event. See commit
>>> > >
>>> > >
>>> > >
>>> >
>>> https://github.com/WiQuery/wiquery/commit/c2e8242c9d1aba9ae64f7c67654e0e6539d36b78
>>> > >
>>> > > On problem there is that parameter coming form client are float
>>> values. I
>>> > > have added a test panel and ResizableStopAjaxBehavior seems to be
>>> working
>>> > > as expected.
>>> > >
>>> > > Hope this helps.
>>> > >
>>> > > Cheers.
>>> > >
>>> > > Ernesto
>>> > >
>>> > >
>>> > > On Sat, Mar 9, 2013 at 2:55 PM, Pieter Claassen 
>>> > > wrote:
>>> > >
>>> > > > I am still only interested in getting the size of a component on
>>> resize
>>> > > > stop.
>>> > > >
>>> > > > Below is my code that I use to try and implement a call back to
>>> only
>>> > call
>>> > > > on "stop". However, the x and y sizes I get are all over the
>>> place. Not
>>> > > at
>>> > > > all corresponding with the window sizes I actually see when
>>>  resizing.
>>> > > >
>>> > > > I am using wiquery 6.2.0 and wicket 6.5.0.
>>> > > >
>>> > > > Any advice as to what I am doing wrong?
>>> > > >
>>> > > > Regards,
>>> > > > Pieter
>>> > > >
>>> > > > MyResizableBehavior resizableBehavior = new
>>> > > MyResizableBehavior();
>>> > > > resizableBehavior.setStopEvent(new
>>> > > > MyResizableBehavior.AjaxResizeStopCallback() {
>>> > > > @Override
>>> > > > protected void resize(AjaxRequestTarget target,
>>> Component
>>> > > > source, int resizeHeight, int resizeWidth) {
>>> > > > AdvancedFormatter advancedFormatter =
>>> > > > questionBaseWebModel.getEntity().getStatement().getFormatter();
>>> > > > advancedFormatter.setWidth((float) resizeWidth /
>>> 800 *
>>> > > > 100);
>>> > > > advancedFormatter.setHeight((float) resizeHeight);
>>> > > > System.out.println("Width:"+resizeWidth+"
>>> > > > Height:"+resizeHeight);
>>> > > > advancedFormatterFactory.save(advancedFormatter);
>>> > > > }
>>> > > >
>>> > > > });
>>> > > >
>>> > > >
>>> resizableBehavior.setAutoHide(true).setGhost(true).setAnimate(true);
>>> > > > resizableBehavior.setGrid(50, 50);
>>> > > >
>>> > > > 
>>> > > >
>>> > > > public class MyResizableBehavior extends ResizableBehavior {
>>> > > > public abstract static class AjaxResizeStopCallback extends
>>> > > > AbstractAjaxEventCallback
>>> > > > {
>>> > > > private static f

Wicket 6 Migration (getEventHandler())

2013-03-11 Thread Ramin
Hi 

In my code, getEventHandler() has been Overriden a few times but now
getEventHandler() of AjaxFormSubmitBehavior/AjaxEventBehavior no longer
exists in Wicket 6. 

I keep finding myself on the following page when looking for an answer but
even after reading it a few times I still don't understand what the
replacement is.

https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax
  

Any advice on what the replacement could be?

Many thanks
Ramin





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-getEventHandler-tp4657169.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: DropDown in palette's header ?

2013-03-11 Thread grazia
oh, so my dropdown would have to go into a panel. I'll try it.

Is there a way I can keep track of the items that the user might move from
the left side to the right side of the palette ? And viceversa ?


On Mon, Mar 11, 2013 at 11:25 AM, Paul Bors [via Apache Wicket] <
ml-node+s1842946n4657166...@n4.nabble.com> wrote:

> @Override
> protected Component newAvailableHeader(String componentId) {
> return new AvailableHeaderPanel(componentId, form);
> }
>
> Where AvailableHeaderPanel is your own panel.
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: grazia [mailto:[hidden 
> email]]
>
> Sent: Monday, March 11, 2013 11:54 AM
> To: [hidden email] 
> Subject: DropDown in palette's header ?
>
> Hi,
>
> is there a way to place a dropdown inside the selected header of a palette
> ?
>
> Thanks
>
>
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
> 57163.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>  ~ Thank you,
> p...@bors.ws
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657166.html
>  To unsubscribe from DropDown in palette's header ?, click 
> here
> .
> NAML
>




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657168.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: DropDown in palette's header ?

2013-03-11 Thread Paul Bors
Sorry, you wanted inside the selected header... same thing only a different
override.
Look up the API of the Palette.

~ Thank you,
  Paul Bors

-Original Message-
From: Paul Bors [mailto:p...@bors.ws] 
Sent: Monday, March 11, 2013 12:25 PM
To: users@wicket.apache.org
Subject: RE: DropDown in palette's header ?

@Override
protected Component newAvailableHeader(String componentId) {
return new AvailableHeaderPanel(componentId, form); }

Where AvailableHeaderPanel is your own panel.

~ Thank you,
  Paul Bors

-Original Message-
From: grazia [mailto:grazia.russolass...@gmail.com]
Sent: Monday, March 11, 2013 11:54 AM
To: users@wicket.apache.org
Subject: DropDown in palette's header ?

Hi, 

is there a way to place a dropdown inside the selected header of a palette ?

Thanks



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
57163.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: DropDown in palette's header ?

2013-03-11 Thread Paul Bors
@Override
protected Component newAvailableHeader(String componentId) {
return new AvailableHeaderPanel(componentId, form);
}

Where AvailableHeaderPanel is your own panel.

~ Thank you,
  Paul Bors

-Original Message-
From: grazia [mailto:grazia.russolass...@gmail.com] 
Sent: Monday, March 11, 2013 11:54 AM
To: users@wicket.apache.org
Subject: DropDown in palette's header ?

Hi, 

is there a way to place a dropdown inside the selected header of a palette ?

Thanks



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
57163.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: wiquery ResizableBehavior weird results on stop

2013-03-11 Thread Pieter Claassen
Ok, I can confirm that the request URI contains the wrong (old parameters).
Below is a request URI I get after resizing the window to max width (note
the width here is 4px while the real panel is 800px).

Could this be that I have some dud JS floating around that is messing this
up?

wicket/page?140-1.IBehaviorListener.1-templateeditdetailpanel-questionrenderpanel-container-rows-0-row-0-question-holder&eventName=stop&resizeHeight=29&resizeWidth=4&_=1363018206108

This is what I have loaded ito ajax libraries in my header.

[image: Inline image 1]

Regards,
Pieter

On Mon, Mar 11, 2013 at 5:34 PM, Pieter Claassen  wrote:

> Ernesto,
>
> This is very strange. When I use your snapshot code in a quickstart
> project, it functions fine. But when I include it in my project, I always
> get the old x and y values (of one resize ago) in my callback.
>
> Can you think of any reason why this would be happening? Could this be an
> issue with the javascript code? I see my wicket ajax debug window does not
> show my function parameters being used in the call so I can't see if it is
> JS or wicket issue. How do I start to debug this?
>
> Regards,
> Pieter
>
>
> On Sun, Mar 10, 2013 at 10:02 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Pieter,
>>
>> Can you create a quickstart or "something" I can give it a try? Or give it
>> a try to what I have added to wiquery: test panel I have created there
>> seems to be working fine. If those changes work fine for you I can as
>> other
>> team member to roll out a new version of wiquery next week;-)
>>
>> On Sun, Mar 10, 2013 at 8:56 AM, Pieter Claassen 
>> wrote:
>>
>> > Ernesto,
>> >
>> > Ok, I implemented your changes but something very strange is happening.
>> In
>> > my callback, I get the resizeHeight and resizeWidth values of the
>> previous
>> > window resize event, not the current one.
>> >
>> > I don't really know how to debug this other than drag the window smaller
>> > and larger and checking whether the values increase or decrease.
>> >
>> > Any suggestion for how to debug this?
>> >
>> > Regards,
>> > Pieter
>> >
>> >
>> >
>> > On Sat, Mar 9, 2013 at 4:56 PM, Ernesto Reinaldo Barreiro <
>> > reier...@gmail.com> wrote:
>> >
>> > > Pieter,
>> > >
>> > > I have just fixed wiquery to support the stop event. See commit
>> > >
>> > >
>> > >
>> >
>> https://github.com/WiQuery/wiquery/commit/c2e8242c9d1aba9ae64f7c67654e0e6539d36b78
>> > >
>> > > On problem there is that parameter coming form client are float
>> values. I
>> > > have added a test panel and ResizableStopAjaxBehavior seems to be
>> working
>> > > as expected.
>> > >
>> > > Hope this helps.
>> > >
>> > > Cheers.
>> > >
>> > > Ernesto
>> > >
>> > >
>> > > On Sat, Mar 9, 2013 at 2:55 PM, Pieter Claassen 
>> > > wrote:
>> > >
>> > > > I am still only interested in getting the size of a component on
>> resize
>> > > > stop.
>> > > >
>> > > > Below is my code that I use to try and implement a call back to only
>> > call
>> > > > on "stop". However, the x and y sizes I get are all over the place.
>> Not
>> > > at
>> > > > all corresponding with the window sizes I actually see when
>>  resizing.
>> > > >
>> > > > I am using wiquery 6.2.0 and wicket 6.5.0.
>> > > >
>> > > > Any advice as to what I am doing wrong?
>> > > >
>> > > > Regards,
>> > > > Pieter
>> > > >
>> > > > MyResizableBehavior resizableBehavior = new
>> > > MyResizableBehavior();
>> > > > resizableBehavior.setStopEvent(new
>> > > > MyResizableBehavior.AjaxResizeStopCallback() {
>> > > > @Override
>> > > > protected void resize(AjaxRequestTarget target,
>> Component
>> > > > source, int resizeHeight, int resizeWidth) {
>> > > > AdvancedFormatter advancedFormatter =
>> > > > questionBaseWebModel.getEntity().getStatement().getFormatter();
>> > > > advancedFormatter.setWidth((float) resizeWidth /
>> 800 *
>> > > > 100);
>> > > > advancedFormatter.setHeight((float) resizeHeight);
>> > > > System.out.println("Width:"+resizeWidth+"
>> > > > Height:"+resizeHeight);
>> > > > advancedFormatterFactory.save(advancedFormatter);
>> > > > }
>> > > >
>> > > > });
>> > > >
>> > > > resizableBehavior.setAutoHide(true).setGhost(true).setAnimate(true);
>> > > > resizableBehavior.setGrid(50, 50);
>> > > >
>> > > > 
>> > > >
>> > > > public class MyResizableBehavior extends ResizableBehavior {
>> > > > public abstract static class AjaxResizeStopCallback extends
>> > > > AbstractAjaxEventCallback
>> > > > {
>> > > > private static final long serialVersionUID = 1L;
>> > > >
>> > > > public AjaxResizeStopCallback()
>> > > > {
>> > > > super("stop");
>> > > > }
>> > > >
>> > > > @Override
>> > > > protected List getExtraParameters()
>> > > > {
>> > > > List ret =
>> super.getExtraParameters();
>> > > > ret.add(Ca

Re: Does page know it was loaded with back button ?

2013-03-11 Thread armandoxxx
Hey .. 

my use case is actually very simple ... 

I have a page with charts .. and by pressing on chart point you get
redirected to another page with search results .. 
but there's a catch ... pages share search parameters .. which means by
selecting search parameters on one page, another page shows data for those
selected search parameters. 
So i thought I'd just cache my search params and ask if
(page.isCalledWithBackButton()) then load those search params ... 

but hey .. I think version will be fine ;) 

Regards

Armando









--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Does-page-know-it-was-loaded-with-back-button-tp4657158p4657162.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: Does page know it was loaded with back button ?

2013-03-11 Thread Martin Grigorov
Hi,

No. This is just a normal request that contains the page version/id in the
url, e.g. some/url?3 - Wicket will load page with id==3 from the disk
store.
What is the use case ? Maybe there is another solution.


On Mon, Mar 11, 2013 at 4:26 PM, armandoxxx wrote:

> Hey
>
> Is there a way to know that page was loaded with pressing back button ?
>
> regards
>
> Armando
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Does-page-know-it-was-loaded-with-back-button-tp4657158.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 


Re: wiquery ResizableBehavior weird results on stop

2013-03-11 Thread Pieter Claassen
Ernesto,

This is very strange. When I use your snapshot code in a quickstart
project, it functions fine. But when I include it in my project, I always
get the old x and y values (of one resize ago) in my callback.

Can you think of any reason why this would be happening? Could this be an
issue with the javascript code? I see my wicket ajax debug window does not
show my function parameters being used in the call so I can't see if it is
JS or wicket issue. How do I start to debug this?

Regards,
Pieter

On Sun, Mar 10, 2013 at 10:02 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Pieter,
>
> Can you create a quickstart or "something" I can give it a try? Or give it
> a try to what I have added to wiquery: test panel I have created there
> seems to be working fine. If those changes work fine for you I can as other
> team member to roll out a new version of wiquery next week;-)
>
> On Sun, Mar 10, 2013 at 8:56 AM, Pieter Claassen 
> wrote:
>
> > Ernesto,
> >
> > Ok, I implemented your changes but something very strange is happening.
> In
> > my callback, I get the resizeHeight and resizeWidth values of the
> previous
> > window resize event, not the current one.
> >
> > I don't really know how to debug this other than drag the window smaller
> > and larger and checking whether the values increase or decrease.
> >
> > Any suggestion for how to debug this?
> >
> > Regards,
> > Pieter
> >
> >
> >
> > On Sat, Mar 9, 2013 at 4:56 PM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Pieter,
> > >
> > > I have just fixed wiquery to support the stop event. See commit
> > >
> > >
> > >
> >
> https://github.com/WiQuery/wiquery/commit/c2e8242c9d1aba9ae64f7c67654e0e6539d36b78
> > >
> > > On problem there is that parameter coming form client are float
> values. I
> > > have added a test panel and ResizableStopAjaxBehavior seems to be
> working
> > > as expected.
> > >
> > > Hope this helps.
> > >
> > > Cheers.
> > >
> > > Ernesto
> > >
> > >
> > > On Sat, Mar 9, 2013 at 2:55 PM, Pieter Claassen 
> > > wrote:
> > >
> > > > I am still only interested in getting the size of a component on
> resize
> > > > stop.
> > > >
> > > > Below is my code that I use to try and implement a call back to only
> > call
> > > > on "stop". However, the x and y sizes I get are all over the place.
> Not
> > > at
> > > > all corresponding with the window sizes I actually see when
>  resizing.
> > > >
> > > > I am using wiquery 6.2.0 and wicket 6.5.0.
> > > >
> > > > Any advice as to what I am doing wrong?
> > > >
> > > > Regards,
> > > > Pieter
> > > >
> > > > MyResizableBehavior resizableBehavior = new
> > > MyResizableBehavior();
> > > > resizableBehavior.setStopEvent(new
> > > > MyResizableBehavior.AjaxResizeStopCallback() {
> > > > @Override
> > > > protected void resize(AjaxRequestTarget target, Component
> > > > source, int resizeHeight, int resizeWidth) {
> > > > AdvancedFormatter advancedFormatter =
> > > > questionBaseWebModel.getEntity().getStatement().getFormatter();
> > > > advancedFormatter.setWidth((float) resizeWidth / 800
> *
> > > > 100);
> > > > advancedFormatter.setHeight((float) resizeHeight);
> > > > System.out.println("Width:"+resizeWidth+"
> > > > Height:"+resizeHeight);
> > > > advancedFormatterFactory.save(advancedFormatter);
> > > > }
> > > >
> > > > });
> > > >
> > > > resizableBehavior.setAutoHide(true).setGhost(true).setAnimate(true);
> > > > resizableBehavior.setGrid(50, 50);
> > > >
> > > > 
> > > >
> > > > public class MyResizableBehavior extends ResizableBehavior {
> > > > public abstract static class AjaxResizeStopCallback extends
> > > > AbstractAjaxEventCallback
> > > > {
> > > > private static final long serialVersionUID = 1L;
> > > >
> > > > public AjaxResizeStopCallback()
> > > > {
> > > > super("stop");
> > > > }
> > > >
> > > > @Override
> > > > protected List getExtraParameters()
> > > > {
> > > > List ret = super.getExtraParameters();
> > > > ret.add(CallbackParameter.resolved("resizeHeight",
> > > > ResizableBehavior.UI_SIZE
> > > > + ".height"));
> > > > ret.add(CallbackParameter.resolved("resizeWidth",
> > > > ResizableBehavior.UI_SIZE + ".width"));
> > > > return ret;
> > > > }
> > > >
> > > > @Override
> > > > public final void call(AjaxRequestTarget target, Component
> > > source)
> > > > {
> > > > IRequestParameters req =
> > > > RequestCycle.get().getRequest().getRequestParameters();
> > > >
> > > > int resizeHeight =
> > > > req.getParameterValue("resizeHeight").toInt(-1);
> > > > int resizeWidth =
> > > > req.getParameterValue("resizeWidth").toInt(-1);
> > > > resize(target, source, resizeHe

Re: FormComponentPanel / counterpart of convertInput() ?

2013-03-11 Thread Sven Meier

You should set up your nested components with appropriate models.
See DateTimeField for inspirations.

Regards
Sven


On 03/11/2013 04:16 PM, Patrick Davids wrote:

Hi all,
I'm implementing a FormComponent which devides Date from Time in two
input fields.

It results in a simple Date Object... due to the method convertInput().
Works so far...

But how to fill/load the FormComponent fields by Date on init?

I'm looking for the counterpart of convertInput(), something like
convertToString() or convertToFields() where I can fill my input fields
by deviding my Date Object manually.

(a bit like a IConverter implementation)

kind regards
Patrick
-
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



FormComponentPanel / counterpart of convertInput() ?

2013-03-11 Thread Patrick Davids
Hi all,
I'm implementing a FormComponent which devides Date from Time in two 
input fields.

It results in a simple Date Object... due to the method convertInput().
Works so far...

But how to fill/load the FormComponent fields by Date on init?

I'm looking for the counterpart of convertInput(), something like 
convertToString() or convertToFields() where I can fill my input fields 
by deviding my Date Object manually.

(a bit like a IConverter implementation)

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



Re: Wicket 6 Migration (ITestPanelSource and ITestPageSource)

2013-03-11 Thread Martin Grigorov
Hi,


On Mon, Mar 11, 2013 at 3:15 PM, ramin  wrote:

> Thanks for the reply.
>
> I am very new to Wicket so please accept my apologies for being a bit
> confused.
>
> Say in a class I have:
>
> WicketTester t = getTester();
> t.startComponentInPage( myMethod() );
>
> and in a super class I have:
>
> ITestPanelSource myMethod(){
>
>return new ITestPanelSource() {
>
> @Override
> public Panel getTestPanel(String panelId) {
> try {
> setPanel(createPanel(panelId));
> return getPanel();
> } catch (Exception e) {
> e.printStackTrace();
> fail(e.toString());
> }
> return null;
> }
> };
> }
>
> Are you saying I should replace ITestPanelSource with Panel?
>

Yes.
tester.startComponentInPage(MyPanel.class)
or
tester.startComponentInPage(new MyPanel("theId", another, arguments))


>
> Many thanks
> Ramin
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146p4657150.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 


Re: Wicket 6 Migration (ITestPanelSource and ITestPageSource)

2013-03-11 Thread ramin
Thanks for the reply.

I am very new to Wicket so please accept my apologies for being a bit
confused.
 
Say in a class I have:

WicketTester t = getTester();  
t.startComponentInPage( myMethod() );

and in a super class I have:

ITestPanelSource myMethod(){

   return new ITestPanelSource() {

@Override
public Panel getTestPanel(String panelId) {
try {
setPanel(createPanel(panelId));
return getPanel();
} catch (Exception e) {
e.printStackTrace();
fail(e.toString());
}
return null;
}
};
}

Are you saying I should replace ITestPanelSource with Panel?

Many thanks
Ramin



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146p4657150.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 Migration (ITestPanelSource and ITestPageSource)

2013-03-11 Thread Martin Grigorov
Hi,

Those were deprecated in 1.5 and completely removed in 6.0.
The replacement is #startComponentInPage().
All you have to do is to pass the panel class or instance to this new
method. Wicket will create a Page for the test for you.


On Mon, Mar 11, 2013 at 2:25 PM, ramin  wrote:

> Hi
>
> What has ITestPanelSource and ITestPageSource been replaced with in Wicket
> 6?
>
> I have a few methods (in 1.5) that return these types and don't know what
> to
> replace them with.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146.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 


Wicket 6 Migration (ITestPanelSource and ITestPageSource)

2013-03-11 Thread ramin
Hi

What has ITestPanelSource and ITestPageSource been replaced with in Wicket
6?

I have a few methods (in 1.5) that return these types and don't know what to
replace them with.

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Migration-ITestPanelSource-and-ITestPageSource-tp4657146.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: atmosphere: urls erased from response

2013-03-11 Thread Martin Grigorov
Hi,

This is a known bug in Atmosphere.
https://github.com/Atmosphere/atmosphere/issues/949
https://issues.apache.org/jira/browse/WICKET-5084

I think you can use the previous version of wicket-atmosphere until the fix
is incorporated.


On Sun, Mar 10, 2013 at 4:46 PM, Martin Geisse
wrote:

> Hi,
>
> sorry if this mail arrives twice, but the mailing list seems to have
> dropped the first one.
>
> I'm having problems with wicket-atmosphere. It seems like the various
> urlFor() methods return null when called from the "artificial" request
> cycle that gets triggered by EventBus.post(Object). Specifically, I have
> traced down the problem to be encodeUrl() returning null in such a case,
> which I *think* comes from the fake HttpServletResponse defined at the top
> of AtmosphereResponse. That class seems to be lacking other important
> methods as well.
>
> I was able to reproduce the problem in the example from
> https://github.com/papegaaij/wicket-atmosphere-quickstart -- just add a
> Link with an empty onClick() handler to the page,
> setOutputMarkupId(true) and re-render the link in the subscribed methods.
> The link will appear correctly on the page when it is first requested, but
> the href attribute turns to nothing (null) when the link gets re-rendered.
>
> As far as I can tell, Atmosphere uses WebSockets in my experiment.
>
> So far I have been unsuccessful in building a workaround. Atmosphere seems
> to be especially stubborn about using that fake HttpServletResponse
> implementation, even though it is missing all important features. The
> wicket-atmosphere module isn't easily modified either -- both
> AtmosphereWebResponse and the relevant methods in EventBus are private.
> Short of actually building my own modified version of it, I can't seem to
> make it work.
>
> Any ideas?
>
> Greetings,
> Martin Geisse




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


Re: NumberTextField Issue

2013-03-11 Thread Martin Grigorov
Hi,


On Sun, Mar 10, 2013 at 9:38 PM, William Speirs  wrote:

> I'm trying to use a NumberTextField with a type of Double and the form will
> only let me type in integers (or doubles that end in .0). Is this a known
> issue? Is there a workaround?
>

Can you explain more ? I don't remember having such restrictions when I
used NTF.
Which browser do you use ?
Can you create a plain HTML file (without using Wicket) and try to use
 with a double with higher precision ?


>
> My basic code...
>
> *Java*
> private IModel doubleModel;
>
> final NumberTextField d = new NumberTextField("d",
> doubleModel, Double.class);
>
> d.setMinimum(1.0d);
> d.setMaximum(1000.0d);
> d.setRequired(true);
>
> form.add(d);
>
> *HTML*
>
>   
> Double
> 
>   
> 
>   
>
>
> Am I using the wrong component or HTML input type or something? Every time
> I type in a number like 5.5 and try to submit the form I get the pop-up
> that say, "Invalid value."
>
> Thoughts?
>
> Thanks...
>
> Bill-
>



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


Re: ThreadLocal with ajax

2013-03-11 Thread Martin Grigorov
Hi,

#onBeforeRender() is called only for the components which are added to the
AjaxRequestTarget.

What you need is #onEvent(). For each Ajax request an event is broadcasted
for the page and all components and behaviors inside it with an event which
payload is AjaxRequestTarget.

For example:

@Override public void onEvent(Event event) {
   Object payload = event.getPayload();
   if (payload instanceof AjaxRequestTarget) {
 // do your stuff here
   }

}




On Mon, Mar 11, 2013 at 10:40 AM, Ann Baert  wrote:

> Hi,
>
> Is their anything on the page that is triggered when an ajaxcall has
> happened?
> The onBeforeRenderer of the page is not called when their was an ajaxcall.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ThreadLocal-with-ajax-tp4657018p4657141.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 


Re: ThreadLocal with ajax

2013-03-11 Thread Ann Baert
Hi,

Is their anything on the page that is triggered when an ajaxcall has
happened?
The onBeforeRenderer of the page is not called when their was an ajaxcall.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ThreadLocal-with-ajax-tp4657018p4657141.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