Re: Expandable row in datatable
Is any one know the solution?. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Expandable-row-in-datatable-tp1883838p3560106.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to show / hide individual column of a DefaultDataTable using Ajax?
I need som help with how to create an expandable row in a datatable. The idea would be to have functionality like an accordion where you click the table row and it expands to show more details of the object in the current row. U have mentioned This is working fine for the table content (data rows) , Please can you provide the code?. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-show-hide-individual-column-of-a-DefaultDataTable-using-Ajax-tp2275208p3560116.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
adding style to multiple form fields on validaton
Hello friends, I have form with fields A and B. When field A is invalid - it is colored in red (by adding ValidationStyleBehavior to it - see code below) How can I color field B when field A is invalid? class ValidationStyleBehavior extends AbstractBehavior { public void onComponentTag(final Component component, final ComponentTag tag) { FormComponent comp = (FormComponent) component; if (comp.isValid() comp.getConvertedInput() != null) { tag.getAttributes().put(class, valid); } else if (!comp.isValid()) { tag.getAttributes().put(class, invalid); } } }; Thanks Rebecca -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-style-to-multiple-form-fields-on-validaton-tp3560363p3560363.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: adding style to multiple form fields on validaton
Hi Rebecca, you can add the same behavior - ValidationStyleBehavior - in the field B. On Mon, May 30, 2011 at 7:14 AM, rebecca rivka.shis...@gmail.com wrote: Hello friends, I have form with fields A and B. When field A is invalid - it is colored in red (by adding ValidationStyleBehavior to it - see code below) How can I color field B when field A is invalid? class ValidationStyleBehavior extends AbstractBehavior { public void onComponentTag(final Component component, final ComponentTag tag) { FormComponent comp = (FormComponent) component; if (comp.isValid() comp.getConvertedInput() != null) { tag.getAttributes().put(class, valid); } else if (!comp.isValid()) { tag.getAttributes().put(class, invalid); } } }; Thanks Rebecca -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-style-to-multiple-form-fields-on-validaton-tp3560363p3560363.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Expandable row in datatable
Hi, I easily achieved it using nested ListView components and one line of JavaScript: $('.expandableLine').click(function() { $(this).next().toggle(); }); On Mon, May 30, 2011 at 4:47 AM, ramlael grambab...@gmail.com wrote: Is any one know the solution?. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Expandable-row-in-datatable-tp1883838p3560106.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: adding style to multiple form fields on validaton
afaiu she wants B to be red when A is invalid A should be passed to the behavior and also checked whether it has an error. See below for updated code On Mon, May 30, 2011 at 3:10 PM, Pedro Santos pedros...@gmail.com wrote: Hi Rebecca, you can add the same behavior - ValidationStyleBehavior - in the field B. On Mon, May 30, 2011 at 7:14 AM, rebecca rivka.shis...@gmail.com wrote: Hello friends, I have form with fields A and B. When field A is invalid - it is colored in red (by adding ValidationStyleBehavior to it - see code below) How can I color field B when field A is invalid? class ValidationStyleBehavior extends AbstractBehavior { private final FormComponent compA; public ValidationStyleBehavior(FormComponent compA) { this.compA = compA;} public void onComponentTag(final Component component, final ComponentTag tag) { FormComponent comp = (FormComponent) component; if (comp.isValid() compA.isValid() comp.getConvertedInput() != null) { tag.getAttributes().put(class, valid); } else if (!comp.isValid() || !compA.isValid()) { tag.getAttributes().put(class, invalid); } } }; Thanks Rebecca -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-style-to-multiple-form-fields-on-validaton-tp3560363p3560363.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Expandable row in datatable
I need to use Datatable, bcoz need sorting for the columns. Regards, Rambabu -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Expandable-row-in-datatable-tp1883838p3560606.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Expandable row in datatable
Rambabu, I did it using a datatable . The last column in the table containts the expanded area. Try to achieve it with html and javascript first. Then you can use wicket datatable and panels to put the html pieces together. Josh.
Re: Expandable row in datatable
Hi Josh, Please can you send the code by using datatable?. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Expandable-row-in-datatable-tp1883838p3560822.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket session statistics
Or the requestlogger On May 27, 2011 9:13 AM, KingFee Dong kingfee.d...@gmail.com wrote: Hello, I think I find it getLiveSessions() can give me some help! Thank you both! Good Luck ! 在 2011年5月27日 下午1:47,Tobias Gierke tobias.gie...@code-sourcery.de写道: Hi, Implement a http://download.oracle.com/javaee/5/api/javax/servlet/http/HttpSessionListener.html and put it in your web.xml. Regards, Tobias Hello, Maybe I found it,LiveSessionsPage.java ,it can count peak session,but not what i want. I want to count the online users, for example there a three users here, if somtime a user had closed his(or her) web browser this session number is two now How can I do it ? Thanks! 2011/5/26 Martin Grigorov mgrigo...@apache.org Look deeper. This info is also provided. 2011/5/26 KingFee Dong kingfee.d...@gmail.com: I found that DebugBar panel in wicket-devutils.jar is also talk about size of one session. What I want to count is unexpired sessions in the wicket application. just like a forum,count the online users Thanks ! 2011/5/26 Martin Grigorov mgrigo...@apache.org Also Tomcat comes with ManagerApplication which provides such kind of information for all deployed apps On Thu, May 26, 2011 at 12:05 PM, Martin Grigorov mgrigo...@apache.org wrote: see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ http://jweekend.com/ http://jweekend.com/ -- -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ http://jweekend.com/ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to have custom components interact with CompoundPropertyModel?
Can you debug onBeforeRender and see if CompoundPropertyModel refers to the original Panel's field containing the calendar? Or model's object is already null? I tried to call getModel() in onBeforeRender() to get hold of the parent's model (the CompoundPropertyModel of the panel) which works. But when I call getModelObject, getModelValue or getValue I only recieve empty Strings or null. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
guice injection on WebApplication init
hi, my wicket application uses guice to inject services and dao-s. it works fine but recently I started to use in-memory db. so I need somehow initialize(create tables, insert some sample data) my db after getComponentInjector() and before getHomePage(). of course I could (out of guice configuration) create new DataSource and run code in WebApplication.init() method but this seems to me as big hack. can somebody help me with that. thanks pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Specific Paletter Validator
Hi, I'm trying to add a Validator to a Palette. The Idea is to check something related to List of selected Items. I tryied to make something like this: PaletteAccount palete = new PaletteAccount(..); palette.getRecorderComponent().add(new myValidator()); I hoped that RecorderAccount expected a IValidatorListAccount on add method, but it receives an IValidatorObject. How can I make some validations over selected items of palette? What can I expect when I getValue() of validatable param? Regards Tito
1.5 rc 4.2 ajax radiochoice bug?
Hi Guys I've hit yet another possible bug. I'll fill in the jira if necessary heres how it is affecting our application. I have a form that has a propertylistview, in that list view theres a couple of different components where some are conditionally displayed depending on one of the formcomponents(componentA) which also has a ajaxformchoiceupdating behavior. If the radiochoice( componentB) starts by not being shown and then altered to get shown if the user clicks the right option on componentA, componentB gets redrawn by the ajaxupdate but then when the form are submitted I've debugged it and can see that somehow it's getting set to null instead of the selected choice. If componentB starts by being shown theres no problems... Hmm I probably need to provide a quickstart or are this sounding familiar to somebody? -N - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: guice injection on WebApplication init
see GuiceWebApplicationFactory On Mon, May 30, 2011 at 9:19 PM, kamiseq kami...@gmail.com wrote: hi, my wicket application uses guice to inject services and dao-s. it works fine but recently I started to use in-memory db. so I need somehow initialize(create tables, insert some sample data) my db after getComponentInjector() and before getHomePage(). of course I could (out of guice configuration) create new DataSource and run code in WebApplication.init() method but this seems to me as big hack. can somebody help me with that. thanks pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: guice injection on WebApplication init
heres how we do it.. it probably be done more elegantly.. You can also check the guice archetype on legup.. private Injector getDevelopmentInjector() { Injector parent = Guice .createInjector(new CoreServicesWallboardModule()); EntityManager entityManager = parent.getInstance(EntityManager.class); SessionImpl sI = (SessionImpl) entityManager.getDelegate(); setupSeedData(sI.connection()); return parent.createChildInjector(parent .getInstance(SelectedWallBoardWallboardModule.class)); } private void setupSeedData(Connection connection) { boolean hsql = true; IDataSet dataSet = null; IDatabaseConnection connectionDBUnit = null; try { dataSet = new XmlDataSet(getResource().openStream()); connectionDBUnit = new DatabaseConnection(connection); DatabaseConfig config = connectionDBUnit.getConfig(); if (hsql) { config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new HsqldbDataTypeFactory()); } else { config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new PostgresqlDataTypeFactory()); } } catch (DataSetException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (DatabaseUnitException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { DatabaseOperation.CLEAN_INSERT.execute(connectionDBUnit, dataSet); if (!hsql) { connection.createStatement().executeQuery( SELECT setval('hibernate_sequence', 100, true);); } } catch (DatabaseUnitException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { connectionDBUnit.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } 2011/5/30 kamiseq kami...@gmail.com: hi, my wicket application uses guice to inject services and dao-s. it works fine but recently I started to use in-memory db. so I need somehow initialize(create tables, insert some sample data) my db after getComponentInjector() and before getHomePage(). of course I could (out of guice configuration) create new DataSource and run code in WebApplication.init() method but this seems to me as big hack. can somebody help me with that. thanks pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to have custom components interact with CompoundPropertyModel?
Yes, i can get the CompoundPropertyModel and it refers to the entity containing the calendar. So i was wondering if i should just get the object from the model and throw it in a PropertyResolver. But somehow I have the feeling this would not be the intended way, would it? Can you debug onBeforeRender and see if CompoundPropertyModel refers to the original Panel's field containing the calendar? Or model's object is already null? I tried to call getModel() in onBeforeRender() to get hold of the parent's model (the CompoundPropertyModel of the panel) which works. But when I call getModelObject, getModelValue or getValue I only recieve empty Strings or null. - 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: guice injection on WebApplication init
thanks for a quick replay Ill try this tomorrow :] pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Re: Wicket / Hibernate / Databinder (dead?)
Rodolfo Hansen-2 wrote: I also have a bit of code we have been working on.. I was sorta procrastinating with it on my local box. Things have been rather overwhelming lately. If you would like to make a pull request, I will gladly review it, and merge it into my branch. I actually have some work regarding integration for the conversation scope with spring. So far, all I've done is change the count() casting from (Integer) to (Number) since later versions of Hibernate return a Long. I'm on vacation for this week, but will be looking into it later. I'm a 100% git newb, so I'll ensure I've done everything correctly before e-mailing you with a pull request. Thanks! Jake -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Hibernate-Databinder-dead-tp3557635p3561938.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket newbie seeks redirect idiom
Hello. I just finished reading Wicket In Action, and now I'm working on my first Wicket app. I have a simple question about page redirects. My application's homepage is WelcomePage.java, which I have mounted on /welcome. However, if the user has already authenticated and they have a session, I would like to immediately send them to HomePage.java if they happen to browse to /welcome. HomePage.java is a protected page that contains stuff only a logged user can see. Whereas WelcomePage.java is the unauthenticated user's restricted view of the site. As a first step, I have chosen to implement this redirect in the WelcomePage ctor as follows: public WelcomePage(PageParameters parameters) { add(new Label(message, blah)); if (AppSession.get().isAuthenticated()) { setResponsePage(HomePage.class); } } While checking the session for an authenticated user and setting the response page to HomePage.class seems to work, I don't know if it represents the Wicket Way. I was thinking there may be a more elegant way to affect the redirect, perhaps with one of the Page lifecycle methods. Would someone who has been here be kind enough to comment? Thank you. -- Mark - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket newbie seeks redirect idiom
Here's a few thoughts: 1) Instead of all the redirecting around, put the unauthenticated content on the root page. If the user is authenticated, redirect them to a url such as /users and make everything below that mount protected. People don't pay much attention to URLs any more anyway. Don't get too attached to your URLs looking pretty, but if you must, deal with them at the end by creating mount points. 2) Protecting everything below certain mount points can be done with servlet filters on path components, but remember that this is not the native representation of a Page in Wicket. If you forget to make a mount for a page that should be protected, it can be accessed by someone who knows where to find it (generally a user that sees the page, then logs out and does something bad as if they are logged in). 3) Consider creating pages that can act differently, depending on the access rights of the current user. By using the @AuthorizeInstantiation annotation (and the appropriate support behind it), you can disable and enable components declaratively. So your home page can serve both authorized and unauthorized users. By having components display something grayed out (for instance) instead of real data, you can tease users into becoming paid users. 4) Connect @AuthorizeInstantiation to a standardized security manager such as Wicket Auth Roles, Shiro, or Spring Security. It's easy enough to implement IAuthorizationStrategy and do it yourself, but Wicket Auth Roles is very comprehensive and will open your thought process up to more of what is possible. Shiro and Spring Security are more powerful still (for instance with cookie-managed security, integration with data sources such as LDAP, and other benefits). Start with a few of these in order, but don't get too lost in trying to do all of this out of the gate. On May 30, 2011, at 7:32 PM, Mark Petrovic wrote: Hello. I just finished reading Wicket In Action, and now I'm working on my first Wicket app. I have a simple question about page redirects. My application's homepage is WelcomePage.java, which I have mounted on /welcome. However, if the user has already authenticated and they have a session, I would like to immediately send them to HomePage.java if they happen to browse to /welcome. HomePage.java is a protected page that contains stuff only a logged user can see. Whereas WelcomePage.java is the unauthenticated user's restricted view of the site. As a first step, I have chosen to implement this redirect in the WelcomePage ctor as follows: public WelcomePage(PageParameters parameters) { add(new Label(message, blah)); if (AppSession.get().isAuthenticated()) { setResponsePage(HomePage.class); } } While checking the session for an authenticated user and setting the response page to HomePage.class seems to work, I don't know if it represents the Wicket Way. I was thinking there may be a more elegant way to affect the redirect, perhaps with one of the Page lifecycle methods. Would someone who has been here be kind enough to comment? Thank you. -- Mark - 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: adding style to multiple form fields on validaton
Martin you understood my question - thanks Now, what if compA and compB are added to panelC and when compA is invalid, I want to color all the panel with red? What is the right way to do that? Thanks again Rebecca -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-style-to-multiple-form-fields-on-validaton-tp3560363p3562251.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org