RE: Wicket Dynamic Navigation

2010-05-24 Thread Kai Mutz
I have read a solution for this in a german wicket book called Praxisbuch
Wicket which you can use as a starting point. But I do not know how good
your German is.

http://www.hanser.de/buch.asp?isbn=978-3-446-41909-4

vp143 mailto:vishal.po...@cipriati.co.uk wrote:
 I forgot to mention that I require the HTML markup to be like the
 following:

 ul
 liCategory 1/li
 liCategory 2/li
 li
   ul
   li # Category 2 - Sub category 1 /li
   li # Category 2 - Sub category 2 /li
   /ul
 /li
 /ul



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



RE: TabbedPanel + authorization strategy

2010-01-08 Thread Kai Mutz
You can extend TabbedPanel and overwrite the newLink() method.

toberger mailto:torben.ber...@gmx.de wrote:
 Okay, with your example implementation I can disable the content of
 the tab. But the tab itself is still visible. And I am searching a
 way to disable this tab itself too.



 Jeroen Steenbeeke wrote:

  I believe the default behavior is to throw an
 UnauthorizedInstantiationException
 if component instantiation is not authorized, but you can tweak this
 by calling
 getSecuritySettings().setUnauthorizedComponentInstantiationListener(...).



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



RE: Browser specific header contribution

2009-06-09 Thread Kai Mutz
You can use org.apache.wicket.protocol.http.ClientProperties.

One possibility to access the client properties is using
WebSession.getClientInfo().getProperties()

Cheers, Kai

Stefan Lindner mailto:lind...@visionet.de wrote:
 Is there a safe and official way to let an IHeaderContributor
 contribute a browser specific javascript library? The
 IHeaderContributor has ist's 
 
   public void renderHead(final IHeaderResponse response) {
   
   response.renderJavascriptReference(...);
   }
 
 method where I can contribute a javascript library tot he head part
 oft he page. But sometimes I need a special library (e.g. for canvas
 in IE).
 
 Should I use something like
 
   public void renderHead(final IHeaderResponse response) {
   
   response.renderJavascript(!--[if IE);
   response.renderJavascriptReference(canvas.js);
   esponse.renderJavascript(![endif]--);
   }
 
 Or is there a safe way to detect the browser from the IHeaderResponse?
 
 -
 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: Web application using Wicket and iBATIS can't find DAOs?? ...pls help...its urgent

2009-02-06 Thread Kai Mutz
Edwin Ansicodd mailto:erik.g.hau...@gmail.com wrote:
 Thank you Kai for your post!!

 2) Install a SpringComponentInjector in your application, e.g.
 class MyApplication extends WebApplication {
   public void init() {
super.init();
addComponentInstantiationListener(new
 SpringComponentInjector(this));
}
 }

 Yes, also did this:

 public class JPSApplication extends SpringWebApplication implements
 IUnauthorizedComponentInstantiationListener{

   @SpringBean private LookupTableDAO ltDAO;

   public void init(){
   super.init();

   addComponentInstantiationListener(new
   SpringComponentInjector(this)); //for the SpringBean
   InjectorHolder.getInjector().inject(this);

You do not need the last line here. Adding the SpringComponentInjector is
sufficient. AFAIK the InjectorHolder is needed within classes, which do not
extend a wicket component.

Cheers, Kai



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



RE: Web application using Wicket and iBATIS can't find DAOs?? ...pls help...its urgent

2009-02-05 Thread Kai Mutz
I think it is rather a Wicket/Spring integration question. Thus look at
http://cwiki.apache.org/WICKET/spring.html

You have to

1) Declare your wicket application in your application context, e.g.
bean id=wicketApplication class=project.MyApplication/

2) Install a SpringComponentInjector in your application, e.g.
class MyApplication extends WebApplication {
public void init() {
super.init();
addComponentInstantiationListener(new
SpringComponentInjector(this));
}
}

3) Add the ContextLoaderListener to your web.xml
listener

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

HTH, Kai

Edwin Ansicodd mailto:erik.g.hau...@gmail.com wrote:
 Extending org.apache.wicket.spring.SpringWebApplication, used abator
 to generate generated DAOs, beans, and _SqlMap.xml files, but
 deploying the app, get following error:

 17:58:31,025 ERROR [[/JPS]] StandardWrapper.Throwable
 java.lang.IllegalStateException: bean of type
 [com.base.dao.LookupTableDAO] not found

 I've declared the DAO in a SpringWebApplication like so:

 @SpringBean private LookupTableDAO ltDAO;

 But the app can't seem to find the DAOs.  Is there any additional
 configuration files I need?  Or any special requirements if not
 satisfied that would cause the DAOs not to be found?

 My abatorConfig.xml includes:

 javaModelGenerator targetPackage=com.base.domain.model
 targetProject=JPS/
 sqlMapGenerator targetPackage=com.base.dao.ibatis
 targetProject=JPS/ daoGenerator type=SPRING
 targetPackage=com.base.dao targetProject=JPS/

 I also have a persistance.ibatis.xml where my sqlmap and DAOs are
 configured:

 bean id=sqlMapClient
 class=org.springframework.orm.ibatis.SqlMapClient FactoryBean
 property name=configLocation value=classpath:sqlMapConfig.xml/
 property name=dataSource ref=dataSource/
 /bean

 bean id=lookupTableDAO class=com.base.dao.LookupTableDAO
 property name=sqlMapClient ref=sqlMapClient/
 /bean


 but it seems the app can't find this file or is not using it.

 I also have a sqlMapConfig.xml file that lists the sqlmap files:

 sqlMap resource=com/base/dao/ibatis/OBJECTIDS_SqlMap.xml/

 I don't have a dao.xml like an iBATIS document suggests.

 Following is the complete error message:

 17:58:31,025 ERROR [[/JPS]] StandardWrapper.Throwable
 java.lang.IllegalStateException: bean of type
 [com.base.dao.LookupTableDAO] not found
 at

org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass(SpringBeanLoca
tor.java:107)
 at

org.apache.wicket.spring.SpringBeanLocator.getBeanName(SpringBeanLocator.jav
a:192)
 at

org.apache.wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLocator
.java:133)
 at

org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFiel
dValue(AnnotProxyFieldValueFactory.java:91)
 at

 org.apache.wicket.injection.Injector.inject(Injector.java:108) at


org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInjector
.java:39)
 at

com.ppaworld.lbs.base.web.localization.DatabaseResourceLoader.init(Databas
eResourceLoader.java:16)
 at
 com.ppaworld.lbs.base.LBSApplication.init(JPSApplication.java:102)
 at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:514)
 at
 org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:148)
 at javax.servlet.GenericServlet.init(GenericServlet.java:215)
 at

org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
53)
 at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:955)
 at

org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4051)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4354)
 at

org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStanda
rdContext.java:63)
 at

org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(
GeronimoStandardContext.java:398)
 at

org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBef
oreAfterValve.java:47)
 at

org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardCon
text.java:251)
 at

org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at

org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:3
64)
 at

org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.j
ava:512)
 at

org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance
.java:998)
 at

org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanI
nstanceState.java:268)
 at


RE: Filtering (textfilter) and other DataTable examples?!

2008-11-18 Thread Kai Mutz
Ned Collyer mailto:[EMAIL PROTECTED] wrote:
 Can someone please post or link to an example of how the filters are
 meant to work with the data table.  Specifically TextFilter or
 TextFilteredPropertyColumn.


Check the wicket phonebook example:

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-p
honebook/

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-p
honebook/src/java/wicket/contrib/phonebook/web/page/ListContactsPage.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: AutoCompleteTextField and wicket 1.3.5

2008-11-11 Thread Kai Mutz
rzsolt mailto:[EMAIL PROTECTED] wrote:
 I have the same problem using IE6. I get an 'Error on page' message
 when I press the first key in my AutoCompleteTextField type field.
 The complete IE6 error massage as:
 Line: 288
 Char: 9
 Error: Type mismatch

 Inspecting the recent changes in wicket-autocomplete.js (1.3.4 -
 1.3.5), I found that there was a change around that line:

 in 1.3.4:
 container.style.zIndex=(Number(index)!=Number.NaN?Number(index)+1:index);
 container.style.left=position[0]+'px'
 container.style.top=(input.offsetHeight+position[1])+'px';

 in 1.3.5:
 container.style.zIndex=(!isNaN(Number(index))?Number(index)+1:index);
 container.style.left=position[0]+'px'
 container.style.top=(input.offsetHeight+position[1])+'px';

 As you can see, there is no semicolon in the end of the second line.
 I think putting a semicolon there solves the problem for IE.

Have you testet it? I just have testet it on IE7 and the missing semicolon
did not solve this problem.

See https://issues.apache.org/jira/browse/WICKET-1504 for tracing this
issue...

Kai




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DropDownChoice getting value into the model

2008-03-07 Thread Kai Mutz
[EMAIL PROTECTED]  wrote:
 I've tried for 1 1/2 days to get this simple Drop Down to work and I'm
 feeling stupid.  My mom tells me I'm smart.:-(

 Everything works fine until I try to save it. I get the following
 error.  I
 think it is trying to put the SelectOption object into the Model
 but I don't
 know how to tell it to put the state var from SelectOption into my
 Vendor object.

Does your Vendor object have an field of type SelectOption? If not which
field do you want to set with the select box?

Perhaps this helps:
http://cwiki.apache.org/WICKET/another-dropdownchoice-example-by-adam.html

Kai


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DropDownChoice getting value into the model

2008-03-07 Thread Kai Mutz
[EMAIL PROTECTED]  wrote:
 It is nice to know I'm not the only one struggling with
 DropDownChoices.  I'm new to Wicket and I'm pretty far with
 rebuilding an application we are using internally.  Has anybody
 proposed an alternative or a wrapper to DropDownChoices?

Have you tried something like:

Vendor vendor = (Vendor) vendorModel.getObject();

DropDownChoice stateFC = new DropDownChoice(state, new
PropertyModel(vendor, state), new Model(states), choiceRenderer);

This should work.

Kai


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Wicket database access

2008-02-22 Thread Kai Mutz
[EMAIL PROTECTED]  wrote:
 i do know how to handle JDBC. The problem is that i don't know how to
 use JDBC inside Wicket. I think that i have to implement
 IDataProvider wich would fetch the data from the database, but i
 don't know how to do this. I also don't
 know how to
 insert data into the database which come from a form.

Take a look at the wicket phonebook example and replace the hibernate/ibatis
DAO implementation by a JDBC DAO

http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/

HTH, Kai


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]