Re: AjaxButton in Wicket 6.0

2012-06-04 Thread Martin Grigorov
Hi,

As Vineet said there is a link in the migration page to a more
detailed page about how Ajax works in Wicket 6.

Since there is no script to decorate (because we don't use inline
attributes anymore but event registration) the old AjaxCallDecorator
is removed.
The new way is:

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
   super.updateAjaxAttributes(attributes);

   AjaxCallListener listener = new AjaxCallListener();
   listener.onPrecondition(yourConfirmLogicHere);
   attributes.getAjaxCallListeners().add(listener);
}

On Mon, Jun 4, 2012 at 12:26 AM, vineet semwal
vineetsemwal1...@gmail.com wrote:
 Hi,
 decorator is replaced with iajaxcallistener ,take a look at wicket 6 
 migration ,
 after that override updateAjaxAttributes(AjaxRequestAttributes
 attributes)  in your ajaxbutton and add your ajaxCallListener in
 attributes.getAjaxCallListeners()


 On Mon, Jun 4, 2012 at 2:24 AM, Michal Margiel michal.marg...@gmail.com 
 wrote:
 Hello,
 Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2
 One of the problems is that *getAjaxCallDecorator* method was removed from *
 AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find how
 I can replace its functionality.

 In 1.5 we use this metthod to add JavaScript showing popup window in which
 user can confirm/cancel his/her action.


 [1]  https://bitbucket.org/margielm/confitura/
 [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html

 --
 Pozdrawiam/Best regards
 Michał Margiel

 http://www.confitura.pl (dawniej Javarsovia)
 http://www.linkedin.com/in/MichalMargiel



 --
 thank you,

 regards,
 Vineet Semwal

 -
 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: AjaxButton in Wicket 6.0

2012-06-04 Thread Michal Margiel
Thanks a lot.

2012/6/4 Martin Grigorov mgrigo...@apache.org

 Hi,

 As Vineet said there is a link in the migration page to a more
 detailed page about how Ajax works in Wicket 6.

 Since there is no script to decorate (because we don't use inline
 attributes anymore but event registration) the old AjaxCallDecorator
 is removed.
 The new way is:

 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
   super.updateAjaxAttributes(attributes);

   AjaxCallListener listener = new AjaxCallListener();
   listener.onPrecondition(yourConfirmLogicHere);
   attributes.getAjaxCallListeners().add(listener);
 }

 On Mon, Jun 4, 2012 at 12:26 AM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
  Hi,
  decorator is replaced with iajaxcallistener ,take a look at wicket 6
 migration ,
  after that override updateAjaxAttributes(AjaxRequestAttributes
  attributes)  in your ajaxbutton and add your ajaxCallListener in
  attributes.getAjaxCallListeners()
 
 
  On Mon, Jun 4, 2012 at 2:24 AM, Michal Margiel michal.marg...@gmail.com
 wrote:
  Hello,
  Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2
  One of the problems is that *getAjaxCallDecorator* method was removed
 from *
  AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find
 how
  I can replace its functionality.
 
  In 1.5 we use this metthod to add JavaScript showing popup window in
 which
  user can confirm/cancel his/her action.
 
 
  [1]  https://bitbucket.org/margielm/confitura/
  [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html
 
  --
  Pozdrawiam/Best regards
  Michał Margiel
 
  http://www.confitura.pl (dawniej Javarsovia)
  http://www.linkedin.com/in/MichalMargiel
 
 
 
  --
  thank you,
 
  regards,
  Vineet Semwal
 
  -
  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




-- 
Pozdrawiam/Best regards
Michał Margiel

http://www.confitura.pl (dawniej Javarsovia)
http://www.linkedin.com/in/MichalMargiel
http://www.margiel.eu


CSS3, PIE behavior and image resources

2012-06-04 Thread Dirk Forchel
Hi,
we have to use PIE (see  http://css3pie.com/ http://css3pie.com/ ) to make
IE7 and IE8 capable of rendering CSS3 decoration features. We use a shared
resource mount to have an absolute URL in our CSS file (see also 
https://issues.apache.org/jira/browse/WICKET-3046
https://issues.apache.org/jira/browse/WICKET-3046 ).



This works fine. 
But CSS3 allows web designers to specify multiple background images for box
elements, using nothing more than a simple comma-separated list. This works
for e.g. Firefox and IE9 but not for IE7 and IE8. Therefore we want to us
the PIE behavior and the /-pie-background/ attribute.

*There are two main issues related to relative paths in CSS:*

*The beahvior URL*

IE interprets the URL for the behavior property relative to the source HTML
document, rather than relative to the CSS file like every other CSS
property. This makes invoking the PIE behavior inconvenient, because the URL
has to either be:
1. absolute from the domain root (this makes the CSS not easily moveable
between directories) or
2. realtive to the HTML document (this makes the CSS not easily reusable
between different HTML files)
We went for the first solution as our CSS is global for the application.

*URLs in PIE-interpreted CSS properties*

PIE does not parse the CSS stylesheets, it lets IE handle the parsing,
selector querying, cascading, etc. and then simply asks it for the resulting
property values. This means that when PIE gets a property value, it has no
knowledge of the context from which that value originated.
As a result, for properties which contain URL values (such as border-image
or -pie-background), PIE cannot resolve those URLs relative to the CSS file
in which they appear. 

The PIE documentation says: /It resolves them instead relative to the
JavaScript execution context, which is the location of the source HTML
document./.
But as far as I know, in Wicket the image URLs within a CSS resource are
interpreted relative to the resource. And this seems to be our problem
finding image resources.


I fiddled around with this problem a whole day but got no proper solution
(It's not a solution for us to put the CSS file and the images in the web
root container).
Does anybody have a solution for our problem? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699.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: CSS3, PIE behavior and image resources

2012-06-04 Thread Martin Grigorov
Hi,

You can use org.apache.wicket.request.UrlRenderer#renderRelativeUrl(Url)
to render relative url to your special resource.
As a parameter use org.apache.wicket.request.UrlRenderer#getBaseUrl()
which should return the current page's url.

On Mon, Jun 4, 2012 at 10:08 AM, Dirk Forchel dirk.forc...@exedio.com wrote:
 Hi,
 we have to use PIE (see  http://css3pie.com/ http://css3pie.com/ ) to make
 IE7 and IE8 capable of rendering CSS3 decoration features. We use a shared
 resource mount to have an absolute URL in our CSS file (see also
 https://issues.apache.org/jira/browse/WICKET-3046
 https://issues.apache.org/jira/browse/WICKET-3046 ).



 This works fine.
 But CSS3 allows web designers to specify multiple background images for box
 elements, using nothing more than a simple comma-separated list. This works
 for e.g. Firefox and IE9 but not for IE7 and IE8. Therefore we want to us
 the PIE behavior and the /-pie-background/ attribute.

 *There are two main issues related to relative paths in CSS:*

 *The beahvior URL*

 IE interprets the URL for the behavior property relative to the source HTML
 document, rather than relative to the CSS file like every other CSS
 property. This makes invoking the PIE behavior inconvenient, because the URL
 has to either be:
 1. absolute from the domain root (this makes the CSS not easily moveable
 between directories) or
 2. realtive to the HTML document (this makes the CSS not easily reusable
 between different HTML files)
 We went for the first solution as our CSS is global for the application.

 *URLs in PIE-interpreted CSS properties*

 PIE does not parse the CSS stylesheets, it lets IE handle the parsing,
 selector querying, cascading, etc. and then simply asks it for the resulting
 property values. This means that when PIE gets a property value, it has no
 knowledge of the context from which that value originated.
 As a result, for properties which contain URL values (such as border-image
 or -pie-background), PIE cannot resolve those URLs relative to the CSS file
 in which they appear.

 The PIE documentation says: /It resolves them instead relative to the
 JavaScript execution context, which is the location of the source HTML
 document./.
 But as far as I know, in Wicket the image URLs within a CSS resource are
 interpreted relative to the resource. And this seems to be our problem
 finding image resources.


 I fiddled around with this problem a whole day but got no proper solution
 (It's not a solution for us to put the CSS file and the images in the web
 root container).
 Does anybody have a solution for our problem?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699.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



Apache Wicket 1.5.7 is released

2012-06-04 Thread Martin Grigorov
This is the seventh maintenance release of the Wicket 1.5.x series. This
release brings over 26 bug fixes and improvements.

Git tag:
release/wicket-1.5.7

Changelog:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12321241

Maven:
dependency
 groupIdorg.apache.wicket/groupId
 artifactIdwicket-core/artifactId
 version1.5.7/version
/dependency


Download the full distribution (including source):
http://www.apache.org/dyn/closer.cgi/wicket/1.5.7

The Wicket team

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



Re: CSS3, PIE behavior and image resources

2012-06-04 Thread Dirk Forchel
Hi Martin,
actually I don't get it. How should I use
org.apache.wicket.request.UrlRenderer within a CSS file?
At the moment I prepare a quickstart application for our problem. Maybe this
helps to get an impression how it should work.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699p4649703.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: CSS3, PIE behavior and image resources

2012-06-04 Thread Martin Grigorov
Load this .css file with (Package)TextTemplate and substitute a
placeholder for the url.

On Mon, Jun 4, 2012 at 10:16 AM, Dirk Forchel dirk.forc...@exedio.com wrote:
 Hi Martin,
 actually I don't get it. How should I use
 org.apache.wicket.request.UrlRenderer within a CSS file?
 At the moment I prepare a quickstart application for our problem. Maybe this
 helps to get an impression how it should work.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699p4649703.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: Conditional Popup

2012-06-04 Thread hfriederichs
No suggestions? Anyone?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649706.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: Conditional Popup

2012-06-04 Thread Thomas Götz
What about the AjaxLink alternative I already suggested?

   -Tom


On 04.06.2012 at 09:35 hfriederichs wrote:

 No suggestions? Anyone?


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



Re: Conditional Popup

2012-06-04 Thread hfriederichs

Thomas Götz-2 wrote
 
 As an alternative, you could use an AjaxLink and push the popup-opener JS
 to teh frontend, then you could have your decision logic (wether to open
 it or not) in the backend (Wicket layer).

 

But, how would you do that?

if  (condition) {
   info(Do this first);
} else {
   activate JS-popup-opener 
}

And furthermore, I need to pass data to the popup-page, so I would have to
stick that in the Session?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649708.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: Conditional Popup

2012-06-04 Thread Thomas Götz
On 04.06.2012 at 13:21 hfriederichs wrote:

 
 Thomas Götz-2 wrote
 
 As an alternative, you could use an AjaxLink and push the popup-opener JS
 to teh frontend, then you could have your decision logic (wether to open
 it or not) in the backend (Wicket layer).
 
 
 
 But, how would you do that?
 
 if  (condition) {
   info(Do this first);
 } else {
   activate JS-popup-opener 
 }

Yes, this would be a possible solution, maybe something like that:

AjaxLink link = new AjaxLink(link) {
@Override
public void onClick(AjaxRequestTarget target) {
if (condition) {
info(...);
// target.add(feedbackPanel);
} else {
target.appendJavaScript(Wicket.$(' + myPopup.getMarkupId() + 
').open(););
}
}
};
add(link);


 And furthermore, I need to pass data to the popup-page, so I would have to
 stick that in the Session?

You could also pass a model to the Page's constructor e.g.

Cheers,
   -Tom


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



Re: wicket ajax push

2012-06-04 Thread Douglas Ferguson
Yeah.. I was looking at both of those.

I was curious if anybody had any anecdotal or empirical evidence supporting 
either approach.

The client is currently using a polling approach and I have some concerns about 
wasted resources.
Also, the deadline is a little tight, so I'm not sure if I want to risk 
uncharted territory.

Douglas

On May 31, 2012, at 3:07 AM, heapifyman wrote:

 If you are looking for examples, wicketstuff has a push module (
 https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/push-parent),
 atmosphere examples also contain a wicket example (
 https://github.com/Atmosphere/atmosphere/tree/master/samples) and the just
 released wicket 6 beta2 comes with a wicket-atmosphere module (
 http://wicket.apache.org/2012/05/29/wicket-6.0.0-beta2-released.html)
 
 
 2012/5/30 Douglas Ferguson the...@gmail.com
 
 Anybody doing any ajax push stuff using wicket?
 
 Douglas
 
 -
 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



wicket 1.6

2012-06-04 Thread Douglas Ferguson
Is there a projected release date for wicket 1.6?

Just curious because I'm starting a new project and am trying to decide if I 
should start it using 1.6.

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



Re: wicket 1.6

2012-06-04 Thread Martin Grigorov
As soon as people start using it and send feedback ...

On Mon, Jun 4, 2012 at 5:29 PM, Douglas Ferguson the...@gmail.com wrote:
 Is there a projected release date for wicket 1.6?

 Just curious because I'm starting a new project and am trying to decide if I 
 should start it using 1.6.

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




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

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



Re: wicket 1.6

2012-06-04 Thread vineet semwal
as soon as it will be released,people will start using it ;)

On Mon, Jun 4, 2012 at 8:03 PM, Martin Grigorov mgrigo...@apache.org wrote:
 As soon as people start using it and send feedback ...

 On Mon, Jun 4, 2012 at 5:29 PM, Douglas Ferguson the...@gmail.com wrote:
 Is there a projected release date for wicket 1.6?

 Just curious because I'm starting a new project and am trying to decide if I 
 should start it using 1.6.

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




-- 
thank you,

regards,
Vineet Semwal

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



Re: wicket 1.6

2012-06-04 Thread Dan Tran
totally agree with Vineet here.

-D

On Mon, Jun 4, 2012 at 7:59 AM, vineet semwal
vineetsemwal1...@gmail.com wrote:
 as soon as it will be released,people will start using it ;)

 On Mon, Jun 4, 2012 at 8:03 PM, Martin Grigorov mgrigo...@apache.org wrote:
 As soon as people start using it and send feedback ...

 On Mon, Jun 4, 2012 at 5:29 PM, Douglas Ferguson the...@gmail.com wrote:
 Is there a projected release date for wicket 1.6?

 Just curious because I'm starting a new project and am trying to decide if 
 I should start it using 1.6.

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




 --
 thank you,

 regards,
 Vineet Semwal

 -
 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: wicket 1.6

2012-06-04 Thread Martin Grigorov
On Mon, Jun 4, 2012 at 6:25 PM, Dan Tran dant...@gmail.com wrote:
 totally agree with Vineet here.

The problem is that once we release the first Release Candidate it is
not possible (recommended) to make fixes in the APIs.
As far as I know there are no open tickets for bugs in Wicket
6.0.0-beta2 (released in less than a week).
If there are no major problems I guess next release will be RC1. We
will vote about this at dev@ mailing list. Feel free to participate!


 -D

 On Mon, Jun 4, 2012 at 7:59 AM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 as soon as it will be released,people will start using it ;)

 On Mon, Jun 4, 2012 at 8:03 PM, Martin Grigorov mgrigo...@apache.org wrote:
 As soon as people start using it and send feedback ...

 On Mon, Jun 4, 2012 at 5:29 PM, Douglas Ferguson the...@gmail.com wrote:
 Is there a projected release date for wicket 1.6?

 Just curious because I'm starting a new project and am trying to decide if 
 I should start it using 1.6.

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




 --
 thank you,

 regards,
 Vineet Semwal

 -
 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




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



portlet support in 1.5 1.6?

2012-06-04 Thread nino martinez wael
So is there any?

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Thomas Götz
What about this?


public class MyComponent extends Panel {

public MyComponent(String id) {
super(id);
setOutputMarkupId(true);
}

@Override
public void renderHead(IHeaderResponse response) {
response.renderOnDomReadyJavaScript(
$('# + getMarkupId() +  .ttr').tipTip({defaultPosition: 
'right'}););
}

}

   -Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:

 […]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
 […]


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



Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Jürgen Lind

Thomas,

thanks for this hint, didn't know about that... So the script is executed every 
time the
component is updated in an ajax call, correct? If so, it would surely solve 
some of my
issues. For longer scripts, I would still prefer to have them in the markup 
file (might be
different if we had multiline strings in Java, btw)

J.

On 04.06.2012 20:32, Thomas Götz wrote:

What about this?


public class MyComponent extends Panel {

 public MyComponent(String id) {
 super(id);
 setOutputMarkupId(true);
 }

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavaScript(
 $('# + getMarkupId() +  .ttr').tipTip({defaultPosition: 
'right'}););
 }

}

-Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:


[…]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
[…]



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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Martin Grigorov
On Mon, Jun 4, 2012 at 10:01 PM, Jürgen Lind juergen.l...@iteratec.de wrote:
 Thomas,

 thanks for this hint, didn't know about that... So the script is executed
 every time the
 component is updated in an ajax call, correct? If so, it would surely solve

For every rerender of the component. That includes non-Ajax (whole
page) requests as well.

 some of my
 issues. For longer scripts, I would still prefer to have them in the markup
 file (might be
 different if we had multiline strings in Java, btw)

For longer scripts you can create JS helpers like:

in some.js:
var helper = function(selector) {
  // something longer here
}

is Some.java:

response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););


 J.


 On 04.06.2012 20:32, Thomas Götz wrote:

 What about this?


 public class MyComponent extends Panel {

     public MyComponent(String id) {
         super(id);
         setOutputMarkupId(true);
     }

     @Override
     public void renderHead(IHeaderResponse response) {
         response.renderOnDomReadyJavaScript(
                 $('# + getMarkupId() +  .ttr').tipTip({defaultPosition:
 'right'}););
     }

 }

    -Tom


 On 04.06.2012, 19:21 Jürgen Lind wrote:

 […]
      wicket:script
         $(document).ready(function() {
           $(#markupId .ttr).tipTip({defaultPosition: right});
         });
      /wicket:script
 […]



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



 Mit freundlichen Grüßen,

 Jürgen Lind

 --
 Dr. Jürgen Lind
 iteratec GmbH                Fon: +49 (0)89 614551-44
 Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
 82008 Unterhaching           Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


 -
 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: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Jürgen Lind

Thanks Martin,

maybe I should have asked before trying to invent my own stuff... Anyway, 
developing
a new wicket tag was some kind of fun as well...

J.

On 04.06.2012 21:10, Martin Grigorov wrote:

On Mon, Jun 4, 2012 at 10:01 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Thomas,

thanks for this hint, didn't know about that... So the script is executed
every time the
component is updated in an ajax call, correct? If so, it would surely solve


For every rerender of the component. That includes non-Ajax (whole
page) requests as well.


some of my
issues. For longer scripts, I would still prefer to have them in the markup
file (might be
different if we had multiline strings in Java, btw)


For longer scripts you can create JS helpers like:

in some.js:
var helper = function(selector) {
   // something longer here
}

is Some.java:

response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););



J.


On 04.06.2012 20:32, Thomas Götz wrote:


What about this?


public class MyComponent extends Panel {

 public MyComponent(String id) {
 super(id);
 setOutputMarkupId(true);
 }

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavaScript(
 $('# + getMarkupId() +  .ttr').tipTip({defaultPosition:
'right'}););
 }

}

-Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:


[…]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
[…]




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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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








Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Thomas Götz
… or you could put your Javascript code into a template, e.g. like that:


MyComponent.js.tmpl:

$('#${markupId} .ttr').tipTip({defaultPosition: 'right'});

// ... some long Javascript block ….


and in MyComponent.java you'd have:
---
public class MyComponent extends Panel {

public MyComponent(String id) {
super(id);
setOutputMarkupId(true);
}

@Override
public void renderHead(IHeaderResponse response) {
final TextTemplate template = new PackageTextTemplate(
MyComponent.class, MyComponent.js.tmpl);
final MapString, Object variables = new HashMapString, Object();
variables.put(markupId, getMarkupId());
// variables.put(foo, bar);  etc.
response.renderOnDomReadyJavaScript(template.asString(variables));
}

}


   -Tom


On 04.06.2012, 21:10 Martin Grigorov wrote:

 For longer scripts you can create JS helpers like:
 
 in some.js:
 var helper = function(selector) {
  // something longer here
 }
 
 is Some.java:
 
 response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););


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



Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Martin Grigorov
On Mon, Jun 4, 2012 at 10:22 PM, Jürgen Lind juergen.l...@iteratec.de wrote:
 Thanks Martin,

 maybe I should have asked before trying to invent my own stuff... Anyway,
 developing
 a new wicket tag was some kind of fun as well...

I'm glad you have fun but I highly recommend staying away from
IComponentResolver if you can afford that.
Many of the unresolved tickets in Wicket's Jira are related to this.


 J.


 On 04.06.2012 21:10, Martin Grigorov wrote:

 On Mon, Jun 4, 2012 at 10:01 PM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:

 Thomas,

 thanks for this hint, didn't know about that... So the script is executed
 every time the
 component is updated in an ajax call, correct? If so, it would surely
 solve


 For every rerender of the component. That includes non-Ajax (whole
 page) requests as well.

 some of my
 issues. For longer scripts, I would still prefer to have them in the
 markup
 file (might be
 different if we had multiline strings in Java, btw)


 For longer scripts you can create JS helpers like:

 in some.js:
 var helper = function(selector) {
   // something longer here
 }

 is Some.java:

 response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););


 J.


 On 04.06.2012 20:32, Thomas Götz wrote:


 What about this?


 public class MyComponent extends Panel {

     public MyComponent(String id) {
         super(id);
         setOutputMarkupId(true);
     }

     @Override
     public void renderHead(IHeaderResponse response) {
         response.renderOnDomReadyJavaScript(
                 $('# + getMarkupId() + 
 .ttr').tipTip({defaultPosition:
 'right'}););
     }

 }

    -Tom


 On 04.06.2012, 19:21 Jürgen Lind wrote:

 […]
      wicket:script
         $(document).ready(function() {
           $(#markupId .ttr).tipTip({defaultPosition: right});
         });
      /wicket:script
 […]




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



 Mit freundlichen Grüßen,

 Jürgen Lind

 --
 Dr. Jürgen Lind
 iteratec GmbH                Fon: +49 (0)89 614551-44
 Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
 82008 Unterhaching           Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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






 Mit freundlichen Grüßen,

 Jürgen Lind

 --
 Dr. Jürgen Lind
 iteratec GmbH                Fon: +49 (0)89 614551-44
 Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
 82008 Unterhaching           Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

 -
 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: portlet support in 1.5 1.6?

2012-06-04 Thread Michal Margiel
Hello,
I have very, very little experience with portlet (and to be honest I am not
very keen in getting more ;) ).
And I have to surprise you - because I share your opinion about portlets
sand portals. But I noticed lately that corporations like to say that whey
offer portal for their clients and goes into Liferay or something like
that.
It  would be just nice to use wicket in in, but it is not required  - I
agree that maintaining/developing it might  cost more than it is worth.

2012/6/4 Martin Grigorov mgrigo...@apache.org

 Michal,

 Do you have experience with Portlets ?
 Can you explain me what it is good for ? What pure Servlet cannot do
 and Portlet can do or at least can do much simpler ?
 I guess you will say that a Portal can consume Porlets from many
 providers. But I can do the same with plain Servlet, and I personally
 don't know many providers of Portlet services.
 I've looked once or twice at it and I found just limitations.
 The specs always lag 2-3 years after Servlet/JSF specs releases...
 There are some bridges which fill some gaps with the other
 technologies ...

 On Mon, Jun 4, 2012 at 8:01 PM, Michal Margiel michal.marg...@gmail.com
 wrote:
  Hello,
  I know at least 2 projects that really wanted to use Wicket but had to
 drop
  it because of lack of official support for Portals (both of them runs
 on
  Liferay).
  Maybe it would be good to rethink this decision ?
 
  2012/6/4 Dan Retzlaff dretzl...@gmail.com
 
  Nino, this came up last month:
  http://bit.ly/M5Zc2j
 
 http://mail-archives.apache.org/mod_mbox/wicket-users/201205.mbox/%3CCAMomwMoDASEG22Hnb4tWOruZkhfykSRBXS3X3WKDMJFxw+9=z...@mail.gmail.com%3E
  
 
  On Mon, Jun 4, 2012 at 9:07 AM, nino martinez wael 
  nino.martinez.w...@gmail.com wrote:
 
   So is there any?
  
   --
   Best regards / Med venlig hilsen
   Nino Martinez
  
 
 
 
 
  --
  Pozdrawiam/Best regards
  Michał Margiel
 
  http://www.confitura.pl (dawniej Javarsovia)
  http://www.linkedin.com/in/MichalMargiel
  http://www.margiel.eu



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




-- 
Pozdrawiam/Best regards
Michał Margiel

http://www.confitura.pl (dawniej Javarsovia)
http://www.linkedin.com/in/MichalMargiel
http://www.margiel.eu


Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Jürgen Lind

Martin,

ok, I will think about going to one of the ideas Thomas suggested. I still like 
the
idea that I have my javascript only in the markup file and nothing in the Java 
class,
though...

Thanks again,

J.


On 04.06.2012 21:25, Martin Grigorov wrote:

On Mon, Jun 4, 2012 at 10:22 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Thanks Martin,

maybe I should have asked before trying to invent my own stuff... Anyway,
developing
a new wicket tag was some kind of fun as well...


I'm glad you have fun but I highly recommend staying away from
IComponentResolver if you can afford that.
Many of the unresolved tickets in Wicket's Jira are related to this.



J.


On 04.06.2012 21:10, Martin Grigorov wrote:


On Mon, Jun 4, 2012 at 10:01 PM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:


Thomas,

thanks for this hint, didn't know about that... So the script is executed
every time the
component is updated in an ajax call, correct? If so, it would surely
solve



For every rerender of the component. That includes non-Ajax (whole
page) requests as well.


some of my
issues. For longer scripts, I would still prefer to have them in the
markup
file (might be
different if we had multiline strings in Java, btw)



For longer scripts you can create JS helpers like:

in some.js:
var helper = function(selector) {
   // something longer here
}

is Some.java:

response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););



J.


On 04.06.2012 20:32, Thomas Götz wrote:



What about this?


public class MyComponent extends Panel {

 public MyComponent(String id) {
 super(id);
 setOutputMarkupId(true);
 }

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavaScript(
 $('# + getMarkupId() + 
.ttr').tipTip({defaultPosition:
'right'}););
 }

}

-Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:


[…]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
[…]





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




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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








Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

-
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