Re: HTML editing, HTML templates, HTML refactoring

2010-05-18 Thread bht
Yes:

wicket:link
link rel='stylesheet' type='text/css' href='../../../../style.css'/
/wicket:link

WicketMessage: Exception in rendering component: [MarkupContainer
[Component id = _link2]]
Root cause:

java.lang.IllegalArgumentException: Invalid path ../../../../style.css

The path is valid because if I click on it in the IDE then the stle
sheet is opened. I really want better IDE integration with Wicket, and
I think that does not exist.

https://issues.apache.org/jira/browse/WICKET-581
... you no longer need to use autolink. As of a couple of days ago in
1.3.0-incubating-SNAPSHOT, any href/src/whatever elements that are in
your HTML will be prepended to make them context-relative, no matter
where your page is mounted.

Unfortunately, the intended result would not be satisfactory even
without failure. I don't want to
- have the wicket filter serve the resources
- have the resources stored under WEB-INF/classes

So I tried in init()
getResourceSettings(addResourceFolder(wicket));

but that is where Wicket support ends because I still have to use
link rel='stylesheet' type='text/css' href='style.css'/ which works
at runtime but not for any IDE for offline viewing and refactoring.

Don't you think it would be time for Wicket to catch up with modern
IDE HTML features? We can't use them.

http://wicket.apache.org/

Line 2:

With proper mark-up/logic separation ...

?

Not really.


It works for the framework and component developers who want to bundle
the resources with their packages, but it does not work for page
development which has totally different requirements.


Regards

Bernard


On Tue, 18 May 2010 00:21:24 -0500, you wrote:

Have you tried using wicket:link around your resource references?


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



wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
My tests are running fine from eclipse but I get this when they are kicked off 
in hudson..

testLoadPanel_AddNewPerson(com.conducive.wicketTester.PersonAddOrEditTest_Wicket)
  Time elapsed: 0.001 sec   ERROR!
org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread org.junit.runners.Suite
at org.apache.wicket.Application.get(Application.java:179)
at 
org.apache.wicket.injection.web.InjectorHolder.getInjector(InjectorHolder.java:67)
at 
com.conducive.wicket.PRManagerRequestCycle.init(PRManagerRequestCycle.java:57)
at 
com.conducive.wicket.PRManagerApplication.newRequestCycle(PRManagerApplication.java:539)
at 
org.apache.wicket.protocol.http.MockWebApplication.createRequestCycle(MockWebApplication.java:652)
at 
org.apache.wicket.protocol.http.MockWebApplication.setupRequestAndResponse(MockWebApplication.java:687)
at 
org.apache.wicket.protocol.http.MockWebApplication.setupRequestAndResponse(MockWebApplication.java:706)
at 
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:424)
at 
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:410)
at 
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:306)
at 
com.conducive.wicketTester.PRManagerTestBase.loginUser(PRManagerTestBase.java:138)
at 
com.conducive.wicketTester.PRManagerTestBase.loginUser(PRManagerTestBase.java:153)
at 
com.conducive.wicketTester.PersonAddOrEditTest_Wicket.testLoadPanel_AddNewPerson(PersonAddOrEditTest_Wicket.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at 
org.jdogma.junit.NonBlockingAsynchronousRunner$1.call(NonBlockingAsynchronousRunner.java:59)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)



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



Re: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro
Someone seems to change this, but i dodn't found an example how to solve 
it correctly until now.


Kim had the problem some days ago to. Seems that yoiu have to add 
ComponentInstListener to TestApplication to.

Why this was working before and not anymore - i don't know.
Here is what he wrote

Okay,

Got my test green:-)


Here it is:

package be.thomascook.ui.pages.admin;

import be.thomascook.wicket.component.WicketFilter;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.apache.wicket.util.tester.WicketTester;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import 
org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.springframework.transaction.annotation.Transactional;
import org.testng.annotations.Test;

/**
 * @author Compi
 * @since 10-mei-2010
 */
@ContextConfiguration(locations = {
/applicationContext-dao.xml,
/applicationContext-service.xml,
/applicationContext-database.xml})
@Transactional
public class UserListPageTest extends 
AbstractTransactionalTestNGSpringContextTests {

@Autowired
private ApplicationContext applicationContext;
@Autowired
protected WicketFilter wicketApplication;

@Test
public void labelContainsHelloWorld()   {
WicketTester tester=new WicketTester();
tester.getApplication().addComponentInstantiationListener(new 
SpringComponentInjector(tester.getApplication(), applicationContext, true ));


tester.startPage(UserListPage.class);
tester.assertNoErrorMessage();
tester.assertLabel(title, Users List);
}
}


Kind regards,
Kim




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



Re: Ajax Repeater Fragment Update

2010-05-18 Thread Dr. Wolf Blecher
Thanks for the response. Attached is the markup and the java classes for the
panel. It's slightly modified since normally a DataView is used, but the
behaviour is the same with the ListView. This is only the panel class and not
a complete quickstart.

Here is the markup

html xmlns:wicket
  head
meta http-equiv=Content-Type content=text/html; charset=UTF-8/
titleTreeDataViewPanel/title
  /head
  body
wicket:panel
  table
thead
  tr
th/th
thName/th
thVorname/th
  /tr
/thead
tbody
  div wicket:id=overview
div wicket:id=extendingRowUSer Data here/div
  /div
/tbody
  /table
/wicket:panel
  /body
/html

wicket:fragment wicket:id=rowView
  tr
td
  a wicket:id=extendLink
span wicket:id=extendSymbolArrow/span
  /a
/td
td
  div wicket:id=nameName/div
  div wicket:id =details
ul
  libAgain/bspan wicket:id=strasseStrasse/span/li
/ul
  /div
/td
tdspan wicket:id=vornameVorname/span/td
  /tr
/wicket:fragment

and the corresponding Java

public class TreeDataViewPanel extends Panel {

  private ListString userList = Arrays.asList(User 1,User 2,User 3);

  public TreeDataViewPanel(String id) {
super (id);
ListViewString userTable = new ListViewString(overview, userList) {
  @Override
  protected void populateItem(ListItemString item) {
String user = item.getModelObject();

DetailFragment dataView =
  new DetailFragment(extendingRow,rowView,user);
dataView.setOutputMarkupId(true);
item.add(dataView);
  }
};
add(userTable);
  }
}

class DetailFragment extends Fragment {

 private boolean compressed = true;

  public boolean isCompressed() {
return compressed;
  }

  public void setCompressed(boolean compressed) {
this.compressed = compressed;
  }

  public DetailFragment(String id, String markupId, String user) {
super(id, markupId);

WebMarkupContainer detailContainer = new WebMarkupContainer(details) {
  @Override
  public boolean isVisible() {
return !isCompressed();
  }
};

add(new DropDownLink(extendLink, this));
add(new Label(name, user));
add(new Label(vorname, user));

detailContainer.add(new Label(strasse, user));
add(detailContainer);
  }
}


class DropDownLink extends AjaxLink {

  DetailFragment parent;
  Label compressedSymbol = new Label(extendSymbol,\u25B6); // 9654
  Label expandSymbol = new Label(extendSymbol,\u25BC); // 9660
  Label linkSymbol;

  @Override
  public void onClick(AjaxRequestTarget target) {
if (parent.isCompressed()) {
  linkSymbol.replaceWith(expandSymbol);
  linkSymbol = expandSymbol;
  parent.setCompressed(false);
} else {
  linkSymbol.replaceWith(compressedSymbol);
  linkSymbol = compressedSymbol;
  parent.setCompressed(true);
}
target.addComponent(linkSymbol);
target.addComponent(parent);
  }

  public DropDownLink(String id, DetailFragment parent) {
super(id);
linkSymbol = compressedSymbol;
linkSymbol.setOutputMarkupId(true);
expandSymbol.setOutputMarkupId(true);
compressedSymbol.setOutputMarkupId(true);
this.parent = parent;
add(linkSymbol);
  }
}

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



Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
I'm not using spring. Would I still use that injector?

I'm using guice..

D/


On May 18, 2010, at 1:46 AM, Per Newgro wrote:

 Someone seems to change this, but i dodn't found an example how to solve 
 it correctly until now.
 
 Kim had the problem some days ago to. Seems that yoiu have to add 
 ComponentInstListener to TestApplication to.
 Why this was working before and not anymore - i don't know.
 Here is what he wrote
 
 Okay,
 
 Got my test green:-)
 
 
 Here it is:
 
 package be.thomascook.ui.pages.admin;
 
 import be.thomascook.wicket.component.WicketFilter;
 import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
 import org.apache.wicket.util.tester.WicketTester;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
 import org.springframework.test.context.ContextConfiguration;
 import 
 org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
 import 
 org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
 import org.springframework.transaction.annotation.Transactional;
 import org.testng.annotations.Test;
 
 /**
  * @author Compi
  * @since 10-mei-2010
  */
 @ContextConfiguration(locations = {
 /applicationContext-dao.xml,
 /applicationContext-service.xml,
 /applicationContext-database.xml})
 @Transactional
 public class UserListPageTest extends 
 AbstractTransactionalTestNGSpringContextTests {
 
 @Autowired
 private ApplicationContext applicationContext;
 @Autowired
 protected WicketFilter wicketApplication;
 
 @Test
 public void labelContainsHelloWorld()   {
 WicketTester tester=new WicketTester();
 tester.getApplication().addComponentInstantiationListener(new 
 SpringComponentInjector(tester.getApplication(), applicationContext, true ));
 
 
 tester.startPage(UserListPage.class);
 tester.assertNoErrorMessage();
 tester.assertLabel(title, Users List);
 }
 }
 
 
 Kind regards,
 Kim
 
 
 
 
 -
 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: Best practises question

2010-05-18 Thread Rik van der Kleij
To mine opinion this Best practise is confusing. It is just a matter of do not 
share Wicket components between pages because Wicket will not detect while 
serializing pages that components are already serialized. 

The case of sharing anonymous IModel implementations is a special case because 
implicitly a Wicket component is shared. So you have to be careful with sharing 
models.

Regards,
Rik



On 17 mei 2010, at 18:55, Jeremy Thomerson wrote:

 You should use PageReference (Page#getPageReference()).
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Sun, May 16, 2010 at 11:52 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:
 
 Hi Jeremy,
 
 So an instance field inside a page that points to another page is also
 something you should avoid? In our application we using this pattern a lot
 (for going back to previous page) but it never seems to be any problem. So
 probably because our pages don't consume a lot of memory.
 
 Regards,
 Rik
 
 On 17 mei 2010, at 06:13, Jeremy Thomerson wrote:
 
 In general, you should not pass references to components to other pages.
 That section on anonymous inner classes is telling you that when you
 create
 an anonymous inner class and pass it to another page, you
 will inadvertently be passing a reference to the outer class, which is
 typically a page.  This builds up memory and you will get a OOM.  Passing
 models between pages is absolutely fine - as long as you're not
 accidentally
 passing a bunch of other stuff with it (including large domain objects -
 which should be detached by using a detachable model).  The page linked
 to
 even says that you will often pass models between pages.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Sun, May 16, 2010 at 11:05 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:
 
 Hi Bernard and Mike,
 
 According to
 
 https://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-AnonymousInnerclassessharingmodels
  could eventually lead to Out of memory error.
 
 Holding a page reference in an instance field that points to another
 page
 looks the same but it is doesn't seems to be a problem. What's the
 difference?
 
 Regards,
 Rik
 
 
 On 16 mei 2010, at 04:39, Michael O'Cleirigh wrote:
 
 Hello,
 
 I'm not sure on the answer to your question about the anonymous inner
 class but in general sharing models between pages can be a bad idea.
 
 The memory issues comes into play if the IModel is like Model and the
 contained object is not transient (it is serialized as part of the
 page).
 
 While Pages are serialized each page is serialized independently so on
 page reload the IModel from the first page is no longer the same object
 instance as the IModel from the second page.  At deserialization time
 the
 page1.model.getObject().equals page2.model.getObject() but
 page1.model.getObject() != page2.model.getObject(); so any changes to
 either
 model are not shared between then.
 
 This is not a problem if the model is loadable since the memory of the
 page it is contained in doesn't matter as the value is loaded from the
 backend db or some other independent data source like the httpsession,
 or
 with wicketApplication.
 
 You can see the same effect if you try and share a model between a
 panel
 and a ModelWindow that uses a PageCreator
 
 Hope this helps,
 
 Mike
 Hi,
 
 Can someone explain me why it is a memory issue when an instance of an
 anonymous IModel class is passed to another page to be shared, but it
 seems
 to be no problem when a page reference is passed to another page and is
 put
 in an instance field (for example to be used in a button to navigate
 back to
 previous page)?
 
 Many thanks.
 
 Regards,
 Rik
 
 
 
 -
 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
 
 
 
 
 -
 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 tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
I just did this:

 tester.getApplication().addComponentInstantiationListener(new 
GuiceComponentInjector(tester.getApplication()));


On May 18, 2010, at 2:01 AM, Douglas Ferguson wrote:

 I'm not using spring. Would I still use that injector?
 
 I'm using guice..
 
 D/
 
 
 On May 18, 2010, at 1:46 AM, Per Newgro wrote:
 
 Someone seems to change this, but i dodn't found an example how to solve 
 it correctly until now.
 
 Kim had the problem some days ago to. Seems that yoiu have to add 
 ComponentInstListener to TestApplication to.
 Why this was working before and not anymore - i don't know.
 Here is what he wrote
 
 Okay,
 
 Got my test green:-)
 
 
 Here it is:
 
 package be.thomascook.ui.pages.admin;
 
 import be.thomascook.wicket.component.WicketFilter;
 import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
 import org.apache.wicket.util.tester.WicketTester;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
 import org.springframework.test.context.ContextConfiguration;
 import 
 org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
 import 
 org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
 import org.springframework.transaction.annotation.Transactional;
 import org.testng.annotations.Test;
 
 /**
 * @author Compi
 * @since 10-mei-2010
 */
 @ContextConfiguration(locations = {
/applicationContext-dao.xml,
/applicationContext-service.xml,
/applicationContext-database.xml})
 @Transactional
 public class UserListPageTest extends 
 AbstractTransactionalTestNGSpringContextTests {
 
@Autowired
private ApplicationContext applicationContext;
@Autowired
protected WicketFilter wicketApplication;
 
@Test
public void labelContainsHelloWorld()   {
WicketTester tester=new WicketTester();
tester.getApplication().addComponentInstantiationListener(new 
 SpringComponentInjector(tester.getApplication(), applicationContext, true ));
 
 
tester.startPage(UserListPage.class);
tester.assertNoErrorMessage();
tester.assertLabel(title, Users List);
}
 }
 
 
 Kind regards,
 Kim
 
 
 
 
 -
 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: Javascript template as linked header contribution?

2010-05-18 Thread Ralf Eichinger
Finally I made it working after finding this WIKI entry:
https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html

Just used it the same way for Javascript file.

Igor: This very useful class should be integrated into Wicket core!
(under org.apache.wicket.markup.html.resources)

Am Montag, den 19.04.2010, 17:52 -0700 schrieb Igor Vaynberg:
 i meant you have to create the classes...
 
 -igor
 
 On Mon, Apr 19, 2010 at 4:10 PM, Ralf Eichinger
 ralf.eichin...@pixotec.de wrote:
  Am Montag, den 19.04.2010, 09:08 -0700 schrieb Igor Vaynberg:
  you will have to create a TextTemplateResource to serve such resources
  and a TextTemplateResourceReference to create urls for them.
 
  -igor
 
  as there are no TextTemplateResource and TextTemplateResourceReference
  classes in Wicket 1.4.7, I tried this:
 
  PackagedTextTemplate jsTemplate = new
   PackagedTextTemplate(this.getClass(), js/lightbox.js);
 
  TextTemplateSharedResourceFactory ttsr = new
   TextTemplateSharedResourceFactory(jsTemplate, this.getClass());
 
  String webappContext = WebApplication.get().getServletContext()
   .getContextPath();
 
  MapString, Object parameters = new HashMapString, Object();
  parameters.put(webappContext, webappContext);
  TextTemplateLink ref = new TextTemplateLink(lightbox, ttsr,
   parameters);
  add(ref);
 
  and in panels html:
 
  wicket:head
  script wicket:id=lightbox src=# language=JavaScript/script
  /wicket:head
 
  this resulted in a rendered URL (that looks weired):
 
  script wicket:id=lightbox src=resources/LightBox2Panel/%2fnetcms
  language=JavaScript/script
 
  And this link returns a 404 error...
 
  So what's wrong?
 
 
 
  -
  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: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro

Upps, sorry. Didn't recognized guice.

I would try to add it appropriatly to this way

public  class  MyApplicationextends  WebApplication{
protected  void  init()  {
addComponentInstantiationListener(
new  GuiceComponentInjector(this, getModule())
);
}

private  Module getModule()  {
return  new  Module()  {
public  void  configure(Binder binder)  {
binder.bind(IService.class).to(Service.class);
}
};
}
}

Cheers
Per




Re: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro

Is it the working solution?

Cheers
Per

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



Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
No.. I realized that the tests are running in parallel on hudson but from 
eclipse.

Since the application is bound to a thread local, then it fails.

D/

On May 18, 2010, at 2:18 AM, Per Newgro wrote:

 Is it the working solution?
 
 Cheers
 Per
 
 -
 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 tester failing in CI but not locally

2010-05-18 Thread Per Newgro

Sorry but more i can't do. Im not an hudson user.

Cheers
Per

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



Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
The problem is not a hudson problem.

The problem is that wicket tester tests do not want to be run in parallel.

D/

On May 18, 2010, at 2:38 AM, Per Newgro wrote:

 Sorry but more i can't do. Im not an hudson user.
 
 Cheers
 Per
 
 -
 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: Changing css class based on page

2010-05-18 Thread Ioannis Mavroukakis
In fact it was a lot simpler than I thought, this works like a charm.

private Link pageLink(final String id, final Class clazz) {
final BookmarkablePageLink link = new BookmarkablePageLink(id, 
clazz);
link.add(new AttributeModifier(id, true, new 
AbstractReadOnlyModelString() {
@Override
public String getObject() {
return 
AbstractBasePage.this.getClass().equals(clazz) ? current : ;
}
}));
return link;
}


On 17 May 2010, at 22:40, Ioannis Mavroukakis wrote:

 Thanks Jeremy that's great help as that's the route I considered initially 
 going down, trying to make it reusable is the next step..
 
 Y.
 On 17 May 2010, at 22:28, Jeremy Thomerson wrote:
 
 link1.add(new AttributeModifier(class, true, new
 AbstractReadOnlyModelString() {
 public String getObject() {
 return AbstractBasePage.this.getClass().equals(LinkOnePageClass.class) ?
 selectedPage : notSelectedPage;
 }
 });
 
 There's probably a way to make that more reusable - but that should get you
 started.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Mon, May 17, 2010 at 4:24 PM, Ioannis Mavroukakis 
 imavrouka...@gameaccount.com wrote:
 
 Hey guys got a newbish question I cannot get my head around, and I would
 appreciate any help.
 
 I've got an AbstractBasePage template using markup inheritance. It very
 simply has some BookmarkablePageLink's which are common
 across all pages. What I want to do, is have a different css class for the
 active link (i.e. the one whose page you are on) and another for the
 inactive ones
 and I cannot for the life of me figure out what's the best way to do it.
 Is it something I should be doing in code ?
 
 TIA!
 
 Yiannis.
 
 
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __
 
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email 
 __



Re: click url /submit cross target between iframes

2010-05-18 Thread Emulator
I've solved this problem with a dirty trick by changing the default onclick
string that generted by Link class.

class ChangeTarget extends Link
{

EditpageLink(String id, String TargetId)
{
super(id);
this._TargetId = TargetId;
}

@Override
public void onComponentTag(ComponentTag tag)
{
final String LocationRedirectHack = window.location.href;
super.onComponentTag(tag);
String clickEvent = tag.getAttribute(onclick);
if(clickEvent.indexOf(LocationRedirectHack)1)
try {throw new Exception(Wicket Version Updated, Please modify
this hack!);}
catch (Exception e) { e.printStackTrace();}
tag.put(onclick, clickEvent.replace(LocationRedirectHack,
window.parent.+._TargetId+.location.href));
}
}

2010/5/18 Emulator emulator.c...@gmail.com

 Hi everyone, I'm using wicket 1.4.8, and IE6(IE 6 request due to
 project restriction).
 I have a three pages, Menu(on left side), List(top on the right),
 Detail(buttom on the right).
 The List page is simply like a bookshelf that shows each book's name. When
 I click one of the book on the List. The book's info will be shown on the
 Detail page.

 Because of all books' data is coming from database, so I implement my
 pageable dataprovider and a custom listview so tha each book presented on
 the html table just like td wicket:id=1span
 wicket:id=text1/span/td

 List.page
 form wicket:id=ListForm target=_detail
 table  frame=border rules=none cellspacing=0px id=dataView
 tr style=background-color:#FF9
 th1st Column/th
 th2nd Column/th
 th3rd Column/th
 th4th Column/th
 /tr
 tr wicket:id=selectList onclick=ListForm.submit()
 td wicket:id=1a href=# wicket:id=link1 target=_detailspan
 wicket:id=text1/span/a/td
 td wicket:id=2a href=# wicket:id=link2 target=_detailspan
 wicket:id=text2/span/a/td
 td wicket:id=3a href=# wicket:id=link3 target=_detailspan
 wicket:id=text3/span/a/td
 td wicket:id=4a href=# wicket:id=link4 target=_detailspan
 wicket:id=text4/span/a/td
 /tr
 /table
 /form

 Then I process the above html code as a subclass of Link, process all
 onClick/onSubmit. And it would be fine if I just want to show info page on
 the List. If I set onClick to setResponsePage(new BookDetailPage(Book aBook,
 ...other Param));

 List.java

 void onClick()
 {
 setResponsePage(new BookDetailPage(Book aBook, ...other Param));
 }

 Detail.html
 form wicket:id=EditForm
 span wicket:id=booksId/span
 input type=text wicket:id=booksName/input
 input type=text wicket:id=booksPublisher/input
 span wicket:id=booksUpdateTime/span
 p/p
 input type=submit wicket:id=btnCommit/input
 /form

 But what I want is to show book info (BookDetailPage) on the detail page.
 so I use 3 iframes to include those 3 pages into one page - book_index, then
 process all iframe to wicket class InlineFrame.
 The reason of using iframe is to decrease the full-page reload and db
 connection that bookshelf uses.

 Book_Index.html
 form
 iframe wicket:id=_iMenu frameborder=1 framespacing=0 width=20%
 height=100% align=left/iframe
 iframe wicket:id=_iList frameborder=1 framespacing=0 width=80%
 height=75% align=top scrolling=no/iframe
 iframe wicket:id=_iDetail name=_detail frameborder=1
 framespacing=0 width=80% height=25% align=buttom/iframe
 /form

 Book_Index.java
 Books_Index()
 {
 super();
 add(new InlineFrame(_iMenu, new LeftMenu()));
 FunctionPage master = new FunctionPage(this);

 InlineFrame f_master = new InlineFrame(_iList,master);
 add(f_master);

 DataEditPage detail = new DataEditPage();
 InlineFrame iDetail = new InlineFrame(_iDetail, detail);
 iDetail.setOutputMarkupId(true);
 add(iDetail);

 master.setEditorPage(detail, this);
 }

 I've tried to specified form post target, url target on the List.html but
 not works.
 Or use it on List

 ListPage
 void onClick()
 {
 /* init actions */

 /* target is still remain in self */
  this.RequestCycle().setRequestTarget(new
 PageReferenceRequestTarget(detailPage));
  this.setResponsePage(new DetailPage());

 /*  no compatible RequestTarget for InlineFrame*/
  this.RequestCycle().setRequestTarget(detailFrame);
  this.setResponsePage(new DetailPage());
 }


 Is any way that can set link/post target to the detail frame, or other way
 I should do without iframe?

 Regards,
 Victor Chen



Re: Best practises question

2010-05-18 Thread James Carman
It's just a matter of understanding how anonymous inner classes (or
named inner classes) work.  It's not a Wicket thing.  It's a Java
thing.  So, if it's confusing, take it up with Oracle.

On Tue, May 18, 2010 at 3:05 AM, Rik van der Kleij rikvdkl...@gmail.com wrote:
 To mine opinion this Best practise is confusing. It is just a matter of do 
 not share Wicket components between pages because Wicket will not detect 
 while serializing pages that components are already serialized.

 The case of sharing anonymous IModel implementations is a special case 
 because implicitly a Wicket component is shared. So you have to be careful 
 with sharing models.

 Regards,
 Rik



 On 17 mei 2010, at 18:55, Jeremy Thomerson wrote:

 You should use PageReference (Page#getPageReference()).

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



 On Sun, May 16, 2010 at 11:52 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:

 Hi Jeremy,

 So an instance field inside a page that points to another page is also
 something you should avoid? In our application we using this pattern a lot
 (for going back to previous page) but it never seems to be any problem. So
 probably because our pages don't consume a lot of memory.

 Regards,
 Rik

 On 17 mei 2010, at 06:13, Jeremy Thomerson wrote:

 In general, you should not pass references to components to other pages.
 That section on anonymous inner classes is telling you that when you
 create
 an anonymous inner class and pass it to another page, you
 will inadvertently be passing a reference to the outer class, which is
 typically a page.  This builds up memory and you will get a OOM.  Passing
 models between pages is absolutely fine - as long as you're not
 accidentally
 passing a bunch of other stuff with it (including large domain objects -
 which should be detached by using a detachable model).  The page linked
 to
 even says that you will often pass models between pages.

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



 On Sun, May 16, 2010 at 11:05 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:

 Hi Bernard and Mike,

 According to

 https://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-AnonymousInnerclassessharingmodels
  could eventually lead to Out of memory error.

 Holding a page reference in an instance field that points to another
 page
 looks the same but it is doesn't seems to be a problem. What's the
 difference?

 Regards,
 Rik


 On 16 mei 2010, at 04:39, Michael O'Cleirigh wrote:

 Hello,

 I'm not sure on the answer to your question about the anonymous inner
 class but in general sharing models between pages can be a bad idea.

 The memory issues comes into play if the IModel is like Model and the
 contained object is not transient (it is serialized as part of the
 page).

 While Pages are serialized each page is serialized independently so on
 page reload the IModel from the first page is no longer the same object
 instance as the IModel from the second page.  At deserialization time
 the
 page1.model.getObject().equals page2.model.getObject() but
 page1.model.getObject() != page2.model.getObject(); so any changes to
 either
 model are not shared between then.

 This is not a problem if the model is loadable since the memory of the
 page it is contained in doesn't matter as the value is loaded from the
 backend db or some other independent data source like the httpsession,
 or
 with wicketApplication.

 You can see the same effect if you try and share a model between a
 panel
 and a ModelWindow that uses a PageCreator

 Hope this helps,

 Mike
 Hi,

 Can someone explain me why it is a memory issue when an instance of an
 anonymous IModel class is passed to another page to be shared, but it
 seems
 to be no problem when a page reference is passed to another page and is
 put
 in an instance field (for example to be used in a button to navigate
 back to
 previous page)?

 Many thanks.

 Regards,
 Rik



 -
 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




 -
 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: Best practises question

2010-05-18 Thread Rik van der Kleij
No, that is not what I mention. The point is that the Best practise has to be: 
Do not share Wicket components between pages.

Regards,
Rik


On 18 mei 2010, at 12:37, James Carman wrote:

 It's just a matter of understanding how anonymous inner classes (or
 named inner classes) work.  It's not a Wicket thing.  It's a Java
 thing.  So, if it's confusing, take it up with Oracle.
 
 On Tue, May 18, 2010 at 3:05 AM, Rik van der Kleij rikvdkl...@gmail.com 
 wrote:
 To mine opinion this Best practise is confusing. It is just a matter of do 
 not share Wicket components between pages because Wicket will not detect 
 while serializing pages that components are already serialized.
 
 The case of sharing anonymous IModel implementations is a special case 
 because implicitly a Wicket component is shared. So you have to be careful 
 with sharing models.
 
 Regards,
 Rik
 
 
 
 On 17 mei 2010, at 18:55, Jeremy Thomerson wrote:
 
 You should use PageReference (Page#getPageReference()).
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Sun, May 16, 2010 at 11:52 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:
 
 Hi Jeremy,
 
 So an instance field inside a page that points to another page is also
 something you should avoid? In our application we using this pattern a lot
 (for going back to previous page) but it never seems to be any problem. So
 probably because our pages don't consume a lot of memory.
 
 Regards,
 Rik
 
 On 17 mei 2010, at 06:13, Jeremy Thomerson wrote:
 
 In general, you should not pass references to components to other pages.
 That section on anonymous inner classes is telling you that when you
 create
 an anonymous inner class and pass it to another page, you
 will inadvertently be passing a reference to the outer class, which is
 typically a page.  This builds up memory and you will get a OOM.  Passing
 models between pages is absolutely fine - as long as you're not
 accidentally
 passing a bunch of other stuff with it (including large domain objects -
 which should be detached by using a detachable model).  The page linked
 to
 even says that you will often pass models between pages.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Sun, May 16, 2010 at 11:05 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:
 
 Hi Bernard and Mike,
 
 According to
 
 https://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-AnonymousInnerclassessharingmodels
  could eventually lead to Out of memory error.
 
 Holding a page reference in an instance field that points to another
 page
 looks the same but it is doesn't seems to be a problem. What's the
 difference?
 
 Regards,
 Rik
 
 
 On 16 mei 2010, at 04:39, Michael O'Cleirigh wrote:
 
 Hello,
 
 I'm not sure on the answer to your question about the anonymous inner
 class but in general sharing models between pages can be a bad idea.
 
 The memory issues comes into play if the IModel is like Model and the
 contained object is not transient (it is serialized as part of the
 page).
 
 While Pages are serialized each page is serialized independently so on
 page reload the IModel from the first page is no longer the same object
 instance as the IModel from the second page.  At deserialization time
 the
 page1.model.getObject().equals page2.model.getObject() but
 page1.model.getObject() != page2.model.getObject(); so any changes to
 either
 model are not shared between then.
 
 This is not a problem if the model is loadable since the memory of the
 page it is contained in doesn't matter as the value is loaded from the
 backend db or some other independent data source like the httpsession,
 or
 with wicketApplication.
 
 You can see the same effect if you try and share a model between a
 panel
 and a ModelWindow that uses a PageCreator
 
 Hope this helps,
 
 Mike
 Hi,
 
 Can someone explain me why it is a memory issue when an instance of an
 anonymous IModel class is passed to another page to be shared, but it
 seems
 to be no problem when a page reference is passed to another page and is
 put
 in an instance field (for example to be used in a button to navigate
 back to
 previous page)?
 
 Many thanks.
 
 Regards,
 Rik
 
 
 
 -
 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
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: 

Re: Best practises question

2010-05-18 Thread James Carman
Well, I think that's quite obvious when you consider that each page is
the root of a tree (not directed, acyclic graph) of components.
Each component can have at most one parent.

On Tue, May 18, 2010 at 6:54 AM, Rik van der Kleij rikvdkl...@gmail.com wrote:
 No, that is not what I mention. The point is that the Best practise has to 
 be: Do not share Wicket components between pages.

 Regards,
 Rik


 On 18 mei 2010, at 12:37, James Carman wrote:

 It's just a matter of understanding how anonymous inner classes (or
 named inner classes) work.  It's not a Wicket thing.  It's a Java
 thing.  So, if it's confusing, take it up with Oracle.

 On Tue, May 18, 2010 at 3:05 AM, Rik van der Kleij rikvdkl...@gmail.com 
 wrote:
 To mine opinion this Best practise is confusing. It is just a matter of do 
 not share Wicket components between pages because Wicket will not detect 
 while serializing pages that components are already serialized.

 The case of sharing anonymous IModel implementations is a special case 
 because implicitly a Wicket component is shared. So you have to be careful 
 with sharing models.

 Regards,
 Rik



 On 17 mei 2010, at 18:55, Jeremy Thomerson wrote:

 You should use PageReference (Page#getPageReference()).

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



 On Sun, May 16, 2010 at 11:52 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:

 Hi Jeremy,

 So an instance field inside a page that points to another page is also
 something you should avoid? In our application we using this pattern a lot
 (for going back to previous page) but it never seems to be any problem. So
 probably because our pages don't consume a lot of memory.

 Regards,
 Rik

 On 17 mei 2010, at 06:13, Jeremy Thomerson wrote:

 In general, you should not pass references to components to other pages.
 That section on anonymous inner classes is telling you that when you
 create
 an anonymous inner class and pass it to another page, you
 will inadvertently be passing a reference to the outer class, which is
 typically a page.  This builds up memory and you will get a OOM.  Passing
 models between pages is absolutely fine - as long as you're not
 accidentally
 passing a bunch of other stuff with it (including large domain objects -
 which should be detached by using a detachable model).  The page linked
 to
 even says that you will often pass models between pages.

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



 On Sun, May 16, 2010 at 11:05 PM, Rik van der Kleij 
 rikvdkl...@gmail.comwrote:

 Hi Bernard and Mike,

 According to

 https://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-AnonymousInnerclassessharingmodels
  could eventually lead to Out of memory error.

 Holding a page reference in an instance field that points to another
 page
 looks the same but it is doesn't seems to be a problem. What's the
 difference?

 Regards,
 Rik


 On 16 mei 2010, at 04:39, Michael O'Cleirigh wrote:

 Hello,

 I'm not sure on the answer to your question about the anonymous inner
 class but in general sharing models between pages can be a bad idea.

 The memory issues comes into play if the IModel is like Model and the
 contained object is not transient (it is serialized as part of the
 page).

 While Pages are serialized each page is serialized independently so on
 page reload the IModel from the first page is no longer the same object
 instance as the IModel from the second page.  At deserialization time
 the
 page1.model.getObject().equals page2.model.getObject() but
 page1.model.getObject() != page2.model.getObject(); so any changes to
 either
 model are not shared between then.

 This is not a problem if the model is loadable since the memory of the
 page it is contained in doesn't matter as the value is loaded from the
 backend db or some other independent data source like the httpsession,
 or
 with wicketApplication.

 You can see the same effect if you try and share a model between a
 panel
 and a ModelWindow that uses a PageCreator

 Hope this helps,

 Mike
 Hi,

 Can someone explain me why it is a memory issue when an instance of an
 anonymous IModel class is passed to another page to be shared, but it
 seems
 to be no problem when a page reference is passed to another page and is
 put
 in an instance field (for example to be used in a button to navigate
 back to
 previous page)?

 Many thanks.

 Regards,
 Rik



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

SV: Best practises question

2010-05-18 Thread Wilhelmsen Tor Iver
 Well, I think that's quite obvious when you consider that each page is
 the root of a tree (not directed, acyclic graph) of components.
 Each component can have at most one parent.

But you can pass a component to a different page/component without adding it; 
like in the example of having a back link which wants a page to navigate back 
to. If you keep that Page in an instance variable in the back-from Page you 
will needlessly serialize that, too, unless you use a PageReference.

- Tor Iver

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



Re: Small doubt about wicket and Html

2010-05-18 Thread Fernando Wermus
wicket:enclosure is the best option

On Mon, May 17, 2010 at 7:15 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 You can not do it directly in HTML - it breaks the separation of concerns.
  But, you can create a WebMarkupContainer, set the visibility on it, and
 nest your HTML within it.  Then you can control the visibility for that
 entire block with only the single component.  Also, see wicket:enclosure.

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



 On Mon, May 17, 2010 at 4:41 PM, Victor_Trapiello vic...@trapiello.net
 wrote:

 
  Hello guy;
 
  I´m in Spain 12.0 o´clock nothing to do and before falling a sleep I
  wonder... is there any method / way to hidde wicket items/componentes
  direct
  in the html code¿? I mean now I do not want to show an image, in my java
  code I say bablablabla myLabelWithImage.SetVisible(false);
 
  can we do something similar like in php or strutsc, like puting ablock of
  html and at the beginning one conditions intead putting everything in the
  java code¿?
 
  Thank you very much guys!
 
  Victor Trapiello
  www.trapiello.net
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Small-doubt-about-wicket-and-Html-tp2220418p2220418.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
 
 




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Fernando Wermus
I need a hand with facebook connect and wicket in some weeks. Could you
share your wicket facebook code? I imagine it is pretty easy.

thanks in advance

On Mon, May 17, 2010 at 10:31 PM, Richard Nichols r...@visural.com wrote:

 Hey all,

 Just thought fellow Wicketeers might be interested to take a look at a
 site I have just launched built 100% with Wicket -
 http://www.onmydoorstep.com.au/

 The site is a community portal for people living in Victoria,
 Australia and displays government data about every suburb, city and
 town in the state. It also allows users to find government services
 and business nearby and submit community events/festivals and ask
 questions of other users.

 It integrates Wicket with Facebook Connect, Google Maps, Google
 Charts, Google's Weather API, plus on the backend, warp-persist, Guice
 and Hibernate/JPA. I also made extensive use of
 http://code.google.com/p/visural-wicket

 Anyhow - happy to answer any questions about the above technologies
 and the experience of building the site with Wicket. Also welcome
 feedback  criticism should you have some :)


 cheers,
 Richard.

 --
 Richard Nichols :: http://www.visural.com/ ::
 http://www.richardnichols.net/

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


RE: Changing css class based on page

2010-05-18 Thread Jeremy Thomerson
I'd suggest modifying the class rather than the ID in case you end up doing 
something with ajax later.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Ioannis Mavroukakis imavrouka...@gameaccount.com
Sent: Tuesday, May 18, 2010 4:07 AM
To: users@wicket.apache.org
Subject: Re: Changing css class based on page

In fact it was a lot simpler than I thought, this works like a charm.

private Link pageLink(final String id, final Class clazz) {
final BookmarkablePageLink link = new BookmarkablePageLink(id, 
clazz);
link.add(new AttributeModifier(id, true, new 
AbstractReadOnlyModelString() {
@Override
public String getObject() {
return 
AbstractBasePage.this.getClass().equals(clazz) ? current : ;
}
}));
return link;
}


On 17 May 2010, at 22:40, Ioannis Mavroukakis wrote:

 Thanks Jeremy that's great help as that's the route I considered initially 
 going down, trying to make it reusable is the next step..
 
 Y.
 On 17 May 2010, at 22:28, Jeremy Thomerson wrote:
 
 link1.add(new AttributeModifier(class, true, new
 AbstractReadOnlyModelString() {
 public String getObject() {
 return AbstractBasePage.this.getClass().equals(LinkOnePageClass.class) ?
 selectedPage : notSelectedPage;
 }
 });
 
 There's probably a way to make that more reusable - but that should get you
 started.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Mon, May 17, 2010 at 4:24 PM, Ioannis Mavroukakis 
 imavrouka...@gameaccount.com wrote:
 
 Hey guys got a newbish question I cannot get my head around, and I would
 appreciate any help.
 
 I've got an AbstractBasePage template using markup inheritance. It very
 simply has some BookmarkablePageLink's which are common
 across all pages. What I want to do, is have a different css class for the
 active link (i.e. the one whose page you are on) and another for the
 inactive ones
 and I cannot for the life of me figure out what's the best way to do it
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Best practises question

2010-05-18 Thread James Carman
Perhaps during development mode there should be a warning message if
Wicket sees any fields on any components that are of type Page (or a
subclass thereof)?  Or, even if the actual object is a page (the
variable type could be some interface), it should spit out a warning
telling you to use PageReference instead?

On Tue, May 18, 2010 at 8:37 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote:
 Well, I think that's quite obvious when you consider that each page is
 the root of a tree (not directed, acyclic graph) of components.
 Each component can have at most one parent.

 But you can pass a component to a different page/component without adding it; 
 like in the example of having a back link which wants a page to navigate 
 back to. If you keep that Page in an instance variable in the back-from 
 Page you will needlessly serialize that, too, unless you use a PageReference.

 - Tor Iver

 -
 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: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Ajayi Yinka
 good job.

On Tue, May 18, 2010 at 4:49 AM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 I concur - very nice.

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



 On Mon, May 17, 2010 at 8:43 PM, Cristi Manole cristiman...@gmail.com
 wrote:

  cool site! I like it! congrats.
 
  On Mon, May 17, 2010 at 9:31 PM, Richard Nichols r...@visural.com wrote:
 
   Hey all,
  
   Just thought fellow Wicketeers might be interested to take a look at a
   site I have just launched built 100% with Wicket -
   http://www.onmydoorstep.com.au/
  
   The site is a community portal for people living in Victoria,
   Australia and displays government data about every suburb, city and
   town in the state. It also allows users to find government services
   and business nearby and submit community events/festivals and ask
   questions of other users.
  
   It integrates Wicket with Facebook Connect, Google Maps, Google
   Charts, Google's Weather API, plus on the backend, warp-persist, Guice
   and Hibernate/JPA. I also made extensive use of
   http://code.google.com/p/visural-wicket
  
   Anyhow - happy to answer any questions about the above technologies
   and the experience of building the site with Wicket. Also welcome
   feedback  criticism should you have some :)
  
  
   cheers,
   Richard.
  
   --
   Richard Nichols :: http://www.visural.com/ ::
   http://www.richardnichols.net/
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  Cristi Manole
 
  Nova Creator Software
  www.novacreator.com
 




-- 
Ajayi S . Yinka
+2348022684477


Re: firefox 3.5.9

2010-05-18 Thread Douglas Ferguson
It's definitely happening on machines that don't have firebug.

D/
On May 18, 2010, at 12:21 AM, Douglas Ferguson wrote:

 I think firebug is installed but not running.
 
 D/
 
 On May 17, 2010, at 10:35 PM, Martin Makundi wrote:
 
 Are you using firebug?
 
 2010/5/18 Douglas Ferguson doug...@douglasferguson.us:
 Where are experiencing some strange latency with ajax (even the indicator 
 gif stops spining), so far we've only seen it on windows firefox 3.5.9
 
 Are there any know issues?
 
 D/
 -
 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
 


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



Getting URL for a bookmarkable page

2010-05-18 Thread Doug Leeper
I am doing the following to get the URL for my bookmarked page.

PageParameters params = new PageParameters();
params.put(properties, URLEncoder.encode(jproperties.toString(),
UTF-8));

CharSequence url = urlFor(MyPage.class, params);

WebRequest webRequest = (WebRequest) getRequest();
HttpServletRequest request = webRequest.getHttpServletRequest();
URL currUrl = new URL(request.getRequestURL().toString());

URL u = new URL(currUrl.getProtocol(), currUrl.getHost(), currUrl
.getPort(), request.getContextPath() + / + 
url.toString());

PD4ML pd4ml = new PD4ML();
pd4ml.setHtmlWidth(1024);

pd4ml.render(u, os);

The problem I am having is that urlFor() creates and instance of MyPage.class 
which I don't want.  Is there another or better way to get the full URL for a 
page in my application without calling the constructor?

Thanks
- Doug


Re: Getting URL for a bookmarkable page

2010-05-18 Thread Doug Leeper

I have changed the code to the following:

String uri = inSessionReport/ + URLEncoder.encode(jproperties.toString(),
UTF-8);

String url = RequestUtils.toAbsolutePath(uri);

PD4ML pd4ml = new PD4ML();
pd4ml.setHtmlWidth(1024);

pd4ml.render(new URL(url), os);

But I am still seeing to Page constructor invocations with the same stack
trace when I create an exception and print the stack trace.  Any idea on how
to not call the constructor twice?

java.lang.Exception: InSessionReportPage.here 1
at
com.alllocal.wicket.main.reports.InSessionReportPage$$M$caa816f0.__init__(InSessionReportPage.java:48)
at
com.alllocal.wicket.main.reports.InSessionReportPage$$A$caa816f0.__init__(generated)
at
com.alllocal.wicket.main.reports.InSessionReportPage.init(InSessionReportPage.java:123)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
com.alllocal.wicket.AppApplication$1.processEvents(AppApplication.java:50001)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at
com.positiontech.hib.HibernateFilter.doFilter(HibernateFilter.java:70)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-URL-for-a-bookmarkable-page-tp2221421p2221494.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: Request Https page

2010-05-18 Thread Igor Vaynberg
https://localhost:8080/test

-igor

On Mon, May 17, 2010 at 10:54 PM, v...@wav@gmail.com vela@gmail.com wrote:

 Hello,

 I have implemented the HttpsRequestCycleProcessor in the application class
 and added @RequiredHttps in the Login Page.

 But i haven't used https in any of the application before. Could anyone tell
 how to access the page from the browser. If  it is a http page, we simply
 call like http://localhost:8080/test. But how to call the application for
 https request.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Request-Https-page-tp2197896p2220768.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: Image Upload Using TinyMCE Within Wicket Framework

2010-05-18 Thread Muro Copenhagen
Hi...

I am facing a new problem with the TinyMCE upload image, i hope someone can
assist me on.

I can see that the ImageUpload tinymce example uses a temporary path to
store the images...

If i want to store them on a static folder, like the folder: c:\images

How would i achive that ?

If can to overwrite you getTemporaryDirPath() folder and set it to
c:\images, the upload works fine.

But the reference to the image, is store with the wicket session reference.
Here is the an example on how it is stored:

img
src=?wicket:interface=:25:editCaseForm:uploadPanel::IResourceListener::amp;filename=testerman.JPGamp;contenttype=image/jpeg
alt= /

How would i manage to store it a manner so it is not session dependent...?

Any help will be appreciated...

Best Regards
Muso

On Fri, May 14, 2010 at 3:03 PM, Muro Copenhagen copenha...@gmail.comwrote:

 Hi Michal

 Great thanks for the help..

 Best Regards
 Muro

 2010/5/14 Michał Letyński mletyn...@consol.pl

 Hi.
 Yes you are right the last released version is 1.4.1. So you must build it
 localy.

 W dniu 2010-05-14 11:19, Muro Copenhagen pisze:

  Hi Michal

 I appreciate you're effort spelling things out.

 I am still not sure on how to get it to work.

 When i add this dependency to my project it won't work:
 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdtinymce/artifactId
 version1.4.7-SNAPSHOT/version
 /dependency
 And that makes sense since i can't find that version in the repo:
 http://wicketstuff.org/maven/repository

 So how would i get my project to use the tinymce version 1.4.7-SNAPSHOT ?

 Maybe it's a silly question... but i am not sure how to make it work...

 Best Regards
 Muro

 2010/5/13 Michał Letyńskimletyn...@consol.pl



 Hi.
 Its commited to trunk and in pom we have 1.4.7-SNAPSHOT so it should be
 available ...


 W dniu 2010-05-12 15:23, Muro Copenhagen pisze:

  Hi again...


 I guess a new release of wicket-stuff tinymce has to be made in order
 to
 use
 it...

 The current release 1.4-rc7 misses the changes you have commited...

 Who can make a new release of wicket-stuff tinymce so we can use the
 commited code ?

 Best Regards
 Muro

 2010/5/12 Michał Letyńskimletyn...@consol.pl





 Hi.
 Its one of tiny examples:



 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/tinymce-parent/tinymce-examples

 W dniu 2010-05-12 12:40, Muro Copenhagen pisze:





 Hi Michael,

 That is a great example. But you mentioned that you have commited the
 sample
 to wicket-stuff.

 I can't find it anywhere so can you please send a link or
 something...

 Best regards
 Muro

 On Tue, May 4, 2010 at 2:49 PM, Robert Kimothokimot...@gmail.com
  wrote:







 You are right I have a wicket path in src and it looks like this




 'resources/wicket.contrib.tinymce.InPlaceEditBehavior/tiny_mce/plugins/emotions/img/smiley-cool.gif'
 this is what you get submitted to the server, but the image does not
 get
 displayed.
 Can you guide me to using the IResourceListener or getting the
 emoticon
 displayed at the client side.

 Regards,
 Kimotho.

 2010/5/4 Michał Letyńskimletyn...@consol.pl







 Hi.
 If you have images in tiny with external src it should work but if
 you






 have






 in src a wicket path you must change it (to component which will
 get
 the
 image look at IResourceListener)  before displainng image in label,
 multilinelabel, etc.


 W dniu 2010-05-03 09:10, Robert Kimotho pisze:

  When I submit a form with an emoticon from the fullfeatured
 tinymce,
 the






 image doesn't get displayed in the destination
 only the text.
 any suggestions, I've been stuck here for a while now.

 2010/5/1 新希望软件 -- 俞宏伟nhsoft@gmail.com









 image upload example run failuer, the application
 throwsNoClassDefFoundError
 .

 WicketMessage: Can't instantiate page using constructor public
 wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

 Root cause:

 java.lang.NoClassDefFoundError:
 wicket/contrib/tinymce/image/ImageUploadPanel
 at














 wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage.init(ImageUploadTinyMCEPage.java:42)






 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native




 Method)


 at
 java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at














 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)






 at

















 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)






 at

















 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)






 at

















 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)






 at

















 

Another Wicket Site

2010-05-18 Thread Ayodeji Aladejebi
Hi all,
just to announce another wicket project I am working on. we
just launched the beta version

http://www.nelexnigeria.com



-- 
Aladejebi Ayodeji A.,
DabarObjects Solutions
Phone: +234 9 875 1763
Mobile: +234 803 589 1780
Email: d...@dabarobjects.com
Web: www.dabarobjects.com


Re: Javascript template as linked header contribution?

2010-05-18 Thread Igor Vaynberg
jira issue or this request never happened :)

-igor

On Tue, May 18, 2010 at 12:07 AM, Ralf Eichinger
ralf.eichin...@pixotec.de wrote:
 Finally I made it working after finding this WIKI entry:
 https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html

 Just used it the same way for Javascript file.

 Igor: This very useful class should be integrated into Wicket core!
 (under org.apache.wicket.markup.html.resources)

 Am Montag, den 19.04.2010, 17:52 -0700 schrieb Igor Vaynberg:
 i meant you have to create the classes...

 -igor

 On Mon, Apr 19, 2010 at 4:10 PM, Ralf Eichinger
 ralf.eichin...@pixotec.de wrote:
  Am Montag, den 19.04.2010, 09:08 -0700 schrieb Igor Vaynberg:
  you will have to create a TextTemplateResource to serve such resources
  and a TextTemplateResourceReference to create urls for them.
 
  -igor
 
  as there are no TextTemplateResource and TextTemplateResourceReference
  classes in Wicket 1.4.7, I tried this:
 
  PackagedTextTemplate jsTemplate = new
   PackagedTextTemplate(this.getClass(), js/lightbox.js);
 
  TextTemplateSharedResourceFactory ttsr = new
   TextTemplateSharedResourceFactory(jsTemplate, this.getClass());
 
  String webappContext = WebApplication.get().getServletContext()
   .getContextPath();
 
  MapString, Object parameters = new HashMapString, Object();
  parameters.put(webappContext, webappContext);
  TextTemplateLink ref = new TextTemplateLink(lightbox, ttsr,
   parameters);
  add(ref);
 
  and in panels html:
 
  wicket:head
  script wicket:id=lightbox src=# language=JavaScript/script
  /wicket:head
 
  this resulted in a rendered URL (that looks weired):
 
  script wicket:id=lightbox src=resources/LightBox2Panel/%2fnetcms
  language=JavaScript/script
 
  And this link returns a 404 error...
 
  So what's wrong?
 
 
 
  -
  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



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



Re: wicket tester failing in CI but not locally

2010-05-18 Thread Igor Vaynberg
if you want the tests to run in parallel you have to create a wicket
tester inside every test method instead of just once per class. that
way the threadlocal is set into every thread.

-igor

On Tue, May 18, 2010 at 1:49 AM, Douglas Ferguson
doug...@douglasferguson.us wrote:
 The problem is not a hudson problem.

 The problem is that wicket tester tests do not want to be run in parallel.

 D/

 On May 18, 2010, at 2:38 AM, Per Newgro wrote:

 Sorry but more i can't do. Im not an hudson user.

 Cheers
 Per

 -
 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: Best practises question

2010-05-18 Thread Brian Topping
It might even be interesting to have warnings like this as pluggable runtime 
libraries that users could download from wicket-stuff.  The idea is if a 
developer downloads and installs some of the libraries on their instance, they 
would get additional debugging output, and because they are in wicket-stuff, 
there's more opportunity for community participation.  

Maybe there's an SPI that uses AOP for the libraries to plug in with.

It's kind of like running 'lint' on the C compilers of yore, but with 
metadata-driven plugins that would be easy to share.

I bring it up because a client project I am working on has this problem all 
over the place.  It was something I knew had a solution, but along with a 
hundred other worst practices, it doesn't get solved quickly unless I happen to 
get hit over the head with the answer in a forum like this or while surfing.  
Installing a wicket lint superbundle would have given me a great log of 
problems and solutions, making both this app and the world of wicket apps that 
much more robust and appealing to new candidates.

Brian

On May 18, 2010, at 9:44 AM, James Carman wrote:

 Perhaps during development mode there should be a warning message if
 Wicket sees any fields on any components that are of type Page (or a
 subclass thereof)?  Or, even if the actual object is a page (the
 variable type could be some interface), it should spit out a warning
 telling you to use PageReference instead?
 
 On Tue, May 18, 2010 at 8:37 AM, Wilhelmsen Tor Iver toriv...@arrive.no 
 wrote:
 Well, I think that's quite obvious when you consider that each page is
 the root of a tree (not directed, acyclic graph) of components.
 Each component can have at most one parent.
 
 But you can pass a component to a different page/component without adding 
 it; like in the example of having a back link which wants a page to 
 navigate back to. If you keep that Page in an instance variable in the 
 back-from Page you will needlessly serialize that, too, unless you use a 
 PageReference.
 
 - Tor Iver
 
 -
 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: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Zilvinas Vilutis
Is it broken? URL http://www.onmydoorstep.com.au/ does not open any page for
me

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com


On Tue, May 18, 2010 at 6:59 AM, Ajayi Yinka iamstyaj...@googlemail.comwrote:

  good job.

 On Tue, May 18, 2010 at 4:49 AM, Jeremy Thomerson 
 jer...@wickettraining.com
  wrote:

  I concur - very nice.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Mon, May 17, 2010 at 8:43 PM, Cristi Manole cristiman...@gmail.com
  wrote:
 
   cool site! I like it! congrats.
  
   On Mon, May 17, 2010 at 9:31 PM, Richard Nichols r...@visural.com
 wrote:
  
Hey all,
   
Just thought fellow Wicketeers might be interested to take a look at
 a
site I have just launched built 100% with Wicket -
http://www.onmydoorstep.com.au/
   
The site is a community portal for people living in Victoria,
Australia and displays government data about every suburb, city and
town in the state. It also allows users to find government services
and business nearby and submit community events/festivals and ask
questions of other users.
   
It integrates Wicket with Facebook Connect, Google Maps, Google
Charts, Google's Weather API, plus on the backend, warp-persist,
 Guice
and Hibernate/JPA. I also made extensive use of
http://code.google.com/p/visural-wicket
   
Anyhow - happy to answer any questions about the above technologies
and the experience of building the site with Wicket. Also welcome
feedback  criticism should you have some :)
   
   
cheers,
Richard.
   
--
Richard Nichols :: http://www.visural.com/ ::
http://www.richardnichols.net/
   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
   
  
  
   --
   Cristi Manole
  
   Nova Creator Software
   www.novacreator.com
  
 



 --
 Ajayi S . Yinka
 +2348022684477



Re: Getting URL for a bookmarkable page

2010-05-18 Thread Doug Leeper

figured it out.

It wasn't wicket but PD4ML.

Not sure why but I had to remove

meta http-equiv=Content-type content=text/html;charset=utf-8

from my HTML page.

When it was in there, it gave a message that it was retrying with utf-8.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-URL-for-a-bookmarkable-page-tp2221421p2221693.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: Small doubt about wicket and Html

2010-05-18 Thread Victor_Trapiello

Thank you very much guys
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Small-doubt-about-wicket-and-Html-tp2220418p2221787.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: When is AbstractBehavior#bind not called?

2010-05-18 Thread David Chang
what i can do in onbeforerender to make the component 1's bind get called (in 
my case, the behavior contributes js and css to head)?

components, not behaviors, have onbeforerender, correct? 

Thanks!

--- On Mon, 5/17/10, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 From: Igor Vaynberg igor.vaynb...@gmail.com
 Subject: Re: When is AbstractBehavior#bind not called?
 To: users@wicket.apache.org
 Date: Monday, May 17, 2010, 10:26 PM
 behaviors have onbeforerender which
 will be called no matter what kind
 of link is used.
 
 -igor
 
 On Mon, May 17, 2010 at 6:30 PM, David Chang david_q_zh...@yahoo.com
 wrote:
  Any suggestion about minimal design changes?
 
  Thanks!
 
  --- On Mon, 5/17/10, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  From: Igor Vaynberg igor.vaynb...@gmail.com
  Subject: Re: When is AbstractBehavior#bind not
 called?
  To: users@wicket.apache.org
  Date: Monday, May 17, 2010, 11:27 AM
  the first link is a bookmarkable
  link, it recreates the page instance.
  bind is only called when the behavior is *added*
 to the
  component.
 
  link 2 is not a bookmarkable link, it doesnt
 recreate the
  page
  instance so the behavior is not added because a
 page
  instance where
  the behavior has already been added is used, thus
 no bind
  call
 
  -igor
 
  On Mon, May 17, 2010 at 6:22 AM, David Chang
 david_q_zh...@yahoo.com
  wrote:
   I have a top page which has two panel-based
  components.
  
   Component 1 implements AbstractBehavior's
 bind
  method.
  
   Component 2 has a wicket Link pointing to a
 child
  page.
  
   When I am at the top page, refresh always
 gets #bind
  called.
  
   When I click the Link in Component 2, the
 bind method
  in Component 1 does not get called.
  
   Can anybody tell why this happened?
  
   I am quite puzzled. I am kind of new in
 wicket. I am
  using wicket 1.4.8 on tomcat.
  
   Regards.
  
  
  
  
  
  
 
 -
   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
 
 
 
 -
 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



Simple Validation question...

2010-05-18 Thread Victor_Trapiello

Hello guys; as I told you in previous post, I´m a new wicket developer, I
like it, but some times like everybody I find some dificulties, like this
stupid thing.

I´m trying to validate and IBAN number (Bank account number) it is too bing
to store it like an integer value so I have stored this IBAN like a string (
it cointains from 1 to 32 characters); I´m validating this data like:

Model ibanModel= new ibanModel();
TextField iban=new TextField(iban, ibanModel);
iban.StringValidator.minimum(1);
iban.StrinvValidator.maximun(32);

so with that I´m sure that my IBAN is an string from 1 to 32 characters,
fantastic! but... I do not want characters in my string only number...and as
I told you before the number is too big to store it and validate with the
integer class...

Discuss!!

Thank you very much guys!!

Victor Trapiello
www.trapiello.net




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221798.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: When is AbstractBehavior#bind not called?

2010-05-18 Thread Igor Vaynberg
if you are just contributing to head then the proper way is to let
your behavior implement IHeaderContributor

-igor

On Tue, May 18, 2010 at 1:08 PM, David Chang david_q_zh...@yahoo.com wrote:
 what i can do in onbeforerender to make the component 1's bind get called (in 
 my case, the behavior contributes js and css to head)?

 components, not behaviors, have onbeforerender, correct?

 Thanks!

 --- On Mon, 5/17/10, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 From: Igor Vaynberg igor.vaynb...@gmail.com
 Subject: Re: When is AbstractBehavior#bind not called?
 To: users@wicket.apache.org
 Date: Monday, May 17, 2010, 10:26 PM
 behaviors have onbeforerender which
 will be called no matter what kind
 of link is used.

 -igor

 On Mon, May 17, 2010 at 6:30 PM, David Chang david_q_zh...@yahoo.com
 wrote:
  Any suggestion about minimal design changes?
 
  Thanks!
 
  --- On Mon, 5/17/10, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  From: Igor Vaynberg igor.vaynb...@gmail.com
  Subject: Re: When is AbstractBehavior#bind not
 called?
  To: users@wicket.apache.org
  Date: Monday, May 17, 2010, 11:27 AM
  the first link is a bookmarkable
  link, it recreates the page instance.
  bind is only called when the behavior is *added*
 to the
  component.
 
  link 2 is not a bookmarkable link, it doesnt
 recreate the
  page
  instance so the behavior is not added because a
 page
  instance where
  the behavior has already been added is used, thus
 no bind
  call
 
  -igor
 
  On Mon, May 17, 2010 at 6:22 AM, David Chang
 david_q_zh...@yahoo.com
  wrote:
   I have a top page which has two panel-based
  components.
  
   Component 1 implements AbstractBehavior's
 bind
  method.
  
   Component 2 has a wicket Link pointing to a
 child
  page.
  
   When I am at the top page, refresh always
 gets #bind
  called.
  
   When I click the Link in Component 2, the
 bind method
  in Component 1 does not get called.
  
   Can anybody tell why this happened?
  
   I am quite puzzled. I am kind of new in
 wicket. I am
  using wicket 1.4.8 on tomcat.
  
   Regards.
  
  
  
  
  
  
 
 -
   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
 
 

 -
 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: Small doubt about wicket and Html

2010-05-18 Thread nicolas melendez
you should use HTML/CSS for desing and java for GUI logic, like make
something invisible or visible.


On Tue, May 18, 2010 at 4:36 PM, Victor_Trapiello vic...@trapiello.netwrote:


 Thank you very much guys
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Small-doubt-about-wicket-and-Html-tp2220418p2221787.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




-- 
NM (Nicolás Meléndez)
Java Software Developer

A) Google App Engine works:

1) http://www.clasificad.com.ar - Local free classifieds for  housing, sale,
services, local community, curses,jobs, and events - GAE/J + Wicket + YUI

2) http://www.chessk.com - Massive multiplayer chess online - GAE/J +
Applets + Wicket

B) Linkedin: http://ar.linkedin.com/in/nicolasmelendez


Exempt pages from pagemap

2010-05-18 Thread Loren Cole
I've got a couple of pages which display data that changes often and I want
to be sure that when a user hits refresh they get a fresh new copy of that
page.  Unfortunately, if I've used setResponsePage(new MyPage(params); to
get to these pages, then a refresh does not update the data, while hitting
the back button and resubmitting or clicking a link to the bookmarkable page
does.

Is there a way I can simply exempt these pages from the cache using wicket
1.3.7?

Thanks,
Loren


replace panel problems

2010-05-18 Thread Ivoneta

I have a web Page with a panel. When I click a ajax button, the panel is
replace. In  the new panel the javaScripts functions doesn't work. Why that
happened? What am I missing?
Here is the code

the webpage html
head
 script language=JavaScript1.2 src=views/js/accordion.js/script
/head
body
div class=quotPan2 bg_gray_plane wicket:id=CreateQuotePanel /div
/body

here the submit function of the ajaxButton :
add(new AjaxButton(CreateQuoteButton, new
ResourceModel(CreateQuoteButton)){
 public void onSubmit(AjaxRequestTarget target, Form form){
Panel panel = this.findParent(CreateQuotePanel.class);
Panel secondPanel = new
EditQuotePanel(panel.getId(),properties);
secondPanel.setOutputMarkupId(true);
panel.replaceWith(secondPanel);
panel = secondPanel;
target.addComponent(panel);
}
});

The javaScriptfunctions doesn't work only in the component panel, in the
rest of the page, it works normally! I suspect that I do something wrong in
the replacement

I hav

An
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221878.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: replace panel problems

2010-05-18 Thread Martin Makundi
Where do you initialize the js?

**
Martin

2010/5/18 Ivoneta ietaraz...@gmail.com:

 I have a web Page with a panel. When I click a ajax button, the panel is
 replace. In  the new panel the javaScripts functions doesn't work. Why that
 happened? What am I missing?
 Here is the code

 the webpage html
 head
  script language=JavaScript1.2 src=views/js/accordion.js/script
 /head
 body
 div class=quotPan2 bg_gray_plane wicket:id=CreateQuotePanel /div
 /body

 here the submit function of the ajaxButton :
 add(new AjaxButton(CreateQuoteButton, new
 ResourceModel(CreateQuoteButton)){
  public void onSubmit(AjaxRequestTarget target, Form form){
            Panel panel = this.findParent(CreateQuotePanel.class);
            Panel secondPanel = new
 EditQuotePanel(panel.getId(),properties);
            secondPanel.setOutputMarkupId(true);
            panel.replaceWith(secondPanel);
            panel = secondPanel;
            target.addComponent(panel);
 }
 });

 The javaScriptfunctions doesn't work only in the component panel, in the
 rest of the page, it works normally! I suspect that I do something wrong in
 the replacement

 I hav

 An
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221878.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: Simple Validation question...

2010-05-18 Thread Martin Makundi
Hmm.. iban is not only numbers.


**
Martin

2010/5/18 Victor_Trapiello vic...@trapiello.net:

 Hello guys; as I told you in previous post, I´m a new wicket developer, I
 like it, but some times like everybody I find some dificulties, like this
 stupid thing.

 I´m trying to validate and IBAN number (Bank account number) it is too bing
 to store it like an integer value so I have stored this IBAN like a string (
 it cointains from 1 to 32 characters); I´m validating this data like:

 Model ibanModel= new ibanModel();
 TextField iban=new TextField(iban, ibanModel);
 iban.StringValidator.minimum(1);
 iban.StrinvValidator.maximun(32);

 so with that I´m sure that my IBAN is an string from 1 to 32 characters,
 fantastic! but... I do not want characters in my string only number...and as
 I told you before the number is too big to store it and validate with the
 integer class...

 Discuss!!

 Thank you very much guys!!

 Victor Trapiello
 www.trapiello.net




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221798.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: replace panel problems

2010-05-18 Thread Ivoneta

In the web Page head. Is the only place where I initialize the js.



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221908.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: replace panel problems

2010-05-18 Thread Martin Makundi
So it must be initialized every time you replace... probably. Attach
something like this onto your replace component:

public class GenericDomReadyTailJavaScriptBehavior extends AbstractBehavior {
  private final String javaScript;

  /**
   * @param javaScript
   */
  public GenericDomReadyTailJavaScriptBehavior(String javaScript) {
this.javaScript = javaScript;
  }

  /**
   * @see 
org.apache.wicket.behavior.AbstractBehavior#onRendered(org.apache.wicket.Component)
   */
  @Override
  public void onRendered(Component component) {
super.onRendered(component);
writeJavaScript(component);
  }

  /**
   * @param component
   */
  protected void writeJavaScript(Component component) {
JavascriptUtils.writeJavascriptUrl(component.getResponse(),
RequestCycle.get().urlFor(WicketEventReference.INSTANCE).toString());
{
  JavascriptUtils.writeJavascript(component.getResponse(),
Wicket.Event.add( + window +
  , \ + domready + \, function(event) {  +
getJavaScript() + ;}););
}
  }

  /**
   * @return the javaScript
   */
  public String getJavaScript() {
return javaScript;
  }
}


2010/5/19 Ivoneta ietaraz...@gmail.com:

 In the web Page head. Is the only place where I initialize the js.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221908.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: Simple Validation question...

2010-05-18 Thread Victor_Trapiello

True my friend, 

IBAN example: CY1700200128001200527600

but still I have the same doubt imagen it has only numbers, should I do a
custom validation saying that in this string I do not want find A or B or
C. WHAT A WASTE OF TIME ISN´T IT¿?

Thank you very much for your cooperation;

Victor Trapiello
www.trapiello.net


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221921.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: replace panel problems

2010-05-18 Thread Ivoneta

Why do I inicialize the js every time?
I don't understand that! 
it's so complicated! :(
Is there another way to do it?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221923.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: Simple Validation question...

2010-05-18 Thread Igor Vaynberg
use patternvalidator that can check based on a regex

-igor

On Tue, May 18, 2010 at 2:14 PM, Victor_Trapiello vic...@trapiello.net wrote:

 True my friend,

 IBAN example: CY1700200128001200527600

 but still I have the same doubt imagen it has only numbers, should I do a
 custom validation saying that in this string I do not want find A or B or
 C. WHAT A WASTE OF TIME ISN´T IT¿?

 Thank you very much for your cooperation;

 Victor Trapiello
 www.trapiello.net


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221921.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: replace panel problems

2010-05-18 Thread Martin Makundi
Depends on your js what it does.

You can do simpler things ,]

**
Martin

2010/5/19 Ivoneta ietaraz...@gmail.com:

 Why do I inicialize the js every time?
 I don't understand that!
 it's so complicated! :(
 Is there another way to do it?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221923.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: Simple Validation question...

2010-05-18 Thread Martin Makundi
Why not use accurate iban validator?
http://www.google.fi/search?q=iban+validation+formula

**
Martin

2010/5/19 Victor_Trapiello vic...@trapiello.net:

 True my friend,

 IBAN example: CY1700200128001200527600

 but still I have the same doubt imagen it has only numbers, should I do a
 custom validation saying that in this string I do not want find A or B or
 C. WHAT A WASTE OF TIME ISN´T IT¿?

 Thank you very much for your cooperation;

 Victor Trapiello
 www.trapiello.net


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221921.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: Simple Validation question...

2010-05-18 Thread Victor_Trapiello

thank you very much igor

I´m a little bit confuse about the regular expresion that I need to put:

I have found this: 

mobile.add(new PatternValidator(^[1-9]([0-9]{8,14}))); 

where can I get more information about htis¿? I.e patter for 32 digits...

Thank you for your collaboration!


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221939.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: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Richard Nichols
I pretty much used the code from
https://cwiki.apache.org/WICKET/adding-facebook-connect.html

You need to set up the /xd_reciever.htm for it to work correctly (take
a look at the facebook connect api docs), either using a Wicket mapped
resource, or using a servlet filter to return it.

The other trap is that you can't test it locally. I spent an hour
trying to debug why it wasn't working - the only reason was the API
will not connect from any host other than the one registered in your
Facebook App Config. If you try from localhost it just opens your site
inside the Facebook login popup - really unhelpful (an error would be
nice).

If you follow the wiki article though, it should be fairly easy to get going.

On 18 May 2010 22:56, Fernando Wermus fernando.wer...@gmail.com wrote:
 I need a hand with facebook connect and wicket in some weeks. Could you
 share your wicket facebook code? I imagine it is pretty easy.

 thanks in advance

 On Mon, May 17, 2010 at 10:31 PM, Richard Nichols r...@visural.com wrote:

 Hey all,

 Just thought fellow Wicketeers might be interested to take a look at a
 site I have just launched built 100% with Wicket -
 http://www.onmydoorstep.com.au/

 The site is a community portal for people living in Victoria,
 Australia and displays government data about every suburb, city and
 town in the state. It also allows users to find government services
 and business nearby and submit community events/festivals and ask
 questions of other users.

 It integrates Wicket with Facebook Connect, Google Maps, Google
 Charts, Google's Weather API, plus on the backend, warp-persist, Guice
 and Hibernate/JPA. I also made extensive use of
 http://code.google.com/p/visural-wicket

 Anyhow - happy to answer any questions about the above technologies
 and the experience of building the site with Wicket. Also welcome
 feedback  criticism should you have some :)


 cheers,
 Richard.

 --
 Richard Nichols :: http://www.visural.com/ ::
 http://www.richardnichols.net/

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




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus




-- 
Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/

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



Re: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Richard Nichols
I think there was a network connectivity issue at Linode last night
(where I am hosting the site). The server has been up for 2 months but
I even stopped getting Linode admin console graphs for 2 hrs last
night - weird!

Seems to be stable now though.

Has anyone else using Linode had something like that before?

On 19 May 2010 03:07, Zilvinas Vilutis cika...@gmail.com wrote:
 Is it broken? URL http://www.onmydoorstep.com.au/ does not open any page for
 me

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com


 On Tue, May 18, 2010 at 6:59 AM, Ajayi Yinka 
 iamstyaj...@googlemail.comwrote:

  good job.

 On Tue, May 18, 2010 at 4:49 AM, Jeremy Thomerson 
 jer...@wickettraining.com
  wrote:

  I concur - very nice.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Mon, May 17, 2010 at 8:43 PM, Cristi Manole cristiman...@gmail.com
  wrote:
 
   cool site! I like it! congrats.
  
   On Mon, May 17, 2010 at 9:31 PM, Richard Nichols r...@visural.com
 wrote:
  
Hey all,
   
Just thought fellow Wicketeers might be interested to take a look at
 a
site I have just launched built 100% with Wicket -
http://www.onmydoorstep.com.au/
   
The site is a community portal for people living in Victoria,
Australia and displays government data about every suburb, city and
town in the state. It also allows users to find government services
and business nearby and submit community events/festivals and ask
questions of other users.
   
It integrates Wicket with Facebook Connect, Google Maps, Google
Charts, Google's Weather API, plus on the backend, warp-persist,
 Guice
and Hibernate/JPA. I also made extensive use of
http://code.google.com/p/visural-wicket
   
Anyhow - happy to answer any questions about the above technologies
and the experience of building the site with Wicket. Also welcome
feedback  criticism should you have some :)
   
   
cheers,
Richard.
   
--
Richard Nichols :: http://www.visural.com/ ::
http://www.richardnichols.net/
   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
   
  
  
   --
   Cristi Manole
  
   Nova Creator Software
   www.novacreator.com
  
 



 --
 Ajayi S . Yinka
 +2348022684477





-- 
Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/

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



Re: replace panel problems

2010-05-18 Thread Ivoneta

I work with JQuery.
I read in another post that the dom ready event isn't fired.
it is right?

I suspect I should do the js initializes every time!

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221952.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



wicket serialization problem of guice proxies

2010-05-18 Thread Christoph Grün
Hi all,

 

I am using Wicket 1.4.8 with Guice 1.0 and Warp Persist/Hibernate.

When injecting DAOs directly into Wicket components, it works fine (I inject
the DAO Interface). However, I would like to inject them, next to other
objects, also in classes that do some business logic. Those classes are
themselves injected in Wicket pages.

 

As these classes are injected in Wicket, Wicket tries to serialize them as
well. 

For example I have the class PoiLoader that is injected in a Wicket page.

@Singleton

public class PoiLoader {

private MultimapType, Poi poisRelatedToSpecificTouristType =
ArrayListMultimap.create();

 

protected IVectorDao daoVector;

 

private WorkManager workManager;

 

private MapResource, Poi pois = Maps.newHashMap();

 

}

 

In this setting, none of the fields can be serialized and throw an   - Error
serializing object class ecgroup.web.pages.RecommenderPage [object=[Page
class = ecgroup.web.pages.RecommenderPage, id = 1, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException
.

 

I need the Warp Persist Workmanager in order to do some data loading /
initialization during Wicket startup. How can I tackle the serialization
problems?

 

Thanks a lot,

Chris

 



Re: wicket serialization problem of guice proxies

2010-05-18 Thread Igor Vaynberg
either use the wicket-guice module to inject into wicket pages, or
something like salve.googlecode.com to do the injection for you.

-igor

On Tue, May 18, 2010 at 2:40 PM, Christoph Grün chris...@gmx.at wrote:
 Hi all,



 I am using Wicket 1.4.8 with Guice 1.0 and Warp Persist/Hibernate.

 When injecting DAOs directly into Wicket components, it works fine (I inject
 the DAO Interface). However, I would like to inject them, next to other
 objects, also in classes that do some business logic. Those classes are
 themselves injected in Wicket pages.



 As these classes are injected in Wicket, Wicket tries to serialize them as
 well.

 For example I have the class PoiLoader that is injected in a Wicket page.

 @Singleton

 public class PoiLoader {

    private MultimapType, Poi poisRelatedToSpecificTouristType =
 ArrayListMultimap.create();



    protected IVectorDao daoVector;



    private WorkManager workManager;



    private MapResource, Poi pois = Maps.newHashMap();



 }



 In this setting, none of the fields can be serialized and throw an   - Error
 serializing object class ecgroup.web.pages.RecommenderPage [object=[Page
 class = ecgroup.web.pages.RecommenderPage, id = 1, version = 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException
 .



 I need the Warp Persist Workmanager in order to do some data loading /
 initialization during Wicket startup. How can I tackle the serialization
 problems?



 Thanks a lot,

 Chris





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



Re: Simple Validation question...

2010-05-18 Thread Victor_Trapiello

GB  29  NWBK601613  31926819
Country code (2a)   Check Digit (2n)

Bank Name Code (4a)
Bank Branch code (6n)   Account No (8n)


we have all the ingredients, but what is the shape of our regular
expresion¿?  any help¿?

Thank you very much!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Simple-Validation-question-tp2221798p2221979.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: wicket serialization problem of guice proxies

2010-05-18 Thread Uwe Schäfer

Am 18.05.2010 23:40, schrieb Christoph Grün:


I am using Wicket 1.4.8 with Guice 1.0 and Warp Persist/Hibernate.
When injecting DAOs directly into Wicket components, it works fine (I inject
the DAO Interface). However, I would like to inject them, next to other
objects, also in classes that do some business logic. Those classes are
themselves injected in Wicket pages.


we use a helper class with

public static void injectMembers(final Object o)
{
Application application = Application.get();
Assert.isNotNull(application, Application is not attached);
Injector injector = getInjector(application);

new GuiceComponentInjector(application, injector).inject(o);

}

to inject into arbritary objects that end up in wicket space.

cu uwe

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



Re: SEVERE:Pagemap null is still locked by: Thread

2010-05-18 Thread Ayodeji Aladejebi
I notice this:

After 3 minutes the Pagemap null is still locked by:
Thread[http-8084-2,5,main], giving up trying to get the page for path:
2:topAdverts:advertListCont

What happened was that I called  ((WebRequestCycle)
WebRequestCycle.get()).getWebRequest().getQueryString() within
onBeginRequest of RequestCycle. This is what normally leads to this problem



On Fri, May 7, 2010 at 9:57 PM, Ayodeji Aladejebi aladej...@gmail.comwrote:

 version 1.4.6 on windows vista running on tomcat 6.0.26


 On Wed, May 5, 2010 at 5:43 PM, Johan Compagner jcompag...@gmail.comwrote:

 hmm

 looking at the stack of the of that thread that has the lock on the page
 map
 then it seems to me that that shouldnt happen, because that thread is
 doing
 nothing anymore if the stack dump of that thread is really the right one.

 Because that just seems to be in a waiting state in a tomcat pool

 So then it is more that there is some exception in front of that maybe
 that
 somehow didnt release the pagemap
 What version of wicket do you use?


 On Tue, May 4, 2010 at 23:40, Ayodeji Aladejebi aladej...@gmail.com
 wrote:

  SEVERE: org.apache.wicket.WicketRuntimeException: After 1 minute the
  Pagemap
  null is still locked by: Thread[http-8084-7,5,main], giving up trying to
  get
  the page for path: 2
 Begin of stack trace of Thread[http-8084-7,5,main]
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Object.java:485)
 
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)
 
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
 java.lang.Thread.run(Thread.java:619)
 End of stack trace of Thread[http-8084-7,5,main]
  org.apache.wicket.protocol.http.request.InvalidUrlException:
  org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
 null
  is
  still locked by: Thread[http-8084-7,5,main], giving up trying to get the
  page for path: 2
 Begin of stack trace of Thread[http-8084-7,5,main]
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Object.java:485)
 
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)
 
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
 java.lang.Thread.run(Thread.java:619)
 End of stack trace of Thread[http-8084-7,5,main]
 
  -- Any tips
 
  I
 







Re: Just launched - www.onmydoorstep.com.au

2010-05-18 Thread Zilvinas Vilutis
Actually you CAN test it locally, just you need to configure that you need
this feature in your FB app in FB itself.


Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com


On Tue, May 18, 2010 at 2:29 PM, Richard Nichols r...@visural.com wrote:

 I pretty much used the code from
 https://cwiki.apache.org/WICKET/adding-facebook-connect.html

 You need to set up the /xd_reciever.htm for it to work correctly (take
 a look at the facebook connect api docs), either using a Wicket mapped
 resource, or using a servlet filter to return it.

 The other trap is that you can't test it locally. I spent an hour
 trying to debug why it wasn't working - the only reason was the API
 will not connect from any host other than the one registered in your
 Facebook App Config. If you try from localhost it just opens your site
 inside the Facebook login popup - really unhelpful (an error would be
 nice).

 If you follow the wiki article though, it should be fairly easy to get
 going.

 On 18 May 2010 22:56, Fernando Wermus fernando.wer...@gmail.com wrote:
  I need a hand with facebook connect and wicket in some weeks. Could you
  share your wicket facebook code? I imagine it is pretty easy.
 
  thanks in advance
 
  On Mon, May 17, 2010 at 10:31 PM, Richard Nichols r...@visural.com
 wrote:
 
  Hey all,
 
  Just thought fellow Wicketeers might be interested to take a look at a
  site I have just launched built 100% with Wicket -
  http://www.onmydoorstep.com.au/
 
  The site is a community portal for people living in Victoria,
  Australia and displays government data about every suburb, city and
  town in the state. It also allows users to find government services
  and business nearby and submit community events/festivals and ask
  questions of other users.
 
  It integrates Wicket with Facebook Connect, Google Maps, Google
  Charts, Google's Weather API, plus on the backend, warp-persist, Guice
  and Hibernate/JPA. I also made extensive use of
  http://code.google.com/p/visural-wicket
 
  Anyhow - happy to answer any questions about the above technologies
  and the experience of building the site with Wicket. Also welcome
  feedback  criticism should you have some :)
 
 
  cheers,
  Richard.
 
  --
  Richard Nichols :: http://www.visural.com/ ::
  http://www.richardnichols.net/
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 



 --
 Richard Nichols :: http://www.visural.com/ ::
 http://www.richardnichols.net/

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




Using google website optimizer with Wicket?

2010-05-18 Thread Don Ferguson
Has anyone successfully used google website optimizer (multivariate  
tests) with Wicket?


Believe it or not, GWO requires you to modify your html with an  
unbalanced HTML tag.  Conditional content that is altered during  
multivariate testing is terminated with a
/noscript tag  (presumably GWO javascript inserts a noscript tag  
into the document at runtime to make the HTML legal):


http://www.google.com/support/websiteoptimizer/bin/answer.py?hl=en_usanswer=64418

Anyway, Wicket's parser chokes on the malformed HTML.  Can anyone  
think of a workaround?




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



Re: Using google website optimizer with Wicket?

2010-05-18 Thread Igor Vaynberg
you can always output the /noscript tag dynamically using a label.

-igor

On Tue, May 18, 2010 at 5:11 PM, Don Ferguson don.fergu...@gmail.com wrote:
 Has anyone successfully used google website optimizer (multivariate tests)
 with Wicket?

 Believe it or not, GWO requires you to modify your html with an unbalanced
 HTML tag.  Conditional content that is altered during multivariate testing
 is terminated with a
 /noscript tag  (presumably GWO javascript inserts a noscript tag into
 the document at runtime to make the HTML legal):

 http://www.google.com/support/websiteoptimizer/bin/answer.py?hl=en_usanswer=64418

 Anyway, Wicket's parser chokes on the malformed HTML.  Can anyone think of a
 workaround?



 -
 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: Using google website optimizer with Wicket?

2010-05-18 Thread Don Ferguson

Ah Ha!

I knew about setEscapeModelStrings(false), but didn't know about  
setRenderBodyOnly(true).



On May 18, 2010, at 5:26 PM, Igor Vaynberg wrote:


you can always output the /noscript tag dynamically using a label.

-igor

On Tue, May 18, 2010 at 5:11 PM, Don Ferguson  
don.fergu...@gmail.com wrote:
Has anyone successfully used google website optimizer (multivariate  
tests)

with Wicket?

Believe it or not, GWO requires you to modify your html with an  
unbalanced
HTML tag.  Conditional content that is altered during multivariate  
testing

is terminated with a
/noscript tag  (presumably GWO javascript inserts a noscript  
tag into

the document at runtime to make the HTML legal):

http://www.google.com/support/websiteoptimizer/bin/answer.py?hl=en_usanswer=64418

Anyway, Wicket's parser chokes on the malformed HTML.  Can anyone  
think of a

workaround?



-
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: Using google website optimizer with Wicket?

2010-05-18 Thread Igor Vaynberg
alternatively use wicket:container
wicket:id=foofoo/wicket:container, it does the same as
setrenderbodyonly(true)

-igor

On Tue, May 18, 2010 at 5:57 PM, Don Ferguson don.fergu...@gmail.com wrote:
 Ah Ha!

 I knew about setEscapeModelStrings(false), but didn't know about
 setRenderBodyOnly(true).


 On May 18, 2010, at 5:26 PM, Igor Vaynberg wrote:

 you can always output the /noscript tag dynamically using a label.

 -igor

 On Tue, May 18, 2010 at 5:11 PM, Don Ferguson don.fergu...@gmail.com
 wrote:

 Has anyone successfully used google website optimizer (multivariate
 tests)
 with Wicket?

 Believe it or not, GWO requires you to modify your html with an
 unbalanced
 HTML tag.  Conditional content that is altered during multivariate
 testing
 is terminated with a
 /noscript tag  (presumably GWO javascript inserts a noscript tag into
 the document at runtime to make the HTML legal):


 http://www.google.com/support/websiteoptimizer/bin/answer.py?hl=en_usanswer=64418

 Anyway, Wicket's parser chokes on the malformed HTML.  Can anyone think
 of a
 workaround?



 -
 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



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



Using a component resolver to provide a panel component inside an enclosure

2010-05-18 Thread Chris Colman
Has anyone been able to use a component resolver to provide a component
inside an enclosure in wicket 1.4.2 or later?

It worked fine in wicket 1.4.1 but no version after that seems to work,
giving the error:

WicketMessage: Tag expected

The markup section looks like this:

wicket:enclosure child=panelContainer
div class=box
span wicket:id=panelContainer/span
  div
/wicket:enclosure

The resolve method of my resolver that works fine in 1.4.1 looks like
this:


boolean resolve(final MarkupContainer container,
final MarkupStream markupStream,
final ComponentTag tag)
{
String tagStr = tag.getId();

if (tag instanceof WicketTag)
{
// this resolver does not handle wicket tags
return false;
}

Page page = container.getPage();

// One day make this an interface that can be implemented
// by any component - not just pages
if ( page instanceof OrganizationPage  tag != null )
{
OrganizationPage organizationPage =
(OrganizationPage)page;

// Create and initialize the component
final Component component = organizationPage
.createComponent(container, tagStr);
if (component != null)
{
container.autoAdd(component);

return true;
}
}
else
logger.trace(page not org page:  + tag +  in  +
container);


// We were not able to handle the componentId
  return false;
}

Diagnostics shows that the createComponent method is definitely being
called and the Panel with id = panelContainer is being created and
returned.

Perhaps in post 1.4.1 wicket we need to add this component to a
different container? i.e. different to the container parameter passed to
the resolve method.

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



How to replace RelativePathPrefixHandler

2010-05-18 Thread bht
Hi,

It looks like Wicket may have the flexibility to replace elements of
the chain of IMarkupFilters without changing Wicket itself.

How can I replace RelativePathPrefixHandler with my own variant?

I have found

getPageSettings().getComponentResolvers();

But I am definitely missing the important bits.

Many thanks,

Bernard

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



Re: replace panel problems

2010-05-18 Thread Martin Makundi
Wicket seems to handle automatically its own domready event so that it
works both in ajax and non-ajax situations.

2010/5/19 Ivoneta ietaraz...@gmail.com:

 I work with JQuery.
 I read in another post that the dom ready event isn't fired.
 it is right?

 I suspect I should do the js initializes every time!

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221952.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: replace panel problems

2010-05-18 Thread Jeremy Thomerson
DOM ready will only be fired when the dom is ready - which is as the page is
loading / rendering.  When you do an AJAX replace, the DOM is not completely
reinitialized - only part of it is replaced.  You would not want a dom ready
event to fire again because it would reinitialize everything in the dom that
was listening to that event.  Thus, you must fire the reinitialization
yourself on modified components.

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



On Tue, May 18, 2010 at 4:35 PM, Ivoneta ietaraz...@gmail.com wrote:


 I work with JQuery.
 I read in another post that the dom ready event isn't fired.
 it is right?

 I suspect I should do the js initializes every time!

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221952.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: replace panel problems

2010-05-18 Thread Martin Makundi
Jeremy,  I know this is true with real domready event, but in my
experience wicket domready is somehow more intelligent that it knows
how to behave in ajax requests. At least in my experience using jquery
domready $(document).ready will not work in ajax requests but
wicket.event-based domready will work perfect in ajax refresh also. So
I guess there is some internal intellisense.

Otheriwse it is easy to do a check in the tail-javascript if
request.isAjax() and leave out the domready wrapper.

**
Martin

2010/5/19 Jeremy Thomerson jer...@wickettraining.com:
 DOM ready will only be fired when the dom is ready - which is as the page is
 loading / rendering.  When you do an AJAX replace, the DOM is not completely
 reinitialized - only part of it is replaced.  You would not want a dom ready
 event to fire again because it would reinitialize everything in the dom that
 was listening to that event.  Thus, you must fire the reinitialization
 yourself on modified components.

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



 On Tue, May 18, 2010 at 4:35 PM, Ivoneta ietaraz...@gmail.com wrote:


 I work with JQuery.
 I read in another post that the dom ready event isn't fired.
 it is right?

 I suspect I should do the js initializes every time!

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/replace-panel-problems-tp2221878p2221952.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



adding behaviours

2010-05-18 Thread Joe Fawzy
Hi
i have a large number of components in a page that i have to add the same
behaviour
should i use the same instance for all or instansiate one for every
component(that's what i am currently doing);
thanks
Joe


Re: Using a component resolver to provide a panel component inside an enclosure

2010-05-18 Thread Jeremy Thomerson
Can you create a quickstart for this and attach it to a JIRA?

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



On Tue, May 18, 2010 at 9:38 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Has anyone been able to use a component resolver to provide a component
 inside an enclosure in wicket 1.4.2 or later?

 It worked fine in wicket 1.4.1 but no version after that seems to work,
 giving the error:

 WicketMessage: Tag expected

 The markup section looks like this:

 wicket:enclosure child=panelContainer
div class=box
span wicket:id=panelContainer/span
  div
 /wicket:enclosure

 The resolve method of my resolver that works fine in 1.4.1 looks like
 this:


 boolean resolve(final MarkupContainer container,
final MarkupStream markupStream,
final ComponentTag tag)
 {
String tagStr = tag.getId();

if (tag instanceof WicketTag)
{
// this resolver does not handle wicket tags
return false;
}

Page page = container.getPage();

// One day make this an interface that can be implemented
// by any component - not just pages
if ( page instanceof OrganizationPage  tag != null )
{
OrganizationPage organizationPage =
 (OrganizationPage)page;

// Create and initialize the component
final Component component = organizationPage
.createComponent(container, tagStr);
if (component != null)
{
container.autoAdd(component);

return true;
}
}
else
logger.trace(page not org page:  + tag +  in  +
 container);


// We were not able to handle the componentId
  return false;
 }

 Diagnostics shows that the createComponent method is definitely being
 called and the Panel with id = panelContainer is being created and
 returned.

 Perhaps in post 1.4.1 wicket we need to add this component to a
 different container? i.e. different to the container parameter passed to
 the resolve method.

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




Re: HTML editing, HTML templates, HTML refactoring

2010-05-18 Thread Jeremy Thomerson
Suggest a solid approach to fix it and document on JIRA.

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



On Tue, May 18, 2010 at 1:05 AM, b...@actrix.gen.nz wrote:

 Yes:

 wicket:link
 link rel='stylesheet' type='text/css' href='../../../../style.css'/
 /wicket:link

 WicketMessage: Exception in rendering component: [MarkupContainer
 [Component id = _link2]]
 Root cause:

 java.lang.IllegalArgumentException: Invalid path ../../../../style.css

 The path is valid because if I click on it in the IDE then the stle
 sheet is opened. I really want better IDE integration with Wicket, and
 I think that does not exist.

 https://issues.apache.org/jira/browse/WICKET-581
 ... you no longer need to use autolink. As of a couple of days ago in
 1.3.0-incubating-SNAPSHOT, any href/src/whatever elements that are in
 your HTML will be prepended to make them context-relative, no matter
 where your page is mounted.

 Unfortunately, the intended result would not be satisfactory even
 without failure. I don't want to
 - have the wicket filter serve the resources
 - have the resources stored under WEB-INF/classes

 So I tried in init()
 getResourceSettings(addResourceFolder(wicket));

 but that is where Wicket support ends because I still have to use
 link rel='stylesheet' type='text/css' href='style.css'/ which works
 at runtime but not for any IDE for offline viewing and refactoring.

 Don't you think it would be time for Wicket to catch up with modern
 IDE HTML features? We can't use them.

 http://wicket.apache.org/

 Line 2:

 With proper mark-up/logic separation ...

 ?

 Not really.


 It works for the framework and component developers who want to bundle
 the resources with their packages, but it does not work for page
 development which has totally different requirements.


 Regards

 Bernard


 On Tue, 18 May 2010 00:21:24 -0500, you wrote:

 Have you tried using wicket:link around your resource references?


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




Re: Ajax Repeater Fragment Update

2010-05-18 Thread Jeremy Thomerson
That's a ton of code - which is really hard to debug on a mailing list post.
 If you'd like someone to look at your specific issue, it'd be helpful to
create a quickstart.  Alternatively, explain your question a little more and
post a snippet of the resulting HTML.

PS - have you tried making your additional data a panel that is
setVisible(false).setOutputMarkupPlaceholder(true) by default, and then
making your link simply setVisible(true) on the panel and add it to the ajax
request target?  It may be easier than a fragment.  I've used that pattern
quite a few times.

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



On Tue, May 18, 2010 at 1:52 AM, Dr. Wolf Blecher 
wolf.blec...@itk-engineering.de wrote:

 Thanks for the response. Attached is the markup and the java classes for
 the
 panel. It's slightly modified since normally a DataView is used, but the
 behaviour is the same with the ListView. This is only the panel class and
 not
 a complete quickstart.

 Here is the markup

 html xmlns:wicket
  head
meta http-equiv=Content-Type content=text/html; charset=UTF-8/
titleTreeDataViewPanel/title
  /head
  body
wicket:panel
  table
thead
  tr
th/th
thName/th
thVorname/th
  /tr
/thead
tbody
  div wicket:id=overview
div wicket:id=extendingRowUSer Data here/div
  /div
/tbody
  /table
/wicket:panel
  /body
 /html

 wicket:fragment wicket:id=rowView
  tr
td
  a wicket:id=extendLink
span wicket:id=extendSymbolArrow/span
  /a
/td
td
  div wicket:id=nameName/div
  div wicket:id =details
ul
  libAgain/bspan wicket:id=strasseStrasse/span/li
/ul
  /div
/td
tdspan wicket:id=vornameVorname/span/td
  /tr
 /wicket:fragment

 and the corresponding Java

 public class TreeDataViewPanel extends Panel {

  private ListString userList = Arrays.asList(User 1,User 2,User 3);

  public TreeDataViewPanel(String id) {
super (id);
ListViewString userTable = new ListViewString(overview, userList)
 {
  @Override
  protected void populateItem(ListItemString item) {
String user = item.getModelObject();

DetailFragment dataView =
  new DetailFragment(extendingRow,rowView,user);
dataView.setOutputMarkupId(true);
item.add(dataView);
  }
};
add(userTable);
  }
 }

 class DetailFragment extends Fragment {

  private boolean compressed = true;

  public boolean isCompressed() {
return compressed;
  }

  public void setCompressed(boolean compressed) {
this.compressed = compressed;
  }

  public DetailFragment(String id, String markupId, String user) {
super(id, markupId);

WebMarkupContainer detailContainer = new WebMarkupContainer(details) {
  @Override
  public boolean isVisible() {
return !isCompressed();
  }
};

add(new DropDownLink(extendLink, this));
add(new Label(name, user));
add(new Label(vorname, user));

detailContainer.add(new Label(strasse, user));
add(detailContainer);
  }
 }


 class DropDownLink extends AjaxLink {

  DetailFragment parent;
  Label compressedSymbol = new Label(extendSymbol,\u25B6); // 9654
  Label expandSymbol = new Label(extendSymbol,\u25BC); // 9660
  Label linkSymbol;

  @Override
  public void onClick(AjaxRequestTarget target) {
if (parent.isCompressed()) {
  linkSymbol.replaceWith(expandSymbol);
  linkSymbol = expandSymbol;
  parent.setCompressed(false);
} else {
  linkSymbol.replaceWith(compressedSymbol);
  linkSymbol = compressedSymbol;
  parent.setCompressed(true);
}
target.addComponent(linkSymbol);
target.addComponent(parent);
  }

  public DropDownLink(String id, DetailFragment parent) {
super(id);
linkSymbol = compressedSymbol;
linkSymbol.setOutputMarkupId(true);
expandSymbol.setOutputMarkupId(true);
compressedSymbol.setOutputMarkupId(true);
this.parent = parent;
add(linkSymbol);
   }
 }

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