Re: Wicket serialization concerns
On Tue, 20 Aug 2013 23:01:29 + Michael Chandler wrote: > I'm led to believe that creating a > reference to any of my domain classes within a Wicket component (as a > field or in a method implementation) will expose me to a > serialization error unless I put it in a Wicket model. Am I correct > about this? Basically yes. Any non-transient field in your Component will be serialized. That includes final local variables or final method/constructor parameters if you reference those from within an inner class. That will make the compiler generate a hidden field to keep that reference for the inner class. Carl-Eric - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket serialization concerns
I could use some input from some of the more experienced Wicket users out there. I'm having a hard time fully understanding when to worry about Wicket attempting to serialize domain model objects, resulting in serialization warnings/errors in the logs. I had been under the impression that if I had an object as a field in a Wicket component, I needed to be on alert for serialization issues. So, if I have an object as a field, I make it a LoadableDetachableModel. In cases where I need to load in a wired object, I make use of the handy @SpringBean annotation. Otherwise, I assumed I was in the clear but I'm seeing now that's not the case. In a method within a webpage component, I'm creating a List collection of domain objects for use in a form's DropDownChoice component. Unless I put that list in a LoadableDetachableModel, I will get a serialization error. I'm led to believe that creating a reference to any of my domain classes within a Wicket component (as a field or in a method implementation) will expose me to a serialization error unless I put it in a Wicket model. Am I correct about this? Thanks! Mike Chandler
Re: problem header contribution with ajax
Martin Grigorov schreef: Hi Martin, Thanks for your quick answer. You cannot replace header contributions with the same HTML id attribute. Wicket checks whether the contribution is already in the page and ignores it. Ok, that explains a lot. You can use normal Label component to be able to replace it in Ajax responses. I am not fully understanding this, could you give more detail about the suggested solution? thanks, Haiko - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem header contribution with ajax
Hi, You cannot replace header contributions with the same HTML id attribute. Wicket checks whether the contribution is already in the page and ignores it. You can use normal Label component to be able to replace it in Ajax responses. On Tue, Aug 20, 2013 at 5:23 PM, wrote: > > Dear wicket-users, > > I notice that a header contribution by a panel is not rendered in the > following case. An inline CSS in the head section is first rendered by > switching tabs > > > > when i rerender the panel with a slighty different header contribution, > then panel is rerendered but the header contribution is not picked up. > > id="style.widget.titel" > component> > > Has anyone ideas how to debug this? Is it not possible to replace a header > contribution with the same ID? > > thanks in advance, > > Haiko > > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
problem header contribution with ajax
Dear wicket-users, I notice that a header contribution by a panel is not rendered in the following case. An inline CSS in the head section is first rendered by switching tabs when i rerender the panel with a slighty different header contribution, then panel is rerendered but the header contribution is not picked up. id="style.widget.titel" > Has anyone ideas how to debug this? Is it not possible to replace a header contribution with the same ID? thanks in advance, Haiko - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket security and JavaMelody
I ended having to write a custom JDBC Realm since i have used a salt for users passwords. import org.apache.catalina.realm.JDBCRealm; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.springframework.security.authentication.encoding.ShaPasswordEncoder; import java.security.Principal; /** * @author */ public class EazyregnskabRealm extends JDBCRealm { private static final Log log = LogFactory.getLog(EazyregnskabRealm.class); ShaPasswordEncoder encoder = new ShaPasswordEncoder(256); @Override protected String getName() { return this.getClass().getSimpleName(); } @Override public synchronized Principal authenticate(String username, String credentials) { String unDigestedPassword = credentials; String digestedPassword = encoder.encodePassword(unDigestedPassword, username); return super.authenticate(username, digestedPassword); } } web.xml BASIC Monitoring USER MONITOR Monitoring /monitoring MONITOR server.xml The EazyregnskabRealm.class must be made into a jar, this and all other dependencies should be put in the tomcat lib folder. Hope someone else can use this. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/8/19 Tommy Sadiq Hinrichsen > I use for authorizing wicket pages, but javaMelody's monitoring page is > not a wicket page. > > > Med venlig hilsen / Best regards > > Tommy Sadiq Hinrichsen > Selvstændig IT-udvikler > HD-ØP > > Humlebækgade 16, 1.tv. > 2200 København N > Tlf: 26 24 14 36 > > Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk > > > 2013/8/19 Martin Grigorov > >> Hi, >> >> >> On Mon, Aug 19, 2013 at 1:09 PM, Tommy Sadiq Hinrichsen < >> tommy.ly...@gmail.com> wrote: >> >> > Hi >> > >> > I'm using Wicket security for authorization and authentication. >> > >> >> Do you already use it for authorizing other pages ? >> >> >> > >> > I have included java melody to monitor the tomcat server where the web >> app >> > is running and i would like to limit access to the monitoring page. Is >> > there some way to do that with wicket security? >> > >> >> Just like for authorizing any other page. >> >> >> Check http://wicketguide.comsysto.com/guide/chapter19.html for intro to >> security in Wicket. >> >> >> > >> > Med venlig hilsen / Best regards >> > >> > Tommy Sadiq Hinrichsen >> > Selvstændig IT-udvikler >> > HD-ØP >> > >> > Humlebækgade 16, 1.tv. >> > 2200 København N >> > Tlf: 26 24 14 36 >> > >> > Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk >> > >> > >