RE: Trouble with Page Markup Inheritance & getVariation()
https://issues.apache.org/jira/browse/WICKET-4361 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: jQuery Mobile styling disappears after Wicket ajax update
Correct me if i'm wrong, but with normal jquery event handlers get lost if an element has changed. That's why you have to reattach them with on()/live(). Maybe this is the case? If it's only the css class you could try to add them with AttributeAppender/Modifier. > -Original Message- > From: wicket_newb [mailto:jceb...@hestonsystems.com] > Sent: Wednesday, January 25, 2012 11:34 PM > To: users@wicket.apache.org > Subject: jQuery Mobile styling disappears after Wicket ajax update > > I'm trying to implement a list that updates itself after a user clicks on a > link. > The list is a ListView repeater and is a child of WebMarkupContainer. > For each ListView item, I've attached an AjaxFallbackLink with the > WebMarkupContainer object as the sole ajax target. > > My implementation mostly works except some jQuery Mobile styling in the > container disappear. Looking at Firebug, I noticed that jQuery Mobile's > dynamically-generated class attributes are gone. > > As an example, my repeating divs before Wicket ajax update looks like this: > > > etc... > > > After the ajax update: > > > etc... > > > > Is there a way to tell Wicket to keep jQuery Mobile styling after an ajax > update? > > -- > View this message in context: http://apache- > wicket.1842946.n4.nabble.com/jQuery-Mobile-styling-disappears-after- > Wicket-ajax-update-tp4328874p4328874.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: SQL Query casting objects
SQLQuery.addEntity(Class entityClass).list() http://docs.jboss.org/hibernate/core/3.3/api/org/hibernate/class-use/SQLQuery.html -Original Message- From: Henrique Boregio [mailto:hbore...@gmail.com] Sent: Friday, December 10, 2010 3:40 AM To: users@wicket.apache.org Subject: SQL Query casting objects I have an SQL query to do a full-text search on my database: String sql = "SELECT * FROM Items WHERE MATCH (title, description) AGAINST ('" + searchText + "');"; List items = session.createSQLQuery(sql).list(); When I execute it, it returns a list with the rows it found as a result. Each row is actually an "Item" object, but since this is an SQL query, the result is an array of Objects. Is there a way to cast it to an "Item" object without having to manually go through each of the columns it returns? The same way an HQL automatically casts the results: List items = (List) session.createQuery( ... ); I had no luck finding out how to implement sql MATCH and AGAINST using HQL. Does anyone know a solution to this issue? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: overriding newRowItem() in AjaxFallbackDefaultDataTable
Just create a panel that holds you links/buttons or whatever and that is loaded with your invoice model. The panel could have a link with your invoice number and in the onClick/onSubmit method you trigger a redirect to your details page or something like this. Take a look at the wicket phonebook demo application or see my last column: List> columns = new ArrayList>(); columns.add(new AbstractColumn(new Model("Name"), "dnsAname") { XXX }); columns.add(new AbstractColumn(new Model("Sub-Domäne"), "dnsDomain") { XXX }); columns.add(new AbstractColumn(new Model("Ip"), "ipAddress") { XXX }); columns.add(new AbstractColumn(new Model("Mac"), "etherHwAddr") { XXX }); columns.add(new AbstractColumn(new Model("Standort"), "location") { XXX }); columns.add(new AbstractColumn(new Model(" ")) { public void populateItem(Item> cellItem, String componentId, IModel rowModel) { /* * A panel that has some buttons */ ActionsPanel actions = new ActionsPanel( SOME PARAMETER ) { @Override public void onSubmitButton1(AjaxRequestTarget target, Form form) { DO SOMETHING } }); _devicesAFDDT = new AjaxFallbackDefaultDataTable("devicesTable", columns, dataProvider, 20) -Original Message- From: Josh Kamau [mailto:joshnet2...@gmail.com] Sent: Friday, August 13, 2010 12:05 PM To: users@wicket.apache.org Subject: Re: overriding newRowItem() in AjaxFallbackDefaultDataTable Thanks Jerome. What i want is to make the data in the cells clickable so that users can use them to drill down. For example, one column displays invoice numbers. I want the invoice number displayed to be a link so that a user can click it to open the invoice details page. I thought i would do so by overriding the way the cells are rendered. I am still not able to do this. Regards. Josh On Fri, Aug 13, 2010 at 12:59 PM, Bodis, Jerome wrote: > > >Somebody please help me with a sample code on how to override the > newRowItem method of the AjaxFallbackDefaultDataTable > > _dbsTable = new > AjaxFallbackDefaultDataTable("dbsTable", > dbsColumns, dbsProvider, 20) >{ >// add a tooltip to each row >@Override >protected Item > newRowItem(String id, >int index, > IModel model) { > >Item item = > super.newRowItem(id, index, model); > >String info = "blabla"; > >item.add(new > JQueryTooltipBehavior(info)); > >return item; > } >}; > > >I would like to display some of the columns as links . is this the > >way to > do it? > > Add a panel with your links (or whatever content you need) to an > AbstractColumn and append this to your list of columns > (List>) > > - > 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: overriding newRowItem() in AjaxFallbackDefaultDataTable
>Somebody please help me with a sample code on how to override the newRowItem >method of the AjaxFallbackDefaultDataTable _dbsTable = new AjaxFallbackDefaultDataTable("dbsTable", dbsColumns, dbsProvider, 20) { // add a tooltip to each row @Override protected Item newRowItem(String id, int index, IModel model) { Item item = super.newRowItem(id, index, model); String info = "blabla"; item.add(new JQueryTooltipBehavior(info)); return item; } }; >I would like to display some of the columns as links . is this the way to do >it? Add a panel with your links (or whatever content you need) to an AbstractColumn and append this to your list of columns (List>) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Easier using of FormComponentFeedbackIndicator for many fields?!
I did this with an IVisitor, that traverses all form components and adds an AbstractBehavior to each required inputfield. This Behavior writes an "*" right after the component has been painted. Watch this pdf for an example: http://code.google.com/p/londonwicket/downloads/list and than " LondonWicket-FormsWithFlair.pdf " As "setComponentBorder" is deprecated in newer wicket versions i left the componentBorder part out, no need for it. For making it work with ajax, i had also to implement AbstractBehavior.isTemporary() and to add the forms parent as a target oft he calling button Jerome -Original Message- From: Martin U [mailto:ufer.mar...@googlemail.com] Sent: Thursday, February 04, 2010 1:14 PM To: users@wicket.apache.org Subject: Easier using of FormComponentFeedbackIndicator for many fields?! Hi Folks, i've to implement many form-pages with a lot of (more than 30) input fields, and each of them should be validated at least of "required" or not. but the request is to show the validation-errors behind the depeding component.. so iam using FormComponentFeedbackIndicator now and everything works fine with: searchfield = new RequiredTextField("seachfield", new PropertyModel(SearchPanel.this, "searchString")); add(searchfield); indicator = new FormComponentFeedbackIndicator("searchfield_indicator"); indicator.setIndicatorFor(searchfield); indicator.setOutputMarkupId(true); indicator.setOutputMarkupPlaceholderTag(true); add(indicator); this is an ajax-form so i have to add this to onSubmit too for each validating field. protected void onError(AjaxRequestTarget target, Form form) { target.addComponent(indicator); } Is there any Hint to easier this implementation? What i imagine is something like: searchfield = new *RequiredValidatedTextField*("seachfield", new PropertyModel(SearchPanel.this, "searchString")); and inside this child class iam building a indicator but how could i add the "indicator"-Span dynamically to the markup and how could i do the target.addComponent than? Thanks for any hints. - Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: how to clear validation error
Shouldn't the FeedbackPanel be a child of the forms panel, instead of the form itself ? (don't know exactly = Your way the feedbackpanel gets submitted too) Jérôme -Original Message- From: Chuck Brinkman [mailto:chasb1...@gmail.com] Sent: Friday, January 08, 2010 9:02 AM To: users@wicket.apache.org Subject: how to clear validation error I have a form with a html submit button. In java I wrote my own onSubmit to handle the form processing. In the form I have a firstName field that is required. First Name: TextField firstName = new TextField("firstName"); firstName.setRequired(true); form.add( new FormComponentFeedbackBorder("borderFirstName").add( firstName ) ); All works great as long as the user input is valid. If I attempt to submit an empty firstName field I get the expected message in my FeedbackPanel and my firstName text field gets the red asterisk. I then add a valid firstName and submit again. The page remains showing the valid firstName input along with the validation errors and onSubmit does not fire. I must be doing something wrong but can't figure it out. Thanks for your help. I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org