Re: Recreate Scroll-Position after Paging (click on paging link)

2011-12-26 Thread Martin Grigorov
Hi,

You'll need to add some JavaScript logic to your code to support that.
First add click listener to the navigation link that will extract the
current scroll coordinates and append them in the href.
Then you need to add ondomready listener so that after page's DOM is
ready you can parse the params from the query string and
scrollTo(coords)

With AjaxLink all this is not needed because only the pageable is
replaced and if it has the same size (items number) then there is no
change of the scroll position.

On Fri, Dec 23, 2011 at 4:58 PM, brazz alexander.li...@man.eu wrote:
 I have created a custom paging component with the help of
 org.apache.wicket.markup.html.navigation.paging.PagingNavigation.
 In my PagingNavigator i have paging -links on top and at the bottom of the
 DataView.

 Now, when the user clicks on a link, i want to recreate the scroll-position
 so that the screen does not jump after paging.

 How can i submit the scroll-coordinates to the server when the user clicks
 on a
 org.apache.wicket.markup.html.navigation.paging.PagingNavigationLink which
 is a org.apache.wicket.markup.html.link.Link.

 Is there a way to append the scroll-coordinates as query parameters to a
 org.apache.wicket.markup.html.link.Link or is it only possible with
 Ajax-Links?

 The problem is not the javascript-part of scrolling that already works with
 the help of behaviors.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Recreate-Scroll-Position-after-Paging-click-on-paging-link-tp4228868p4228868.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Overridable css resource

2011-12-26 Thread Martin Grigorov
Hi,

See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
There I used following code for this:

 ResourceReference imagesResourceReference = new ImageResourceReference();
 PageParameters imageParameters = new PageParameters();

 String imageName = anyName.jpg;
 imageParameters.set(name, imageName);
 CharSequence urlForImage =
getRequestCycle().urlFor(imagesResourceReference, imageParameters);
 ExternalLink link = new ExternalLink(link, urlForImage.toString());

I.e. you can create the url as string, then instead of
renderCssResRef() use renderCss(String url)

On Fri, Dec 23, 2011 at 7:54 PM, Serban Balamaci serban.balam...@asf.ro wrote:
 Hi all,
 I'm trying to serve some css files from a custom dir outside the  web dir.
 It should get a little more complicated that I'd want to fallback to serve
 the file from a package location if it's not found in the custom-css folder,
 but let's keep it simple first.

 I've created a class
 public class CustomCssResource extends AbstractResource implements
 IStaticCacheableResource {
    public CustomCssResource(String path) {
        this.path = path;
 }
 ...
 }
 that returns the css file found at path location.

 And public class CustomCssResourceReference extends ResourceReference {
 public CustomCssResourceReference(String name) {
 super(scope, custom-css-dir/ + name);
 }
 public IResource getResource() {
 return new CustomCssResource(name);
 }
 }

 In pages I do something like this:
 response.renderCSSReference(new CustomCssResourceReference(front.css));

 Problem is that I'd want to mount this serving of resources from
 /customcss
 But how should this be done? Because I cannot just do
 app.mountResource(/customcss, new CustomCssResourceReference(???));

 Should I bind as SharedResources all css files instead of using
 CustomCssResourceReference?

 Thanks.

 -
 http://balamaci.wordpress.com
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Overridable-css-resource-tp4229370p4229370.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Control focus on input after a form feedback

2011-12-26 Thread chimaira
hI Sven Meier, Thanks for the trick ,  but that causes other issues.

firts: I use wicket version 1.4.16 and for some raison I can t upgrade to
1.5, and the methode renderHead(IHeaderResponse) is missing. I got only this
one renderHead(HtmlHeaderContainer container) . Note the given argument on
the seconde one (HtmlHeaderContainer  and not   (IHeaderResponse). 

Seconde: my form has more than one input field. how to target to wrong
field. Can I do that by passing variables in  PageParameters ?  because if
feedback is invoked the onSubmit form methode will not be called, then I
can't passe variable in page parameters.

Any idea? 

Thanks in advance
MA



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Control-focus-on-input-after-a-form-feedback-tp4228658p4234482.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: Control focus on input after a form feedback

2011-12-26 Thread Martin Grigorov
Hi,

On Mon, Dec 26, 2011 at 2:23 PM, chimaira death_style2...@hotmail.com wrote:
 hI Sven Meier, Thanks for the trick ,  but that causes other issues.

 firts: I use wicket version 1.4.16 and for some raison I can t upgrade to
 1.5, and the methode renderHead(IHeaderResponse) is missing. I got only this
 one renderHead(HtmlHeaderContainer container) . Note the given argument on
 the seconde one (HtmlHeaderContainer  and not   (IHeaderResponse).

It must be there. Check again.


 Seconde: my form has more than one input field. how to target to wrong
 field. Can I do that by passing variables in  PageParameters ?  because if
 feedback is invoked the onSubmit form methode will not be called, then I
 can't passe variable in page parameters.

In this case you need #onError().
Here just safe a transient reference to the first input field with an
error and use it in renderHead() to do what Sven suggested.


 Any idea?

 Thanks in advance
 MA



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Control-focus-on-input-after-a-form-feedback-tp4228658p4234482.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Job opportunity in Germany

2011-12-26 Thread geissbock
Hi folks,

The department I work at as an architect is currently looking for a talented 
Wicket developer.

We're a company with 5,000 employees located in the south-west of Germany. The 
position is permanent and full-time, and it is required to work on-site, i.e. 
it is currently not possible to work on a contract or remote basis. A good 
command of the German language is definitely a plus, but being a great 
developer is certainly more important ;-)

We are currently developing two new e-commerce/online marketing products with 
Wicket which are about to be launched in the next months. These (and other) 
products will also be enhanced after their launch, which is why we are 
currently setting up cross-functional Scrum teams to be the think tanks in 
these areas.

So, if you are interested or know anyone who might be interested please feel 
free to get in touch with me and I will be glad to tell you some more details.

Cheers,

Michael

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



Re: Overridable css resource

2011-12-26 Thread Serban Balamaci
Hi Martin,
That's a good solution, currently I keep the response.renderCSSReference(new
CustomCssResourceReference(front.css)) but implement a custom
DecoratingHeaderResponse to chose if I return instead of the string the
original packaged css resource in the war file.

DecoratingHeaderResponse 
public void renderCSSReference(ResourceReference reference) {
if(reference.getScope()) and if the css file is available do a
super.renderCSS(reference.getName()) and if not return a new
CssResourceReference(reference.getScope(), reference.getName())


However I was not fully confident about this approach of rendering the css
string, because Wicket cannot apply the caching strategy addition of a
IStaticCacheableResource.

Right now I mounted a that takes the name of the resource from the url.
app.mountResource(/custom/css/${name}, new CustomDirResourceReference());
to solve any requests for /custom/css/front.css

but also have a custom ResourceReferenceRegistry that automatically creates
the ResourceReference for CustomCssResourceReferences:
protected ResourceReferenceRegistry newResourceReferenceRegistry() {
return new ResourceReferenceRegistry() {
@Override
protected ResourceReference
createDefaultResourceReference(ResourceReference.Key key) {
if(key.getScope().equals(CustomCssResource.class.getName()))
{
return new CustomCssResourceReference(key.getName());
}
return super.createDefaultResourceReference(key);
}
};
}

I only need to solve the fact that it mounts it to a package
wicket/resource/com.dada.web.frontend.resource.CustomCssResource/front-ver-1324746271000.css
and not to a nice url perhaps something like
getSharedResources().putClassAlias()

-
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Overridable-css-resource-tp4229370p4235219.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: Modal Window respond 404 with Internet Explorer.

2011-12-26 Thread ashindler
Hi,

I am having the same issue. I went to ticket 4241 and saw that there was a
fix - do I just replace my wicket-extensions-1.5.3.jar file with the
wicket-extensions-mybuild.jar file that I download from the patch zip? I do
this but the problem still remains - modal windows that were working fine in
internet explorer with version 1.4 give me the 404 error when I open them
with 1.5.3

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-Window-respond-404-with-Internet-Explorer-tp4082620p4235276.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



AW: adjust my web application for smartphone like iPhone

2011-12-26 Thread Stefan Lindner
This is a css case. Just query the web for css media query and you will find 
lots of examples for resolution dependant css styling.

-Ursprüngliche Nachricht-
Von: mili [mailto:mili...@yahoo.de] 
Gesendet: Montag, 26. Dezember 2011 17:33
An: users@wicket.apache.org
Betreff: adjust my web application for smartphone like iPhone

I want to adjust my web application for smartphones. have wicket a function, 
who the app can ajust automatically the size of the content.

Thank you for your Help!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adjust-my-web-application-for-smartphone-like-iPhone-tp4235060p4235060.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: AW: adjust my web application for smartphone like iPhone

2011-12-26 Thread David Legg
Using css media queries is not necessarily the correct answer for 
responses to smartphone requests.  Media queries form part of the 
toolkit which comes under the banner of 'Responsive Web'.  The problem 
with media queries on their own is that you may ask a smartphone to 
download a large image and hence incur an expensive phone bill only to 
let the smartphone shrink the downloaded image to fit on the screen.  It 
would have been better to download a smaller image in the first place.


I believe what is needed is something that analyses the browser request 
as it enters the server and different page designs generated according 
to the actual browser device dimensions.


Actually, this very question has been on my mind for a little while and 
I'm glad someone else (Mili) has asked first!


The last time I looked into this the best way of detecting the 
capabilities of the browser  was WURFL: -


  http://wurfl.sourceforge.net/

And to learn a bit more about why media queries are not necessarily the 
best answer: -


  
http://www.delicious.com/redirect?url=http%3A//www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/


Regards,
David Legg


On 26/12/2011 22:33, Stefan Lindner wrote:

This is a css case. Just query the web for css media query and you will find 
lots of examples for resolution dependant css styling.

-Ursprüngliche Nachricht-
Von: mili [mailto:mili...@yahoo.de]
Gesendet: Montag, 26. Dezember 2011 17:33
An: users@wicket.apache.org
Betreff: adjust my web application for smartphone like iPhone

I want to adjust my web application for smartphones. have wicket a function, 
who the app can ajust automatically the size of the content.

Thank you for your Help!


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



Re: AW: adjust my web application for smartphone like iPhone

2011-12-26 Thread Jeff Schneller
There was a posting about this about a year ago in regards to Walmart's mobile 
site.  I believe the best way to handle this is use the idea of localization. 
Basically create localized versions of your pages using the wicket built in 
tools. Instead of basing localization off of country/language use the browser 
type and device type. There are examples to do localization in wicketstuff 
examples. 


On Dec 26, 2011, at 7:32 PM, David Legg david.l...@searchevent.co.uk wrote:

 Using css media queries is not necessarily the correct answer for responses 
 to smartphone requests.  Media queries form part of the toolkit which comes 
 under the banner of 'Responsive Web'.  The problem with media queries on 
 their own is that you may ask a smartphone to download a large image and 
 hence incur an expensive phone bill only to let the smartphone shrink the 
 downloaded image to fit on the screen.  It would have been better to download 
 a smaller image in the first place.
 
 I believe what is needed is something that analyses the browser request as it 
 enters the server and different page designs generated according to the 
 actual browser device dimensions.
 
 Actually, this very question has been on my mind for a little while and I'm 
 glad someone else (Mili) has asked first!
 
 The last time I looked into this the best way of detecting the capabilities 
 of the browser  was WURFL: -
 
  http://wurfl.sourceforge.net/
 
 And to learn a bit more about why media queries are not necessarily the best 
 answer: -
 
  
 http://www.delicious.com/redirect?url=http%3A//www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
 
 Regards,
 David Legg
 
 
 On 26/12/2011 22:33, Stefan Lindner wrote:
 This is a css case. Just query the web for css media query and you will 
 find lots of examples for resolution dependant css styling.
 
 -Ursprüngliche Nachricht-
 Von: mili [mailto:mili...@yahoo.de]
 Gesendet: Montag, 26. Dezember 2011 17:33
 An: users@wicket.apache.org
 Betreff: adjust my web application for smartphone like iPhone
 
 I want to adjust my web application for smartphones. have wicket a function, 
 who the app can ajust automatically the size of the content.
 
 Thank you for your Help!
 
 -
 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: Modal Window respond 404 with Internet Explorer.

2011-12-26 Thread Masaya Seko
Hi,

wicket-extensions-mybuild.jar in WICKET-4241_with_patch1.zip is old.
This file has been patched incomplete.

To check the fix, you need to build and apply the WICKET-4241.patch to 
Wicket1.5.3.

--- On Tue, 2011/12/27, ashindler alexshind...@hotmail.com wrote:

 Hi,
 
 I am having the same issue. I went to ticket 4241 and saw that there was a
 fix - do I just replace my wicket-extensions-1.5.3.jar file with the
 wicket-extensions-mybuild.jar file that I download from the patch zip? I do
 this but the problem still remains - modal windows that were working fine in
 internet explorer with version 1.4 give me the 404 error when I open them
 with 1.5.3
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Modal-Window-respond-404-with-Internet-Explorer-tp4082620p4235276.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