Re: Slides

2009-09-12 Thread Luther Baker
No problem.
http://www.slideshare.net/lutherbaker/wicket-1987659

-Luther


On Fri, Sep 11, 2009 at 11:08 PM, Jeremy Thomerson 
jer...@wickettraining.com wrote:

 Perhaps you could upload them to http://www.slideshare.net/

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Fri, Sep 11, 2009 at 9:54 PM, Luther Baker lutherba...@gmail.com
 wrote:

  I have slides from my Wicket presentation last night here in St. Louis.
  I can't say how helpful they'd be for folks that weren't there but I'd be
  happy to submit them for posting somewhere in the Wicket WIKI pages.
 
  -Luther
 



Re: How to redirect from a ModalWindow

2009-09-12 Thread Vladimir K

Try adding this one to the page markup

script language=javascript type=text/javascript
jQuery(document).ready(function(){
if (typeof Wicket != 'undefined'  
Wicket.Window)
Wicket.Window.unloadConfirmation = 
false;
});
/script


Matthias Keller wrote:
 
 Hi Peter
 
 You would be right as long as it wasn't for a ModalWindow.
 When having an open ModalWindow, wicket seems to register an unload 
 javascript event which - when trying to navigate away from the page (be 
 it by following a link, closing the window etc), displays a confirmation 
 message which you have to accept. I need to avoid that message, but the 
 only way to do that probably is by closing that window first so that the 
 javascript event gets unloaded.
 
 Matt
 
 Peter Ertl wrote:


 throw new RestartResponseException(OtherPage.class)

 window.close() is not needed!


 Am 10.09.2009 um 12:50 schrieb Matthias Keller:

 OtherPage.class


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

 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User 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: Slides

2009-09-12 Thread Michael Mosmann
Hi,

 I have slides from my Wicket presentation last night here in St. Louis.

On Page 20 you write 
  public Object getObject(Component component)
but 
  public Object setObject(Serializable object)
AFAIK 
  getObject(Component component) is deprecated.. use getObject() .. 

(http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket
+models was wrong.. i have fixed it)

If you use wicket 1.4.x, you will benefit from improved model with
generics .. 
  new IModelString()
  {
public String getObject()
{
  ..
}
  ..
  }

mm:)



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



Re: Slides

2009-09-12 Thread Luther Baker
Sweet. Thanks Michael.
I'll fix that now. I'm quite open to suggestions to tighten the deck up so
please don't hesitate to comment.

-Luther



On Sat, Sep 12, 2009 at 3:25 AM, Michael Mosmann mich...@mosmann.de wrote:

 Hi,

  I have slides from my Wicket presentation last night here in St. Louis.

 On Page 20 you write
  public Object getObject(Component component)
 but
  public Object setObject(Serializable object)
 AFAIK
  getObject(Component component) is deprecated.. use getObject() ..

 (http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket
 +models was wrong.. i have fixed it)

 If you use wicket 1.4.x, you will benefit from improved model with
 generics ..
  new IModelString()
  {
public String getObject()
{
  ..
}
  ..
  }

 mm:)



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




Re: RequestCycle().urlFor not work

2009-09-12 Thread Johan Compagner
Which version of wicket do you use?

Why do you need absoluut urls?

On 11/09/2009, Dima Rzhevskiy d...@rzhevskiy.info wrote:
 Sorry, yes, urlFor return correct result.
 toAbsolutePath(final String relativePagePath) do not return result what I
 expected.
  javadoc copy/pasted from toAbsolutePath(final String requestPath, String
 relativePagePath)...

 I undestand that it is nessesary to use toAbsolutePath(final String
 requestPath, String relativePagePath) where requestPath nessesaty take in
 constructor:

 public class X1 extends WebPage {

 private static final Logger LOG = LoggerFactory.getLogger(X1.class);

 public X1(final PageParameters parameters) {

  CharSequence url = getRequestCycle().urlFor(getClass().class, new
 PageParameters());
  final String outerUrl2=
 RequestUtils.toAbsolutePath(url.toString());   //get
  add(new AjaxLink(message){
 @Override
 public void onClick(AjaxRequestTarget ajaxRequestTarget) {
 CharSequence url =
 getRequestCycle().urlFor(X1.class, new PageParameters());
 String url2=
 RequestUtils.toAbsolutePath(outerUrl2, url.toString());
 LOG.info(url=+url);
 LOG.info(url2=+url2);
 }
 });

 }
 }


 But this code look ugly..
 Is better way of obtaining absolute url exists ?

 --
 Rzhevskiy Dmitry


 2009/9/11 Jeremy Thomerson jer...@wickettraining.com

 what is incorrect about those URLs?  they are relative - relative to the
 path you are on.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Fri, Sep 11, 2009 at 10:14 AM, Dima Rzhevskiy d...@rzhevskiy.info
 wrote:

  Hi !
 
  I create simple page X1 with AjaxLink :
  ..
  new AjaxLink(message){
 @Override
 public void onClick(AjaxRequestTarget ajaxRequestTarget) {
 CharSequence url =
  getRequestCycle().urlFor(X1.class, new PageParameters());
 String url2=
  RequestUtils.toAbsolutePath(url.toString());
 LOG.info(url=+url);
 LOG.info(url2=+url2);
 }
 }
  ...
  if I mount page to first  level directory , for example /x1.html
  result is correct:
  url=x1.html
  url2=http://localhost:8080/ctx/x1.html
 
  if I mount page to second level directory /x1/x2.html result incorrect
   url=../x1/x2.html
   url2=http://localhost:8080/x1/x2.html
 
  if i mount ti third level directory /x1/x2/x3.html
   url=../../x1/x2/x3.html
   url2=http://x1/x2/x3.html
 
  Is this bug or I use API incorrectly ?
 
  --
 
  Rzhevskiy Dmitry
 



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



Re: Spring annotations fail to inject into webmodels

2009-09-12 Thread pieter claassen
My abstract basewebmodel constructor from which all my webmodels inherit
marks inself for Spring injection but still no injection takes place. Any
suggestions where I can look?

Can I run the injection in the constructor of an abstract model from which I
inherit all my webmodels? I cannot see why not?

Thanks in advanced.
P



BaseWebModel.java
=
...
public BaseWebModel(Long id) {
this.id = id;
InjectorHolder.getInjector().inject(this);
}

here is an example of my TemplateWebModel that uses @SpringBean to set
TemplateFactory
TemplateWebModel.java
===

...
@SpringBean(name=TemplateFactory)
private TemplateFactory templateFactory;

public TemplateWebModel(Template template) {
super(template);
}



P

On Fri, Sep 11, 2009 at 10:42 AM, jWeekend jweekend_for...@cabouge.comwrote:


 Pieter,

 If you want to use Spring's @Configuarble you'll need to enable Load Time
 Weaving or Complie Time Weaving.

 To use @SpringBean with an object that is not a Wicket Component you need
 to
 InjectorHolder.getInjector().inject(this) on initialisation of your object.

 The benefit of the latter approach is that you do not need to introduce
 weaving and that Wicket will make sure you have a serialisable proxy
 injected.

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket Training and Development
 http://jWeekend.com




 Pieter Claassen wrote:
 
  I am using maven, spring 2.5.6, wicket 1.4 and am trying to inject my
  DAO's
  into my wicket models but I find that Spring just ignores my advice.
 
  My question:
  1. @SpringBean only works on stuff that inherits from Component. What do
 I
  do with things like session and models that don't? I am trying to use
  @Configurable but that is being ignored.
  2. My POM deps are below. What should I pull in to have @Configurable
  working?
  3. BTW. When I comment the bean out of my XML config, then I do get an
  error
  so I am not sure if I am doing something very small wrong?
 
  Thanks.
  Pieter
 
  pom.xml
  ===
  ...
 dependency
  groupIdorg.springframework/groupId
  artifactIdspring-core/artifactId
  version${spring.version}/version
  /dependency
 
  dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-spring/artifactId
  version${wicket.version}/version
!--Same results whether I include or exclude the next session--
exclusions
  exclusion
groupIdorg.springframework/groupId
artifactIdspring/artifactId
  /exclusion
/exclusions
  /dependency
  
 
 
  TemplateWebModel.java
  ==
  .
  @Configurable
  public class TemplateWebModel extends AbstractDataSetWebModelTemplate {
 
  private TemplateFactory templateFactory;
 
  public TemplateFactory getTemplateFactory() {
  return templateFactory;
  }
 
  public void setTemplateFactory(TemplateFactory templateFactory) {
 throw new RuntimeException(REACHED TEMPLATE FACTORY SET); //This
  setter is never run
  //this.templateFactory = templateFactory;
  }
  .
 
  WicketApplicationDefinitition.xml
  ==
 
  ?xml version=1.0 encoding=UTF-8?
  beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:context=http://www.springframework.org/schema/context;
 xsi:schemaLocation=
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-2.5.xsd;
 
  context:annotation-config/
  !--aop:aspectj-autoproxy/--
 
  !-- a bean that supplies my primary application database client --
  bean id=appDataSource class=com.musmato.dao.ApplicationDBFactory
  destroy-method=close
  constructor-arg
  ref bean=appConfig /
  /constructor-arg
  /bean
 
  !-- a bean that supplies a network database client for template uploads
  --
  bean id=rootDataSource class=com.musmato.dao.RootDBFactory
  destroy-method=close
  constructor-arg
  ref bean=appConfig /
  /constructor-arg
  /bean
  .
  bean id=TemplateFactory class=com.musmato.dao.TemplateFactory
  property name=client ref=appDataSource /
  /bean
  
 
 
 
 
 
  --
  Pieter Claassen
  musmato.com
 
 

 --
 View this message in context:
 http://www.nabble.com/Spring-annotations-fail-to-inject-into-webmodels-tp25396625p25397205.html
 Sent from the Wicket - User 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




-- 
Pieter 

Re: CORRECT portlet+spring+hibernate configuration (Two options, what's right?)

2009-09-12 Thread Gonzalo Aguilar Delgado


Hi again! 

I'm really lost on this toppic. It seems to not work. 

First of all. Can someone post a complete configuration of a wicket
portlet + spring, please?

I found several ways to do it but none seems to be correct.

Thank you.



El mar, 18-08-2009 a las 09:53 +0200, nino martinez wael escribió: 

 Happy to help, please see further answers below.
 
 2009/8/17 Gonzalo Aguilar Delgado g...@aguilardelgado.com:
 
 
  I have several suggestions.
 
  The order of the web filters are important. You could also try with
  with the wicket spring managed apps, im not sure how that applies.
 
  Will check. I didn't know about filter order... Will also check it.
  Thanks!
 
 
 
  And are you sure that your filter ( /hibernate/*), get's hit? What's
  your wicket filter url, the same or?
 
 
  No, It's different. Can I set it to just /*? Should I do it that way?
 Well it depends, if the hibernate filter should be activated at the
 same url's as wicket.
 
 I've never had a case where my wicket filter and osiw did not match.
 You might have performance increases if they differ, for example if
 you know that you willl never use hibernate on /myapp/ but always put
 in /myapp/pages/dynamic/*  for pages that use db lookup..
 
  Thank you very much for your answers...
 
 
 
 
  2009/8/17 Gonzalo Aguilar Delgado g...@aguilardelgado.com:
   Ok. Maybe I don't understand...
  
   Let me show the situation. I have Spring + portlet + hibernate config
   with transactions working with the current configuration:
  
   I have my DAO objects under package
   com.level2crm.hibernate.enterprise.dao.contact
   And model under com.level2crm.model
  
   I configured one advice:
  tx:advice id=txAdvice transaction-manager=txManager
  !-- the transactional semantics... --
  tx:attributes
  !-- all methods starting with 'get' are 
   read-only --
  tx:method name=get*  propagation=REQUIRED 
   read-only=true /
  !-- other methods use the default transaction 
   settings (see below)
   --
  tx:method name=*  propagation=REQUIRED / 
   !--
   propagation=SUPPORTS --
  /tx:attributes
  /tx:advice
  
   And several pointcuts:
  aop:config
  aop:pointcut id=allModelOperation 
   expression=execution(*
   com.level2crm.model..*+.*(..))/
  aop:advisor advice-ref=txAdvice
   pointcut-ref=allModelOperation/
  /aop:config
  
  aop:config
  aop:pointcut id=allDAO expression=execution(*
   com.level2crm.hibernate.enterprise.dao..*+.*(..))/
  aop:advisor advice-ref=txAdvice pointcut-ref=allDAO/
  /aop:config
  
  aop:config
  aop:pointcut id=TRG expression=execution(*
   com.trg.dao.hibernate.*+.*(..))/
  aop:advisor advice-ref=txAdvice pointcut-ref=TRG/
  /aop:config
  
   !-- This one does not work --
  aop:config
  aop:pointcut id=portlets expression=execution(*
   com.level2crm.portals.crm.wicket.customerlist.pages..*+.*(..))/
  aop:advisor advice-ref=txAdvice 
   pointcut-ref=portlets/
  /aop:config
  
   I tried to configure the open session in view (web.xml):
  listener
  
   listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
  /listener
  
  !-- Enable the filters for Hibernate --
  
  filter
  filter-nameopensessioninview/filter-name
  
   filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
  /filter
  filter-mapping
  filter-nameopensessioninview/filter-name
  url-pattern/hibernate/*/url-pattern
  /filter-mapping
  !-- END hibernate filters --
  
  
  
   But I found that this does not work. Because:
  
  
   public class ViewModePage extends org.apache.wicket.markup.html.WebPage
   {
   ...
  
  @SpringBean(name = userDAOBean)
  private UserDAO userDAO;
  
  
  IModel loadableUserModel = new LoadableDetachableModel() {
  
  @Override
  protected Object load(){
  User selectedUser = null;
  String value =
   ((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter(crmportal:userId);
  if(value!=null)
  {
  UuidUserType uuid = 
   UuidUserType.fromString(value); //Works!!
  userDAO.testSessoion(uuid);//Works!!
  
  selectedUser = 
   userDAO.find(uuid);//Works!!
  
  if(!userDAO.isAttached(selectedUser)) 
   //Works!! But is not
   attached!!!
  {
  

how to get resource path to use it in own js

2009-09-12 Thread Petr Kobalíček
Hi list,

how to get resource path to use it in own javascript?

For example I can reimplement renderHead method in
AbstractDefaultAjaxBehavior and in method render head I can add
javascript or css references:

public void renderHead(IHeaderResponse response)
{
  super.renderHead(response);

  // here
  response.renderJavascriptReference(new
JavascriptResourceReference(SomeClass.class, path-to-resource.js));
}

this will generate script tag with correct path, this is all okay,
but I need to put path to some resources using own generated
javascript, for example:

public void renderHead(IHeaderResponse response)
{
  super.renderHead(response);

  // here
  response.renderJavascript(
some javascript code + myMethod_getResourcePath(SomeClass.class,
path-to-resource) + some other javascript code);
}

Is is possible to get path server path using something similar
(replacing myMethod_getResourcePath that not exists) ? I looked at the
wicket sources, but I didn't find it.

Thanks
- Petr

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



Re: Spring annotations fail to inject into webmodels

2009-09-12 Thread Olger Warnier

Did you add the listener to your spring context ?

bean id=wicketInstantiationListener  
class=org.apache.wicket.injection.ComponentInjector/



On 12 sep 2009, at 11:53, pieter claassen wrote:

My abstract basewebmodel constructor from which all my webmodels  
inherit
marks inself for Spring injection but still no injection takes  
place. Any

suggestions where I can look?

Can I run the injection in the constructor of an abstract model from  
which I

inherit all my webmodels? I cannot see why not?

Thanks in advanced.
P



BaseWebModel.java
=
...
   public BaseWebModel(Long id) {
   this.id = id;
   InjectorHolder.getInjector().inject(this);
   }

here is an example of my TemplateWebModel that uses @SpringBean to set
TemplateFactory
TemplateWebModel.java
===

...
   @SpringBean(name=TemplateFactory)
   private TemplateFactory templateFactory;

public TemplateWebModel(Template template) {
   super(template);
   }



P

On Fri, Sep 11, 2009 at 10:42 AM, jWeekend jweekend_for...@cabouge.com 
wrote:




Pieter,

If you want to use Spring's @Configuarble you'll need to enable  
Load Time

Weaving or Complie Time Weaving.

To use @SpringBean with an object that is not a Wicket Component  
you need

to
InjectorHolder.getInjector().inject(this) on initialisation of your  
object.


The benefit of the latter approach is that you do not need to  
introduce

weaving and that Wicket will make sure you have a serialisable proxy
injected.

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket Training and Development
http://jWeekend.com




Pieter Claassen wrote:


I am using maven, spring 2.5.6, wicket 1.4 and am trying to inject  
my

DAO's
into my wicket models but I find that Spring just ignores my advice.

My question:
1. @SpringBean only works on stuff that inherits from Component.  
What do

I
do with things like session and models that don't? I am trying to  
use

@Configurable but that is being ignored.
2. My POM deps are below. What should I pull in to have  
@Configurable

working?
3. BTW. When I comment the bean out of my XML config, then I do  
get an

error
so I am not sure if I am doing something very small wrong?

Thanks.
Pieter

pom.xml
===
...
  dependency
   groupIdorg.springframework/groupId
   artifactIdspring-core/artifactId
   version${spring.version}/version
   /dependency

   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-spring/artifactId
   version${wicket.version}/version
 !--Same results whether I include or exclude the next  
session--

 exclusions
   exclusion
 groupIdorg.springframework/groupId
 artifactIdspring/artifactId
   /exclusion
 /exclusions
   /dependency



TemplateWebModel.java
==
.
@Configurable
public class TemplateWebModel extends  
AbstractDataSetWebModelTemplate {


   private TemplateFactory templateFactory;

   public TemplateFactory getTemplateFactory() {
   return templateFactory;
   }

   public void setTemplateFactory(TemplateFactory templateFactory) {
  throw new RuntimeException(REACHED TEMPLATE FACTORY  
SET); //This

setter is never run
   //this.templateFactory = templateFactory;
   }
.

WicketApplicationDefinitition.xml
==

?xml version=1.0 encoding=UTF-8?
beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:context=http://www.springframework.org/schema/context 


  xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring- 
context-2.5.xsd


   context:annotation-config/
!--aop:aspectj-autoproxy/--

!-- a bean that supplies my primary application database client --
   bean id=appDataSource  
class=com.musmato.dao.ApplicationDBFactory

   destroy-method=close
   constructor-arg
   ref bean=appConfig /
   /constructor-arg
   /bean

!-- a bean that supplies a network database client for template  
uploads

--
   bean id=rootDataSource class=com.musmato.dao.RootDBFactory
destroy-method=close
   constructor-arg
   ref bean=appConfig /
   /constructor-arg
   /bean
.
   bean id=TemplateFactory  
class=com.musmato.dao.TemplateFactory

   property name=client ref=appDataSource /
   /bean






--
Pieter Claassen
musmato.com




--
View this message in context:
http://www.nabble.com/Spring-annotations-fail-to-inject-into-webmodels-tp25396625p25397205.html
Sent from the Wicket - User 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





--
Pieter Claassen

Re: Spring annotations fail to inject into webmodels

2009-09-12 Thread jWeekend

Pieter,

... if you're not injecting into components anywhere in your application you
naturally should be able to skip registering the
ComponentInstatiationListener.

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket Training and Development
http://jWeekend.com


jWeekend wrote:
 
 Pieter,
 
 Have you set up Spring's ContextLoaderListener (a Servlet listener that
 initiates your Spring context) and registered the Spring
 SpringComponentInjector as a Component instantiaition listener [1]?
 
 Your idea to instigate injection in the super classes constructor is fine
 as this will be the concrete subclass that you are instantiating - make
 sure the right super constructor is called in all places you want
 injection to take place, and also that you are not initialising the
 sub-classes injected properties as that would take place after the super
 class is initialised undoing what the super class constructor has done.
 
 Finally, in a case like this, get the simplest possible scenario working
 first (here, try injecting into the subclass directly) to show you have
 everything set up correctly and then try the conceptually slightly more
 complex solution of pushing-up the responsibility to instigate injection
 for all your models into their common, abstract superclass.
 
 Also, notice that this injector goes straight to your fields, even if
 they're private, so your setters not being called alone does not mean
 injection has not succeeded 
 
 Does that make sense?
 
 Regards - Cemal 
 jWeekend 
 OO  Java Technologies, Wicket Training and Development 
 http://jWeekend.com
   
 [1] http://cwiki.apache.org/WICKET/spring.html
 
 
 
 pieter claassen-2 wrote:
 
 My abstract basewebmodel constructor from which all my webmodels inherit
 marks inself for Spring injection but still no injection takes place. Any
 suggestions where I can look?
 
 Can I run the injection in the constructor of an abstract model from
 which I
 inherit all my webmodels? I cannot see why not?
 
 Thanks in advanced.
 P
 
 
 
 BaseWebModel.java
 =
 ...
 public BaseWebModel(Long id) {
 this.id = id;
 InjectorHolder.getInjector().inject(this);
 }
 
 here is an example of my TemplateWebModel that uses @SpringBean to set
 TemplateFactory
 TemplateWebModel.java
 ===
 
 ...
 @SpringBean(name=TemplateFactory)
 private TemplateFactory templateFactory;
 
 public TemplateWebModel(Template template) {
 super(template);
 }
 
 
 
 P
 
 On Fri, Sep 11, 2009 at 10:42 AM, jWeekend
 jweekend_for...@cabouge.comwrote:
 

 Pieter,

 If you want to use Spring's @Configuarble you'll need to enable Load
 Time
 Weaving or Complie Time Weaving.

 To use @SpringBean with an object that is not a Wicket Component you
 need
 to
 InjectorHolder.getInjector().inject(this) on initialisation of your
 object.

 The benefit of the latter approach is that you do not need to introduce
 weaving and that Wicket will make sure you have a serialisable proxy
 injected.

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket Training and Development
 http://jWeekend.com




 Pieter Claassen wrote:
 
  I am using maven, spring 2.5.6, wicket 1.4 and am trying to inject my
  DAO's
  into my wicket models but I find that Spring just ignores my advice.
 
  My question:
  1. @SpringBean only works on stuff that inherits from Component. What
 do
 I
  do with things like session and models that don't? I am trying to use
  @Configurable but that is being ignored.
  2. My POM deps are below. What should I pull in to have @Configurable
  working?
  3. BTW. When I comment the bean out of my XML config, then I do get an
  error
  so I am not sure if I am doing something very small wrong?
 
  Thanks.
  Pieter
 
  pom.xml
  ===
  ...
 dependency
  groupIdorg.springframework/groupId
  artifactIdspring-core/artifactId
  version${spring.version}/version
  /dependency
 
  dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-spring/artifactId
  version${wicket.version}/version
!--Same results whether I include or exclude the next
 session--
exclusions
  exclusion
groupIdorg.springframework/groupId
artifactIdspring/artifactId
  /exclusion
/exclusions
  /dependency
  
 
 
  TemplateWebModel.java
  ==
  .
  @Configurable
  public class TemplateWebModel extends
 AbstractDataSetWebModelTemplate {
 
  private TemplateFactory templateFactory;
 
  public TemplateFactory getTemplateFactory() {
  return templateFactory;
  }
 
  public void setTemplateFactory(TemplateFactory templateFactory) {
 throw new RuntimeException(REACHED TEMPLATE FACTORY SET);
 //This
  setter is never run
  //this.templateFactory = templateFactory;
  }
  .
 
  WicketApplicationDefinitition.xml
 

Re: Wicket integration with jQuery

2009-09-12 Thread jWeekend

I may not be totally unbiased as we're involved in the project but jWeekend
uses WiQuery, including on client applications, and can recommend it.

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket Training and Development
http://jWeekend.com


danisevsky danisevsky wrote:
 
 Hello folks. I would like to use some Wicket integration with jQuery. But
 I
 found several implementations (WickeXt, wiquery and in wicket-stuff
 jwicket
 and jquery) and I do not know which one is the best. Could someone give me
 an advise?
 
 Thanks
 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-integration-with-jQuery-tp25408781p25413545.html
Sent from the Wicket - User 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: CORRECT portlet+spring+hibernate configuration (Two options, what's right?)

2009-09-12 Thread Gonzalo Aguilar Delgado
Hi again! 

I'm really lost on this toppic. It seems to not work. 

First of all. Can someone post a complete configuration of a wicket
portlet + spring, please?

I found several ways to do it but none seems to be correct.

Thank you.



El mar, 18-08-2009 a las 09:53 +0200, nino martinez wael escribió:

 Happy to help, please see further answers below.
 
 2009/8/17 Gonzalo Aguilar Delgado g...@aguilardelgado.com:
 
 
  I have several suggestions.
 
  The order of the web filters are important. You could also try with
  with the wicket spring managed apps, im not sure how that applies.
 
  Will check. I didn't know about filter order... Will also check it.
  Thanks!
 
 
 
  And are you sure that your filter ( /hibernate/*), get's hit? What's
  your wicket filter url, the same or?
 
 
  No, It's different. Can I set it to just /*? Should I do it that way?
 Well it depends, if the hibernate filter should be activated at the
 same url's as wicket.
 
 I've never had a case where my wicket filter and osiw did not match.
 You might have performance increases if they differ, for example if
 you know that you willl never use hibernate on /myapp/ but always put
 in /myapp/pages/dynamic/*  for pages that use db lookup..
 
  Thank you very much for your answers...
 
 
 
 
  2009/8/17 Gonzalo Aguilar Delgado g...@aguilardelgado.com:
   Ok. Maybe I don't understand...
  
   Let me show the situation. I have Spring + portlet + hibernate config
   with transactions working with the current configuration:
  
   I have my DAO objects under package
   com.level2crm.hibernate.enterprise.dao.contact
   And model under com.level2crm.model
  
   I configured one advice:
  tx:advice id=txAdvice transaction-manager=txManager
  !-- the transactional semantics... --
  tx:attributes
  !-- all methods starting with 'get' are 
   read-only --
  tx:method name=get*  propagation=REQUIRED 
   read-only=true /
  !-- other methods use the default transaction 
   settings (see below)
   --
  tx:method name=*  propagation=REQUIRED / 
   !--
   propagation=SUPPORTS --
  /tx:attributes
  /tx:advice
  
   And several pointcuts:
  aop:config
  aop:pointcut id=allModelOperation 
   expression=execution(*
   com.level2crm.model..*+.*(..))/
  aop:advisor advice-ref=txAdvice
   pointcut-ref=allModelOperation/
  /aop:config
  
  aop:config
  aop:pointcut id=allDAO expression=execution(*
   com.level2crm.hibernate.enterprise.dao..*+.*(..))/
  aop:advisor advice-ref=txAdvice pointcut-ref=allDAO/
  /aop:config
  
  aop:config
  aop:pointcut id=TRG expression=execution(*
   com.trg.dao.hibernate.*+.*(..))/
  aop:advisor advice-ref=txAdvice pointcut-ref=TRG/
  /aop:config
  
   !-- This one does not work --
  aop:config
  aop:pointcut id=portlets expression=execution(*
   com.level2crm.portals.crm.wicket.customerlist.pages..*+.*(..))/
  aop:advisor advice-ref=txAdvice 
   pointcut-ref=portlets/
  /aop:config
  
   I tried to configure the open session in view (web.xml):
  listener
  
   listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
  /listener
  
  !-- Enable the filters for Hibernate --
  
  filter
  filter-nameopensessioninview/filter-name
  
   filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
  /filter
  filter-mapping
  filter-nameopensessioninview/filter-name
  url-pattern/hibernate/*/url-pattern
  /filter-mapping
  !-- END hibernate filters --
  
  
  
   But I found that this does not work. Because:
  
  
   public class ViewModePage extends org.apache.wicket.markup.html.WebPage
   {
   ...
  
  @SpringBean(name = userDAOBean)
  private UserDAO userDAO;
  
  
  IModel loadableUserModel = new LoadableDetachableModel() {
  
  @Override
  protected Object load(){
  User selectedUser = null;
  String value =
   ((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter(crmportal:userId);
  if(value!=null)
  {
  UuidUserType uuid = 
   UuidUserType.fromString(value); //Works!!
  userDAO.testSessoion(uuid);//Works!!
  
  selectedUser = 
   userDAO.find(uuid);//Works!!
  
  if(!userDAO.isAttached(selectedUser)) 
   //Works!! But is not
   attached!!!
  {
  
  

OpenSessionInViewFilter not working in portlets?

2009-09-12 Thread Gonzalo Aguilar Delgado
Hi, 

I'm trying to make the OpenSessionInViewFilter to work with my portlets
but it seems that does not initialize
nor work.

Can you check if something is wrong, please?


Thank you


--
web.xml
---
?xml version=1.0 encoding=UTF-8?
!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  License); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
  
   http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
--
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
display-nameMy Portlet Application/display-name

!-- For deploying on Websphere: disable WebSphere default
portletcontainer
 However: if you actually want to deploy on WebSphere Portal,
comment the following out --
context-param

param-namecom.ibm.websphere.portletcontainer.PortletDeploymentEnabled/param-name
param-valuefalse/param-value
/context-param

context-param
param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext.xml/param-value
/context-param

listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener

!-- Enable the filters for Hibernate --
filter
filter-nameopenSessionInViewFilter/filter-name

filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
init-param
param-namesingleSession/param-name
param-valuetrue/param-value
/init-param
init-param
param-namesessionFactoryBeanName/param-name
param-valueopRoyalCaninSessionFactory/param-value
/init-param
/filter
filter-mapping
filter-nameopenSessionInViewFilter/filter-name
url-pattern/customer-detail/*/url-pattern
/filter-mapping

!-- Wicket filters --
filter 
filter-nameCustomerDetailPortlet/filter-name 

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class 
init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
init-param
param-nameapplicationBean/param-name
param-valuecustomerDetailPortletBean/param-value
/init-param
/filter 
 filter-mapping
filter-nameCustomerDetailPortlet/filter-name 
url-pattern/customer-detail/*/url-pattern 
dispatcherREQUEST/dispatcher
dispatcherINCLUDE/dispatcher
dispatcherFORWARD/dispatcher   
/filter-mapping 

!-- Added when deployed with maven --
servlet
descriptionMVC Servlet for Jetspeed Portlet
Applications/description
display-nameJetspeed Container/display-name
servlet-nameJetspeedContainer/servlet-name

servlet-classorg.apache.jetspeed.container.JetspeedContainerServlet/servlet-class
init-param
param-namecontextName/param-name
param-valuecrmportal-contact/param-value
/init-param
load-on-startup0/load-on-startup
/servlet
servlet-mapping
servlet-nameJetspeedContainer/servlet-name
url-pattern/container/*/url-pattern
/servlet-mapping
jsp-config
taglib
taglib-urihttp://java.sun.com/portlet/taglib-uri

taglib-location/WEB-INF/tld/portlet.tld/taglib-location
/taglib
taglib
taglib-urihttp://java.sun.com/portlet_2_0/taglib-uri

taglib-location/WEB-INF/tld/portlet_2_0.tld/taglib-location
/taglib
/jsp-config


/web-app



RE: How to redirect from a ModalWindow

2009-09-12 Thread Mikko Pukki
Hi,

I wouldn't mess around with such scripts unless really necessary. Mainly, 
because
Wicket can handle domreadyEvents on its own. I solved the problem by extending
ModalWindow and by adding a behavior that disables the unloadConfirmation. Like 
this:


public MyModalWindow(String id, IModel title, int initialHeight, int 
initialWidth)
{
super(id);

setTitle(title);

add(new DisableDefaultConfirmBehavior());


private class DisableDefaultConfirmBehavior extends AbstractBehavior 
implements IHeaderContributor {

private static final long   serialVersionUID= 1L;

@Override
public void renderHead(IHeaderResponse response)
{

response.renderOnDomReadyJavascript(Wicket.Window.unloadConfirmation = false);
}

}

Of course, when having multiple Modal windows on the same page, that script 
would fire multiple
times, but then again, would it be a good idea to have multiple modal windows 
in the first place?

- Mikko


-Original Message-
From: Vladimir K [mailto:koval...@gmail.com] 
Sent: 12. syyskuuta 2009 9:37
To: users@wicket.apache.org
Subject: Re: How to redirect from a ModalWindow


Try adding this one to the page markup

script language=javascript type=text/javascript
jQuery(document).ready(function(){
if (typeof Wicket != 'undefined'  
Wicket.Window)
Wicket.Window.unloadConfirmation = 
false;
});
/script


Matthias Keller wrote:
 
 Hi Peter
 
 You would be right as long as it wasn't for a ModalWindow.
 When having an open ModalWindow, wicket seems to register an unload 
 javascript event which - when trying to navigate away from the page (be 
 it by following a link, closing the window etc), displays a confirmation 
 message which you have to accept. I need to avoid that message, but the 
 only way to do that probably is by closing that window first so that the 
 javascript event gets unloaded.
 
 Matt
 
 Peter Ertl wrote:


 throw new RestartResponseException(OtherPage.class)

 window.close() is not needed!


 Am 10.09.2009 um 12:50 schrieb Matthias Keller:

 OtherPage.class


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

 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User 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: How to redirect from a ModalWindow

2009-09-12 Thread Peter Ertl
Wouldn't it make sense to disable this confirmation dialog in  
deployment mode?


What is it good for anyway?

Am 12.09.2009 um 14:50 schrieb Mikko Pukki:


Hi,

I wouldn't mess around with such scripts unless really necessary.  
Mainly, because
Wicket can handle domreadyEvents on its own. I solved the problem by  
extending
ModalWindow and by adding a behavior that disables the  
unloadConfirmation. Like this:



	public MyModalWindow(String id, IModel title, int initialHeight,  
int initialWidth)

{
super(id);

setTitle(title);

add(new DisableDefaultConfirmBehavior());


	private class DisableDefaultConfirmBehavior extends  
AbstractBehavior implements IHeaderContributor {


private static final long   serialVersionUID= 1L;

@Override
public void renderHead(IHeaderResponse response)
{
			response.renderOnDomReadyJavascript 
(Wicket.Window.unloadConfirmation = false);

}

}

Of course, when having multiple Modal windows on the same page, that  
script would fire multiple
times, but then again, would it be a good idea to have multiple  
modal windows in the first place?


- Mikko


-Original Message-
From: Vladimir K [mailto:koval...@gmail.com]
Sent: 12. syyskuuta 2009 9:37
To: users@wicket.apache.org
Subject: Re: How to redirect from a ModalWindow


Try adding this one to the page markup

script language=javascript type=text/javascript
jQuery(document).ready(function(){
if (typeof Wicket != 'undefined'  
Wicket.Window)
Wicket.Window.unloadConfirmation = 
false;
});
/script


Matthias Keller wrote:


Hi Peter

You would be right as long as it wasn't for a ModalWindow.
When having an open ModalWindow, wicket seems to register an unload
javascript event which - when trying to navigate away from the page  
(be
it by following a link, closing the window etc), displays a  
confirmation
message which you have to accept. I need to avoid that message, but  
the
only way to do that probably is by closing that window first so  
that the

javascript event gets unloaded.

Matt

Peter Ertl wrote:



   throw new RestartResponseException(OtherPage.class)

window.close() is not needed!


Am 10.09.2009 um 12:50 schrieb Matthias Keller:


OtherPage.class



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








--
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User 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



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



Re: how to get resource path to use it in own js

2009-09-12 Thread Pedro Santos
I think you are looking for:
http://wicket.sourceforge.net/apidocs/wicket/RequestCycle.html#urlFor(wicket.ResourceReference
)

Ex:
RequestCycle.get().getUrlFor(new
ResourceReference(SomeClass.class,path-to-resource))

On Sat, Sep 12, 2009 at 7:34 AM, Petr Kobalíček kobalicek.p...@gmail.comwrote:

 Hi list,

 how to get resource path to use it in own javascript?

 For example I can reimplement renderHead method in
 AbstractDefaultAjaxBehavior and in method render head I can add
 javascript or css references:

 public void renderHead(IHeaderResponse response)
 {
  super.renderHead(response);

  // here
  response.renderJavascriptReference(new
 JavascriptResourceReference(SomeClass.class, path-to-resource.js));
 }

 this will generate script tag with correct path, this is all okay,
 but I need to put path to some resources using own generated
 javascript, for example:

 public void renderHead(IHeaderResponse response)
 {
  super.renderHead(response);

  // here
  response.renderJavascript(
some javascript code + myMethod_getResourcePath(SomeClass.class,
 path-to-resource) + some other javascript code);
 }

 Is is possible to get path server path using something similar
 (replacing myMethod_getResourcePath that not exists) ? I looked at the
 wicket sources, but I didn't find it.

 Thanks
 - Petr

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




Re: How to redirect from a ModalWindow

2009-09-12 Thread Ryan McKinley

even better is to add this call to the request that opens the window:

onClick( AjaxRequestTarget target )
{
  target.appendJavascript( Wicket.Window.unloadConfirmation =  
false; );

  ...
  modal.show( target);
}

This way the logic is still contained in java and it works for a panel  
or a page popup.




On Sep 12, 2009, at 2:36 AM, Vladimir K wrote:



Try adding this one to the page markup

script language=javascript type=text/javascript
jQuery(document).ready(function(){
if (typeof Wicket != 'undefined'  
Wicket.Window)
Wicket.Window.unloadConfirmation = 
false;
});
/script


Matthias Keller wrote:


Hi Peter

You would be right as long as it wasn't for a ModalWindow.
When having an open ModalWindow, wicket seems to register an unload
javascript event which - when trying to navigate away from the page  
(be
it by following a link, closing the window etc), displays a  
confirmation
message which you have to accept. I need to avoid that message, but  
the
only way to do that probably is by closing that window first so  
that the

javascript event gets unloaded.

Matt

Peter Ertl wrote:



   throw new RestartResponseException(OtherPage.class)

window.close() is not needed!


Am 10.09.2009 um 12:50 schrieb Matthias Keller:


OtherPage.class



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








--
View this message in context: 
http://www.nabble.com/How-to-redirect-from-a-ModalWindow-tp25381117p25411990.html
Sent from the Wicket - User 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: how to get resource path to use it in own js

2009-09-12 Thread Petr Kobalíček
thanks, this is exactly what I need
- Petr

2009/9/12 Pedro Santos pedros...@gmail.com:
 I think you are looking for:
 http://wicket.sourceforge.net/apidocs/wicket/RequestCycle.html#urlFor(wicket.ResourceReference
 )

 Ex:
 RequestCycle.get().getUrlFor(new
 ResourceReference(SomeClass.class,path-to-resource))

 On Sat, Sep 12, 2009 at 7:34 AM, Petr Kobalíček 
 kobalicek.p...@gmail.comwrote:

 Hi list,

 how to get resource path to use it in own javascript?

 For example I can reimplement renderHead method in
 AbstractDefaultAjaxBehavior and in method render head I can add
 javascript or css references:

 public void renderHead(IHeaderResponse response)
 {
  super.renderHead(response);

  // here
  response.renderJavascriptReference(new
 JavascriptResourceReference(SomeClass.class, path-to-resource.js));
 }

 this will generate script tag with correct path, this is all okay,
 but I need to put path to some resources using own generated
 javascript, for example:

 public void renderHead(IHeaderResponse response)
 {
  super.renderHead(response);

  // here
  response.renderJavascript(
    some javascript code + myMethod_getResourcePath(SomeClass.class,
 path-to-resource) + some other javascript code);
 }

 Is is possible to get path server path using something similar
 (replacing myMethod_getResourcePath that not exists) ? I looked at the
 wicket sources, but I didn't find it.

 Thanks
 - Petr

 -
 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: RequestCycle().urlFor not work

2009-09-12 Thread Dima Rzhevskiy
I use wicket 1.4.1, and I want send e-mail's notifications to users.

I create problem code as simple as possible: only with AjaxLink
Users of my site send internal messages. Messages will be composed in
ModalWindow. Inside AjaxButton.onSumbit method e-mail notification sent.
(Long way to carry absoluteUrl through container hierarchy).


--
Rzhevskiy Dmitry

2009/9/12 Johan Compagner jcompag...@gmail.com

 Which version of wicket do you use?

 Why do you need absoluut urls?

 On 11/09/2009, Dima Rzhevskiy d...@rzhevskiy.info wrote:
  Sorry, yes, urlFor return correct result.
  toAbsolutePath(final String relativePagePath) do not return result what I
  expected.
   javadoc copy/pasted from toAbsolutePath(final String requestPath, String
  relativePagePath)...
 
  I undestand that it is nessesary to use toAbsolutePath(final String
  requestPath, String relativePagePath) where requestPath nessesaty take in
  constructor:
 
  public class X1 extends WebPage {
 
  private static final Logger LOG = LoggerFactory.getLogger(X1.class);
 
  public X1(final PageParameters parameters) {
 
   CharSequence url = getRequestCycle().urlFor(getClass().class,
 new
  PageParameters());
   final String outerUrl2=
  RequestUtils.toAbsolutePath(url.toString());   //get
   add(new AjaxLink(message){
  @Override
  public void onClick(AjaxRequestTarget ajaxRequestTarget) {
  CharSequence url =
  getRequestCycle().urlFor(X1.class, new PageParameters());
  String url2=
  RequestUtils.toAbsolutePath(outerUrl2, url.toString());
  LOG.info(url=+url);
  LOG.info(url2=+url2);
  }
  });
 
  }
  }
 
 
  But this code look ugly..
  Is better way of obtaining absolute url exists ?
 
  --
  Rzhevskiy Dmitry
 
 
  2009/9/11 Jeremy Thomerson jer...@wickettraining.com
 
  what is incorrect about those URLs?  they are relative - relative to the
  path you are on.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Fri, Sep 11, 2009 at 10:14 AM, Dima Rzhevskiy d...@rzhevskiy.info
  wrote:
 
   Hi !
  
   I create simple page X1 with AjaxLink :
   ..
   new AjaxLink(message){
  @Override
  public void onClick(AjaxRequestTarget ajaxRequestTarget) {
  CharSequence url =
   getRequestCycle().urlFor(X1.class, new PageParameters());
  String url2=
   RequestUtils.toAbsolutePath(url.toString());
  LOG.info(url=+url);
  LOG.info(url2=+url2);
  }
  }
   ...
   if I mount page to first  level directory , for example /x1.html
   result is correct:
   url=x1.html
   url2=http://localhost:8080/ctx/x1.html
  
   if I mount page to second level directory /x1/x2.html result
 incorrect
url=../x1/x2.html
url2=http://localhost:8080/x1/x2.html
  
   if i mount ti third level directory /x1/x2/x3.html
url=../../x1/x2/x3.html
url2=http://x1/x2/x3.html
  
   Is this bug or I use API incorrectly ?
  
   --
  
   Rzhevskiy Dmitry
  
 
 

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



Re: HybridUrlCodingStrategy and CryptedUrlWebRequestCodingStrategy

2009-09-12 Thread mfs

Hi Guys,

Sorry for not picking up the right thread for this question but I am not
able to submit a post. Anyways..

My question is regarding the javadocs for CryptedUrlWebRequestCodingStrategy
which in the end says Because the algorithm is reversible, URLs which were
bookmarkable before will remain bookmarkable.. I wonder if that is true for
post 1.3.5 releases where the encryption involves the user-session id ?

Thanks in advance
Farhan.




Vytautas Civilis wrote:
 
 Hi Erik,
 
 that's not a concern for me really - I'm providing static application
 specific key (not uber secure I know), this let's me have a bookmarkable
 page even with encrypted key (as enc key does not change).
 
 The issue (more like a feature request :]), is that hybrid
 encodes/decodes params in different way than
 CryptedUrlWebRequestCodingStrategy (which uses the more common style of
 QueryStringUrlCodingStrategy).
 I imagine, that's the only problem, so perhaps anyone has implemented
 that already, e.g. with some params encoding/decoding strategy, which
 could be supplied to hybrid strat (or to crypt strat ;]).
 
 cvl
 
 Erik van Oosten wrote:
 Hi Vytautas,
 
 You can not encrypt bookmarkable URLs as encryption is done per session.
 So if you're URLs need to be secure you are limited to regular Link's.
 
 Regards,
Erik.
 
 
 
 Vytautas Čivilis wrote:
 for the same purpose, one would encrypt QueryStringUrlCodingStrategy.

 e.g., if you have /path1/path2/param1/value1
 and param1/value1 might expose some business logic or security related
 concerns.
 in the same manner as /path1/path2/param1=value1 would

 cvl

 Johan Compagner wrote:
  
 why would you encrypt the hybrid?

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

-- 
View this message in context: 
http://www.nabble.com/HybridUrlCodingStrategy-and-CryptedUrlWebRequestCodingStrategy-tp23960469p25418524.html
Sent from the Wicket - User 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: HybridUrlCodingStrategy and CryptedUrlWebRequestCodingStrategy

2009-09-12 Thread Igor Vaynberg
the javadoc is out of date please open a jira issue to have the javadoc updated.

-igor

On Sat, Sep 12, 2009 at 2:50 PM, mfs farhan.sar...@gmail.com wrote:

 Hi Guys,

 Sorry for not picking up the right thread for this question but I am not
 able to submit a post. Anyways..

 My question is regarding the javadocs for CryptedUrlWebRequestCodingStrategy
 which in the end says Because the algorithm is reversible, URLs which were
 bookmarkable before will remain bookmarkable.. I wonder if that is true for
 post 1.3.5 releases where the encryption involves the user-session id ?

 Thanks in advance
 Farhan.




 Vytautas Civilis wrote:

 Hi Erik,

 that's not a concern for me really - I'm providing static application
 specific key (not uber secure I know), this let's me have a bookmarkable
 page even with encrypted key (as enc key does not change).

 The issue (more like a feature request :]), is that hybrid
 encodes/decodes params in different way than
 CryptedUrlWebRequestCodingStrategy (which uses the more common style of
 QueryStringUrlCodingStrategy).
 I imagine, that's the only problem, so perhaps anyone has implemented
 that already, e.g. with some params encoding/decoding strategy, which
 could be supplied to hybrid strat (or to crypt strat ;]).

 cvl

 Erik van Oosten wrote:
 Hi Vytautas,

 You can not encrypt bookmarkable URLs as encryption is done per session.
 So if you're URLs need to be secure you are limited to regular Link's.

 Regards,
    Erik.



 Vytautas Čivilis wrote:
 for the same purpose, one would encrypt QueryStringUrlCodingStrategy.

 e.g., if you have /path1/path2/param1/value1
 and param1/value1 might expose some business logic or security related
 concerns.
 in the same manner as /path1/path2/param1=value1 would

 cvl

 Johan Compagner wrote:

 why would you encrypt the hybrid?





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




 --
 View this message in context: 
 http://www.nabble.com/HybridUrlCodingStrategy-and-CryptedUrlWebRequestCodingStrategy-tp23960469p25418524.html
 Sent from the Wicket - User 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



Dual Use wicket:id

2009-09-12 Thread J.D. Corbin

Hello,

I would like to create a single page markup that I share for editing  
and read-only views.


For example, when in read-only mode I might display a label and in  
edit mode a TextField.


I know I can use a textfield and set the enabled behavior to false,  
but the visual display isn't very appealing in that case and don't  
want to decorate it using css.  Typically the value I display in read- 
only mode for the field is a bit different than the edited value in  
edit mode.


I was hoping I could define a SPAN tag in my markup and then either  
render a label or textfield depending upon the mode I was in, either  
read-only or edit.   Unfortunately this doesn't work because a  
TextField has to be rendered using an INPUT tag.


One thing I thought about was defining two fields, one for the edit  
field and one for the read-only field and then control their  
visibility depending upon the mode I was in, but that isn't very  
elegant.


My main goal is to avoid having to create separate markup for the  
editor  and read-only view.


Any suggestions?

J.D.




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



Re: Dual Use wicket:id

2009-09-12 Thread Jeremy Thomerson
This might help you:
http://www.google.com/search?q=wicket+editable+label

Otherwise, you certainly can create small components that can work with read
or write mode to fit your needs.

--
Jeremy Thomerson
http://www.wickettraining.com



On Sat, Sep 12, 2009 at 10:06 PM, J.D. Corbin jd.cor...@comcast.net wrote:

 Hello,

 I would like to create a single page markup that I share for editing and
 read-only views.

 For example, when in read-only mode I might display a label and in edit
 mode a TextField.

 I know I can use a textfield and set the enabled behavior to false, but the
 visual display isn't very appealing in that case and don't want to decorate
 it using css.  Typically the value I display in read-only mode for the field
 is a bit different than the edited value in edit mode.

 I was hoping I could define a SPAN tag in my markup and then either render
 a label or textfield depending upon the mode I was in, either read-only or
 edit.   Unfortunately this doesn't work because a TextField has to be
 rendered using an INPUT tag.

 One thing I thought about was defining two fields, one for the edit field
 and one for the read-only field and then control their visibility depending
 upon the mode I was in, but that isn't very elegant.

 My main goal is to avoid having to create separate markup for the editor
  and read-only view.

 Any suggestions?

 J.D.




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




removing a behavior

2009-09-12 Thread Pierre Goupil
Good morning,

I use CSSPackageResource .getHeaderContribution(style.css) in order to
load CSS files into my page. But is there any way to remove the
HeaderContributor ?

If I just add another one in a subsequent request, the old CSS is still
there, which I don't want.

Regards,

Zala


-- 
Sans amis était le grand maître des mondes,
Eprouvait manque, ce pour quoi il créa les esprits,
Miroirs bienveillants de sa béatitude.
Mais au vrai, il ne trouva aucun égal,
Du calice du royaume total des âmes
Ecume jusqu'à lui l'infinité.

(Schiller, l'amitié)