Upload ok - how about downloading a bytestream?
Hi! I have bytes[] stored in the db LONGBLOB column. How do I make a clickable link for downloading the contents? ** Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (Class>) casting troubles
Just to quickly weigh in on the verbosity argument:As someone who has coded Java (and Perl, C++, etc) in every environment from individual projects to multinational finance systems, I will say that verbosity of code runs a far, far, distant third (or twentieth) to:1. Readability/Understandability, and2. MaintainabilityBy illustrating succinctly what type of model (if any) a component will contain, generics in Wicket neatly accomplish point 1.By allowing your IDE to tell you when you're setting the wrong type of model object in a component it neatly accomplishes point 2.You write your code once. You maintain it thousands of times. The trade-off to me is perfectly clear, and this will be vindicated when Wicket-based enterprise projects start conspicuously succeeding where others have failed.Also, don't mistake "verbosity" for "DRY-ness". COBOL was verbose because it forced you to repeat yourself over and over. Java supports very elegant reuse, so each piece of functionality is written just once. Thanks to Annotations we've cut down (significantly) on boilerplate, and the whole appeal of Wicket is its ability to enable reuse at the web tier. Between generics, annotations and component reuse, this makes Wicket a very DRY-friendly framework, and has vastly reduced the amount of code I've had to cut for my clients.I've used every framework under the sun (no pun intended) and Wicket rules over them all.Cheers,DanOn 22/05/2008, at 07:20AM, Jonathan Locke wrote:I'm jumping into this conversation very late and I simply can't catch up onthis entire thread, but isn't it possible to have a non-generic build of thegeneric framework for people that don't want to use generics?Skimming this discussion, in general, I tend to agree with Eelco. A goodgeneral approach would be to fully generify the framework and then vote toback out the things which are really not helpful (for example, although pageis technically a component, pages often have no models, so it might be agood thing to a un-generify). Once we have found a practical/optimal levelof generification should we vote on it. Let's not throw the baby out withthe bathwater.Also, for myself, I disagree that type safety is not a primary goal ofgenerics. Even if the API were completely clear already, I'd still prefermore type safety.Martijn Dashorst wrote:On Wed, May 21, 2008 at 5:05 PM, Johan Compagner <[EMAIL PROTECTED]>wrote:Generics is type safetyI didn't say generics isn't type safety. But APPLYING generics for theWicket framework API *ISN'T* its primary goal. API clarity *IS*. Lessquestions on the mailing list regarding DDC, ListView, etc. is themain goal for applying generics in Wicket.I am against this abuse big time -1000 from meI'm -1000^1 for abusing my eyes and brain inthe way it currently is implemented in Wicket. It is completely andutterly unusable for beginners. There is no way this is going to makethe number of questions on the mailinglist less (other than by scaringaway anyone that wants to actually use the framework)Martijn-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]-- View this message in context: http://www.nabble.com/%28Class%3C--extends-Page%3C-%3E%3E%29--casting-troubles-tp17355847p17375350.htmlSent from the Wicket - User mailing list archive at Nabble.com.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Daniel WalmsleyDirector, Firesydee: [EMAIL PROTECTED]m: +61404864141
Re: Background image that resizes with window?
On Fri, May 23, 2008 at 05:11:58PM -0400, David Nedrow wrote: > > When I try to use this in a Wicket page, I'm getting a JavaScript > error noting: > > "Value undefined (result of expression $(window).width) is not > object." > > and the image doesn't resize with the window. I'm clearly missing some > subtlety here. > > -David I'd guess that your page is not able to load jquery.js. The page has a relative URL to jquery.js, which may no longer be valid when paired up with the page URL from Wicket. jk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket and inline JavaScript
Hi, I don't think current wicket output is that bad, just look at what some JSF implementation produce :) Seriously, we might consider different approach (the one like you suggest) for 1.5. But I don't think current wicket approach is something that desperately needs to be fixed, though there certainly is room for improvement. As for jquery unobtrusiveness, IMHO anything that pollutes object prototypes in javascript can hardly be considered inobtrusive. -Matej On Thu, May 22, 2008 at 3:16 PM, Ned Collyer <[EMAIL PROTECTED]> wrote: > > Hi Edvin, > > I am an advocate of JQuery :). I even won their icon design contest, and > I've been using it for years! I think it should be used in all projects > that require effects or cool DOM manipulation. > > I love the "unobtrusive way" and xhtml strict! > > That being said, when it comes to wicket AJAX - just use the wicket ajax and > be done with it. No point mucking with something thats already excellent. > It works and its easy. Why reimplement that bit - and potentially open up > bugs that you need to go debug. > > For effects and DOM manipulation, you can use JQuery by adding header > contributors. It is cleaner.. and in many instances easier to debug. It > makes development quick and painless. > > If it wasn't wicket - id suggest using JQuery for ajax. > > > Edvin Syse wrote: >> >> Hi, >> >> I have a webdesigner who keeps harassing me with the way Wicket does >> JavaScript, attaching behaviour to onclick events etc. instead of doing >> it "the jquery way" of picking up the components and attaching the >> events afterwards, thus keeping all the nasty bits away from the actual >> markup. >> >> Ofcourse the code looks a lot cleaner "the jquery way", and he tells me >> that debugging and working with the code is also much easier. Personally >> I don't know enough about html/javascript to decide what's the better >> approach, but I just wanted to know if there are any plans to rework >> this in Wicket, or if the current approach is just as good? >> >> -- Edvin >> > > -- > View this message in context: > http://www.nabble.com/Wicket-and-inline-JavaScript-tp17402101p17404025.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Background image that resizes with window?
make sure you strip wicket tags from the output -igor On Fri, May 23, 2008 at 2:11 PM, David Nedrow <[EMAIL PROTECTED]> wrote: > > On May 23, 2008, at 1:46 PM, John Krasnay wrote: > >> On Fri, May 23, 2008 at 11:57:48AM -0400, David Nedrow wrote: >>> >>> Might be your CSS. Is your image styled as position:absolute? >> >> (Again, nothing to with Wicket...) > > The odd thing is that I can get this going with zero problem using a static > HTML mockup, but it refuses to work via Wicket generated pages. > > You can see a working sample by grabbing: >http://nedron.net/bgtest.zip > > When I try to use this in a Wicket page, I'm getting a JavaScript error > noting: > >"Value undefined (result of expression $(window).width) is not > object." > > and the image doesn't resize with the window. I'm clearly missing some > subtlety here. > > -David > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Background image that resizes with window?
On May 23, 2008, at 1:46 PM, John Krasnay wrote: On Fri, May 23, 2008 at 11:57:48AM -0400, David Nedrow wrote: Might be your CSS. Is your image styled as position:absolute? (Again, nothing to with Wicket...) The odd thing is that I can get this going with zero problem using a static HTML mockup, but it refuses to work via Wicket generated pages. You can see a working sample by grabbing: http://nedron.net/bgtest.zip When I try to use this in a Wicket page, I'm getting a JavaScript error noting: "Value undefined (result of expression $(window).width) is not object." and the image doesn't resize with the window. I'm clearly missing some subtlety here. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems disabling componets and submitting them to validation
Hi, this is my problem: I have a form and 2 date fields. When the form is submitted for the first time, I do some validation on those fields and if everything goes ok, then I store the model object. Eventually, I have to disable the first of the 2 date fields to prevent modification, but the second one still needs to be editable. The thing is that when I do that, when I disable the first of the datefields I get a nullPointerException in the validator because I receive a null DateTime instead a date for the disabled field. If I setenabled(false) in a component then the content is not submitted? How can I do to still validate the date interval if I'm getting only the enabled date? -- View this message in context: http://www.nabble.com/Problems-disabling-componets-and-submitting-them-to-validation-tp17440116p17440116.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?
So these pallet controls are inside of a ListView that is ultimately nested in a Form. I *want* the button to do it's stuff of moving things from one list to the other, and unsetting the checkbox-- I don't want it to do any other kind of form processing. It was suggested maybe the checkbox value is being re-entered as part of the form of the button, but A. I would hope that .setDefaultFormProcessing(false) would have prevented that, and B. it doesn't seem like the Model's accessor for the hashmap for this checkbox is being accessed, as it is when I click on the checkbox directly. In short, the problem seems to be that the Checkbox is being redrawn, but not checking its underlying PropertyModel to do so, so its state is not correctly updated. It's not clear to me where Wicket is then getting the information to redraw... it's like it's caching it somewhere. (Again, I think I know it's being redrawn because I put inside a span and am redrawing that, and I put a label on the span that gets the current timestamp, and I can see THAT updating with each click...) On Fri, May 23, 2008 at 12:51 PM, Thijs Vonk <[EMAIL PROTECTED]> wrote: > I'm not sure what you are saying here. But if it is what I'm thinking then > you have misunderstood the meaning of .setDefaultFormProcessing. > > If your component is in a form, the 'defaultFormProcessing' will try to > write any changes in the form to the model, and then call the onSubmit of > the form, and finally the onSubmit of the button. > If set to false it will skip all the form handling and call the onSubmit of > the button directly. > http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) > > So if you are doing anything in the buttons 'onSubmit' that you don't want > in certain cases, then calling setDefaultFormProcessing(false) won't have > any affect. > > Thijs > > Kirk Israel wrote: >> >> the left/right moves ARE being done in the buttons onSubmit, I was >> hoping calling .setDefaultFormProcessing(false); when adding the >> button to the page would have prevented that? >> >> On Fri, May 23, 2008 at 4:50 AM, Thomas Mäder <[EMAIL PROTECTED]> >> wrote: >> >>> >>> Do the move left/move right controls do a submit? If so you might also be >>> resubmitting the (old) check box value. >>> >>> Thomas >>> >>> We have a list view that iterates over manufacturers, and each manufacturer has a "pallet control" of devices (two list boxes w/ move selection to right list, move selection to left list buttons between) along with a "all for manufacturer" checkbox >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Label visibility dependend on Model value
the result is whatever you gave the label as the model, if i look at your code above it is the firstname property of whatever user you gave to the compound model -igor On Fri, May 23, 2008 at 11:02 AM, greeklinux <[EMAIL PROTECTED]> wrote: > > Hello Igor, > > thank you for the help, but I tried it and it does not work. > I print out getModelObjectAsString() but there was "nothing". > I am confused about what getModelObjectAsString() returns. > Is the result my User that is loaded in my ProfileModel? > > > > > igor.vaynberg wrote: >> >> class mylabel extends label { >> protected boolean isvisible() { >> return !Strings.isEmpty(getModelObjectAsString()); >> } >> } >> >> -igor >> >> On Fri, May 23, 2008 at 8:13 AM, greeklinux <[EMAIL PROTECTED]> wrote: >>> >>> Hello, >>> >>> I want to display diffent values. For this purpose I am >>> using the Label component with a CompoundPropertyModel. >>> >>> I want to show user details on a profile page. >>> But not all user values are set. So I want to display only >>> values that are not empty strings. >>> >>> I was thinking about to extend the Label class and override >>> the isVisible() method. But I do not know how to get the value for >>> the Label that will be displayed. The Label gets his value with the >>> wicket id as property expression. >>> >>> ProfileModel gets an user id and loads a user obj. from DB. >>> >>> class user extends page { >>> ... >>>CompoundPropertyModel model = new CompoundPropertyModel(new >>> ProfileModel(userId)); >>>setModel(model); >>>Label firstName = new Label("firstName"); >>>add(firstName); >>> ... >>> } >>> >>> >>> Thanks >>> -- >>> View this message in context: >>> http://www.nabble.com/Label-visibility-dependend-on-Model-value-tp17427854p17427854.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Label-visibility-dependend-on-Model-value-tp17427854p17430846.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Label visibility dependend on Model value
Hello Igor, thank you for the help, but I tried it and it does not work. I print out getModelObjectAsString() but there was "nothing". I am confused about what getModelObjectAsString() returns. Is the result my User that is loaded in my ProfileModel? igor.vaynberg wrote: > > class mylabel extends label { > protected boolean isvisible() { > return !Strings.isEmpty(getModelObjectAsString()); > } > } > > -igor > > On Fri, May 23, 2008 at 8:13 AM, greeklinux <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I want to display diffent values. For this purpose I am >> using the Label component with a CompoundPropertyModel. >> >> I want to show user details on a profile page. >> But not all user values are set. So I want to display only >> values that are not empty strings. >> >> I was thinking about to extend the Label class and override >> the isVisible() method. But I do not know how to get the value for >> the Label that will be displayed. The Label gets his value with the >> wicket id as property expression. >> >> ProfileModel gets an user id and loads a user obj. from DB. >> >> class user extends page { >> ... >>CompoundPropertyModel model = new CompoundPropertyModel(new >> ProfileModel(userId)); >>setModel(model); >>Label firstName = new Label("firstName"); >>add(firstName); >> ... >> } >> >> >> Thanks >> -- >> View this message in context: >> http://www.nabble.com/Label-visibility-dependend-on-Model-value-tp17427854p17427854.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Label-visibility-dependend-on-Model-value-tp17427854p17430846.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Testing components not added directly to page
Hello, I'm trying to test a component that is added to another component that is added to the page. For example, I'd like to test the FeedbackPanel below that is added to the Form which is added to the page. I'm unsure of how to do this. Any help would be appreciated. Thanks! Ryan public AdvancedSearch() { add(new TabbedHeader("advancedSearchTabbedHeader")); Form form = new Form("advancedSearch", new CompoundPropertyModel(this)); add(form); //feedbackPanel FeedbackPanel feedbackPanel = new FeedbackPanel ("feedbackPanel"); feedbackPanel.add(new AttributeModifier("class", true, new Model("feedbackPanel"))); feedbackPanel.setFilter(new ContainerFeedbackMessageFilter (form)); form.add(feedbackPanel); public void testDisplayAdvancedSearch(){ //create a tester and go to acknowledgements WicketTester tester = new WicketTester(new CnvApplication()); tester.startPage(AdvancedSearch.class); //check to make sure all components exist with correct names and types tester.assertComponent("advancedSearchTabbedHeader", TabbedHeader.class); FormTester formTester = tester.newFormTester("advancedSearch"); //*tester.assertComponent("feedbackPanel", FeedbackPanel.class); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Detachable confusion
Assume the following... v @Entity @Table(name = "user", catalog = "blah") public class User implements java.io.Serializable { private Long id; private String name; // getters/setters for both } public interface IUserDAO { // public void save/delete/findAll/etc } public class UserDAO implements IUserDAO { private EntityManager getEntityManager() { return EntityManagerHelper.getEntityManager(); } public void save(User entity) { EntityManagerHelper.log("saving User instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } //etc } If I want to display the Users in a table contained in a re-usable Panel(), should I be able to do something like... public final class UserListPanel extends Panel { public UserListPanel(String id) { super(id); // Create a detachable model IModel users = new LoadableDetachableModel() { @SpringBean UserDAO dao; @Override protected Object load() { return dao.findAll(); } return users; }; IColumn[] columns = { new PropertyColumn(new Model("ID"), "id"), new PropertyColumn(new Model("Name"), "name") }; SomeTableType dataTable = new SomeTableType(users); add(dataTable); } } Part of my confusion comes from trying to work in a SortableDataProvider to use with a DefaultDataTable with columns sortable by header () links. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Background image that resizes with window?
On Fri, May 23, 2008 at 11:57:48AM -0400, David Nedrow wrote: > > On May 23, 2008, at 11:20 AM, Igor Vaynberg wrote: > > >dont really see what this has to do with wicket...sounds like you are > >after some javascript. > > I have the JavaScript, but I was having trouble with other Wicket > elements being shunted aside by the image. I'll poke around again. > > -David Might be your CSS. Is your image styled as position:absolute? (Again, nothing to with Wicket...) jk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax ListView as Gmail
it just exists...it's in the code i posted IModel mailList = new LoadableDetachableModel() { protected Object load() { user.openPopServer(); try { messages=folder.getMessages(); } catch (MessagingException e) { // TODO Auto-generated catch block e.printStackTrace(); } List mailList1=Arrays.asList(messages); return mailList1; } }; } maybe the problem is that the new mails are not downloaded?!I've to start a new session or reconnect to the pop folder in some way (i think it just happens with folder.openPopServer() )?? igor.vaynberg wrote: > > you should use a loadable detachable model for your listview, that way > it will work transparently. > > -igor > > On Fri, May 23, 2008 at 9:25 AM, Davidoff <[EMAIL PROTECTED]> wrote: >> >> this is code for the mail list (i implemented modal windows in order to >> show >> emails but JWebUnit tests returned errors then i have to find some other >> way >> to show mails...my priority now is to find the way to refresh the mail >> listview: >> >> public class MailAccount extends WebPage { >>private ModalWindow modal; >>private Folder folder; >>private User user; >>private ListView listTable; >>private List test; >>private Message[] messages; >>private Message msg; >>private int index; >>public MailAccount(String username, String password) >>{ >>Manager manager=new Manager("AjaxUbiMailDB",1000); >> user=manager.authenticate(username, password); >>add(new Label("message","Hello " + user.firstName() +" "+ >> user.lastName())); >>Properties sysProperties = System.getProperties(); >>Session session=Session.getDefaultInstance(sysProperties, >> null); >>session.setDebug(false); >> >>folder=user.openPopServer(); >>try { >> >>add(new Label("contains","Your MailBox contains "+ >> folder.getMessageCount() + " messages.")); >> >> >>} catch (MessagingException e) { >>// TODO Auto-generated catch block >>add(new Label("contains","Wrong Username or >> password")); >>System.out.println("Error on opening pop folder or >> something else"); >>//e.printStackTrace(); >>} >> >> >>initMailList(); >> >>WebMarkupContainer listContainer = new >> WebMarkupContainer("theContainer"); >>//generate a markup-id so the contents can be updated >> through an AJAX call >>listContainer.setOutputMarkupId(true); >>listContainer.add(new >> AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); >>// add the list view to the container >>listContainer.add(listTable); >>// finally add the container to the page >>add(listContainer); >>user.closePopServer(); >>modal = new ModalWindow("modal"); >>addOrReplace(modal); >>} >> >> public void initMailList(){ >>listTable=new ListView("listview",mailList) >>{ >>private Folder folder=user.openPopServer(); >> >>public void populateItem(ListItem item) >> { >>try { >> final Message msg=(Message) >> item.getModelObject(); >>Address[] >> add=msg.getFrom(); >> index=msg.getMessageNumber(); >>AjaxLink rate = new >> AjaxLink("mess") { >>public void >> onClick(AjaxRequestTarget target) { >> >> >> >> GetMessage getMessage; >> >> >> getMessage = new GetMessage(modal.getContentId(), msg){}; >> >> >> modal.setContent(getMessage); >> >> >> modal.setInitialHeight(600); >> >> >> modal.setInitialWidth(1000); >> >> >> modal.show(target); >> >> >> modal.setTitle("Mail View"); >>
User has to log in twice(Using example from "Wicket In Action")
In Chapter 12 of the book "Wicket In Action" that is still being written, there is some sample code on how to provide authentication pages for users. I had trouble when using this code and this post is intended to help other users that may encounter this problem. I created the SignIn page class and the SignOut page class just as described in the book. I also created the WIASession and everything that was described there to make the Authentication piece work. The problem is that when I would sign out I would have to successfully sign in twice in order to be authenticated the next time(unless I closed the browser window and re-visited the site). Here is what I found. When Method #1 is called the User object gets set on the Session. So that when Method #2 is called the isAuthenticated should return true since user is not null. However, in a Stateless page a new Session gets created for every request so when Method #2 gets executed it is calling isAuthenticated on a new Session object which has a null user. The solution is in Method #4 when I set the user object on my Session. Notice that when the user gets set it checks to see if the Session is a temporary session and if it is then it binds it to make it non-temporary. This will ensure that the next call to WIASession.get() will return the same Session that you expect. It is a little more complicated to explain why it was working on the second time the user logs in so I won't go into detail here. However, if anyone is having this problem and is curious then let me know and I will try to explain it. If you are having this problem then I hope this helps. Method #1(SignInPage.java): private boolean signIn(String username, String password) { if(username != null && password != null) { User user = findUser(username); if(user != null) { if(user.getPassword().equals(password)) { WIASession.get().setUser(user); return true; } } } return false; } Method #2(WIAAuthorizationStrategy.java): public boolean isInstantiationAuthorized(Class componentClass) { if(ProtectedPage.class.isAssignableFrom(componentClass)) { return WIASession.get().isAuthenticated(); } return true; } Method #3(WIASession.java): public boolean isAuthenticated() { return user != null; } Method #4 (WIASession.java): public void setUser(User user) { this.user = user; if(isTemporary()) { bind(); } } -- View this message in context: http://www.nabble.com/User-has-to-log-in-twice%28Using-example-from-%22Wicket-In-Action%22%29-tp17430131p17430131.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: how can ..
On Fri, May 23, 2008 at 3:03 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: > What strategy should i use to achive such url: > http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html ? Please take a look at QueryStringUrlCodingStrategy and MixedParamUrlCodingStrategy. Wicket-examples has the 'stateless' example which is not really related to what you want, but uses those strategies. Play around with them and look at the code so that you understand what is going on. And consider creating your own BookmarkablePageRequestTargetUrlCodingStrategy extension if that works better for you. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?
I'm not sure what you are saying here. But if it is what I'm thinking then you have misunderstood the meaning of .setDefaultFormProcessing. If your component is in a form, the 'defaultFormProcessing' will try to write any changes in the form to the model, and then call the onSubmit of the form, and finally the onSubmit of the button. If set to false it will skip all the form handling and call the onSubmit of the button directly. http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean) So if you are doing anything in the buttons 'onSubmit' that you don't want in certain cases, then calling setDefaultFormProcessing(false) won't have any affect. Thijs Kirk Israel wrote: the left/right moves ARE being done in the buttons onSubmit, I was hoping calling .setDefaultFormProcessing(false); when adding the button to the page would have prevented that? On Fri, May 23, 2008 at 4:50 AM, Thomas Mäder <[EMAIL PROTECTED]> wrote: Do the move left/move right controls do a submit? If so you might also be resubmitting the (old) check box value. Thomas We have a list view that iterates over manufacturers, and each manufacturer has a "pallet control" of devices (two list boxes w/ move selection to right list, move selection to left list buttons between) along with a "all for manufacturer" checkbox - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wasp
Maurice Marrink schrieb: Yes that is exactly what wasp is for. cool, at least one thing i got right ;) You can either extend WaspAuthorizationStrategy or ClassAuthorizationStrategy. The latter provides a basic implementation to do component instantiation checks based on static fields available on the class. yuck. > if you use java 1.5+ you could build your implementation based on annotations. yep. sounds much better. As for the tutorial, swarm is set up as an example implementation so you should be able to get some ideas from that. imo the documentation on both projects is pretty decent. i must admin i was a little confused by the complexity of what i guess was swarm ;) However if you have any questions I'll be happy to answer them. that´s nice. i´ll dig a little and come back to this one. Might i ask what you implementation will be based on and if you plan on opensourcing it? well, it is a trivial implementation of generic authentication and authorization interfaces working with either LDAP or JPA for authentification and users&groups on the one hand, and simple beanshell scripts for defining authentification. homegrown, but quite clean, i think. i could brush that up a little and open it, if there is serious interest. thinkin twice, this at least could be a showcase for integrating wasp with non-swarm ;) (maybe the first one?) humm. let me & my employer think about it ;) cu uwe -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax ListView as Gmail
you should use a loadable detachable model for your listview, that way it will work transparently. -igor On Fri, May 23, 2008 at 9:25 AM, Davidoff <[EMAIL PROTECTED]> wrote: > > this is code for the mail list (i implemented modal windows in order to show > emails but JWebUnit tests returned errors then i have to find some other way > to show mails...my priority now is to find the way to refresh the mail > listview: > > public class MailAccount extends WebPage { >private ModalWindow modal; >private Folder folder; >private User user; >private ListView listTable; >private List test; >private Message[] messages; >private Message msg; >private int index; >public MailAccount(String username, String password) >{ >Manager manager=new Manager("AjaxUbiMailDB",1000); > user=manager.authenticate(username, password); >add(new Label("message","Hello " + user.firstName() +" "+ > user.lastName())); >Properties sysProperties = System.getProperties(); >Session session=Session.getDefaultInstance(sysProperties, > null); >session.setDebug(false); > >folder=user.openPopServer(); >try { > >add(new Label("contains","Your MailBox contains "+ > folder.getMessageCount() + " messages.")); > > >} catch (MessagingException e) { >// TODO Auto-generated catch block >add(new Label("contains","Wrong Username or > password")); >System.out.println("Error on opening pop folder or > something else"); >//e.printStackTrace(); >} > > >initMailList(); > >WebMarkupContainer listContainer = new > WebMarkupContainer("theContainer"); >//generate a markup-id so the contents can be updated through > an AJAX call >listContainer.setOutputMarkupId(true); >listContainer.add(new > AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); >// add the list view to the container >listContainer.add(listTable); >// finally add the container to the page >add(listContainer); >user.closePopServer(); >modal = new ModalWindow("modal"); >addOrReplace(modal); >} > > public void initMailList(){ >listTable=new ListView("listview",mailList) >{ >private Folder folder=user.openPopServer(); > >public void populateItem(ListItem item) > { >try { > final Message msg=(Message) > item.getModelObject(); >Address[] add=msg.getFrom(); > index=msg.getMessageNumber(); >AjaxLink rate = new > AjaxLink("mess") { >public void > onClick(AjaxRequestTarget target) { > > > GetMessage getMessage; > > getMessage = new GetMessage(modal.getContentId(), msg){}; > > modal.setContent(getMessage); > > modal.setInitialHeight(600); > > modal.setInitialWidth(1000); > > modal.show(target); > > modal.setTitle("Mail View"); > > } >}; >rate.add(new > Label("prova",String.valueOf(msg.getMessageNumber(; >item.add(rate); >item.add(new > AttributeAppender("class", true, new > Model(index % 2 ==0 ? "odd": "even"), " ")); >item.add(new > Label("subject", > msg.getSubject().toString())); >item.add(new > Label("from", add[0].toString())); >if > (msg.getSentDate()!=null) > > item.add(new Label("date", > msg.getSentDate().toString())); >
Re: busy indicator for AjaxFormComponentUpdatingBehavior
see how indicatingajaxlink does it -igor On Fri, May 23, 2008 at 9:15 AM, nitinkc <[EMAIL PROTECTED]> wrote: > > I have added a AjaxFormComponentUpdatingBehavior to a DropDownChoice > component to process the "onchange" request. I would like to show an ajax > busy indicator while the request is processed. Any ideas? > > AjaxFormComponentUpdatingBehavior updateBehavior = new > AjaxFormComponentUpdatingBehavior("onchange") >{ >protected void onUpdate(AjaxRequestTarget target) >{ >//update the cities based on state change >if(logger.isDebugEnabled()){ >logger.debug("State selected : '" + > event.getSt() + "'"); >} >target.addComponent(cityChoice); >} >}; > > stateChoice.add(updateBehavior); > -- > View this message in context: > http://www.nabble.com/busy-indicator-for-AjaxFormComponentUpdatingBehavior-tp17428154p17428154.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax ListView as Gmail
this is code for the mail list (i implemented modal windows in order to show emails but JWebUnit tests returned errors then i have to find some other way to show mails...my priority now is to find the way to refresh the mail listview: public class MailAccount extends WebPage { private ModalWindow modal; private Folder folder; private User user; private ListView listTable; private List test; private Message[] messages; private Message msg; private int index; public MailAccount(String username, String password) { Manager manager=new Manager("AjaxUbiMailDB",1000); user=manager.authenticate(username, password); add(new Label("message","Hello " + user.firstName() +" "+ user.lastName())); Properties sysProperties = System.getProperties(); Session session=Session.getDefaultInstance(sysProperties, null); session.setDebug(false); folder=user.openPopServer(); try { add(new Label("contains","Your MailBox contains "+ folder.getMessageCount() + " messages.")); } catch (MessagingException e) { // TODO Auto-generated catch block add(new Label("contains","Wrong Username or password")); System.out.println("Error on opening pop folder or something else"); //e.printStackTrace(); } initMailList(); WebMarkupContainer listContainer = new WebMarkupContainer("theContainer"); //generate a markup-id so the contents can be updated through an AJAX call listContainer.setOutputMarkupId(true); listContainer.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); // add the list view to the container listContainer.add(listTable); // finally add the container to the page add(listContainer); user.closePopServer(); modal = new ModalWindow("modal"); addOrReplace(modal); } public void initMailList(){ listTable=new ListView("listview",mailList) { private Folder folder=user.openPopServer(); public void populateItem(ListItem item) { try { final Message msg=(Message) item.getModelObject(); Address[] add=msg.getFrom(); index=msg.getMessageNumber(); AjaxLink rate = new AjaxLink("mess") { public void onClick(AjaxRequestTarget target) { GetMessage getMessage; getMessage = new GetMessage(modal.getContentId(), msg){}; modal.setContent(getMessage); modal.setInitialHeight(600); modal.setInitialWidth(1000); modal.show(target); modal.setTitle("Mail View"); } }; rate.add(new Label("prova",String.valueOf(msg.getMessageNumber(; item.add(rate); item.add(new AttributeAppender("class", true, new Model(index % 2 ==0 ? "odd": "even"), " ")); item.add(new Label("subject", msg.getSubject().toString())); item.add(new Label("from", add[0].toString())); if (msg.getSentDate()!=null) item.add(new Label("date", msg.getSentDate().toString())); else
busy indicator for AjaxFormComponentUpdatingBehavior
I have added a AjaxFormComponentUpdatingBehavior to a DropDownChoice component to process the "onchange" request. I would like to show an ajax busy indicator while the request is processed. Any ideas? AjaxFormComponentUpdatingBehavior updateBehavior = new AjaxFormComponentUpdatingBehavior("onchange") { protected void onUpdate(AjaxRequestTarget target) { //update the cities based on state change if(logger.isDebugEnabled()){ logger.debug("State selected : '" + event.getSt() + "'"); } target.addComponent(cityChoice); } }; stateChoice.add(updateBehavior); -- View this message in context: http://www.nabble.com/busy-indicator-for-AjaxFormComponentUpdatingBehavior-tp17428154p17428154.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wasp
Hi Uwe, Yes that is exactly what wasp is for. You can either extend WaspAuthorizationStrategy or ClassAuthorizationStrategy. The latter provides a basic implementation to do component instantiation checks based on static fields available on the class. if you use java 1.5+ you could build your implementation based on annotations. As for the tutorial, swarm is set up as an example implementation so you should be able to get some ideas from that. imo the documentation on both projects is pretty decent. However if you have any questions I'll be happy to answer them. Might i ask what you implementation will be based on and if you plan on opensourcing it? Maurice 2008/5/23 Uwe Schäfer <[EMAIL PROTECTED]>: > hi > > i have my own authentication and authorization stuff ready and want to hook > it into wicket. that´s what wasp is for, right ? > ok, after reading a few pages and browsing trough the code, i THINK what i > want then, is using WASP without that SWARM thingy. > > is there any tutorial/presentaation/code/experience in how to do that out > there? > > basically, i think i´d have to start with implementing a > WaspAuthorizationStrategy, right? > > cu uwe > -- > > THOMAS DAILY GmbH > Adlerstraße 19 > 79098 Freiburg > Deutschland > T + 49 761 3 85 59 0 > F + 49 761 3 85 59 550 > E [EMAIL PROTECTED] > www.thomas-daily.de > > Geschäftsführer/Managing Directors: > Wendy Thomas, Susanne Larbig > Handelsregister Freiburg i.Br., HRB 3947 > > Registrieren Sie sich unter http://morningnews.thomas-daily.de für die > kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages > morgens um 9:00 in Ihrer Mailbox. > > Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um > 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 > Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion > lautet [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Background image that resizes with window?
On May 23, 2008, at 11:20 AM, Igor Vaynberg wrote: dont really see what this has to do with wicket...sounds like you are after some javascript. I have the JavaScript, but I was having trouble with other Wicket elements being shunted aside by the image. I'll poke around again. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Null model with CheckGroup
in the example checkgroup inherits a property of the compoundpropertymodel as its model. i suggest you read the models wiki page. -igor On Fri, May 23, 2008 at 8:36 AM, seanblaes <[EMAIL PROTECTED]> wrote: > > That's how the example at > http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.CheckGroupPage > shows it. I added an empty ArrayList as the model, and it works now. > Should I send a message to the bugs list to update the examples page above? > > > I did note that when you view the source of the example, it uses the empty > ArrayList approach I'm using now. > > > igor.vaynberg wrote: >> >> CheckGroup group = new CheckGroup("merchantCheckboxGroup", **model**); >> >> you are never setting the model you are passing in. >> >> -igor >> >> On Fri, May 23, 2008 at 12:09 AM, seanblaes <[EMAIL PROTECTED]> wrote: >>> >>> Hello all, I'm beating my head on the wall and not really sure what I'm >>> doing >>> wrong... :( >>> >>> I am attempting to use a CheckGroup to contain several choices - maybe >>> it's >>> even the wrong way to go about it. I followed the example on the Wicket >>> webpage, but it's not working for me. >>> >>> Here's my HTML: >>> >>> >> wicket:id="filterByMerchantCheckbox" value="1" onchange="var >>> l=$('optional_filter_by_merchant'); if (this.checked){l.show()} else >>> {l.hide()}"/> >>> Merchant >>> >>> >>> >>>>> name="filter_by_merchant_rich_clicks" >>> id="filter_by_merchant_rich_clicks" wicket:id="merchantCheckboxComponent" >>> /> >>>>> wicket:id="merchantCheckboxLabel">Rich Clicks >>> >>> >>> >>> >>> >>> And I have a method to populate this section: >>> >>> private CheckGroup createMerchantFilterMerchantsCheckboxes(Model model) { >>>CheckGroup group = new CheckGroup("merchantCheckboxGroup"); >>>ListView merchants = new ListView("merchants", >>> MerchantOption.loadOptions()) { >>>private static final long serialVersionUID = 1L; >>> >>>protected void populateItem(ListItem item) { >>>item.add(new Check("merchantCheckboxComponent")); >>>item.add(new Label("merchantCheckboxLabel", new >>> PropertyModel(item.getModel(), "value"))); >>>} >>>}; >>>group.add(merchants); >>> >>>return group; >>> } >>> >>> >>> When I call this method from my page class, it's pretty simple: >>> >>> ReportTypeOption def = new ReportTypeOption(); >>> Model model = new Model(def); >>> setModel(model); >>> Form form = new Form("reportForm"); >>> add(form); >>> form.add(createMerchantFilterMerchantsCheckboxes(model)); >>> >>> >>> But, every time I hit the page, it throws >>> "org.apache.wicket.WicketRuntimeException: CheckGroup >>> [0:reportForm:merchantCheckboxGroup] contains a null model object, must >>> be >>> an object of type java.util.Collection". >>> >>> From what I can tell, this code is exactly like what's on the demo page. >>> Further, I've tried reading all the docs I can find and have even tried >>> stepping through the code. But, I'm not getting anywhere. Does anybody >>> have any ideas on how to get that model populated? It's complaining that >>> the CheckGroup doesn't have a model associated, not the Check, and indeed >>> it's not initialized with a model. Should it be? Which one? >>> -- >>> View this message in context: >>> http://www.nabble.com/Null-model-with-CheckGroup-tp17419490p17419490.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Null-model-with-CheckGroup-tp17419490p17427924.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Label visibility dependend on Model value
class mylabel extends label { protected boolean isvisible() { return !Strings.isEmpty(getModelObjectAsString()); } } -igor On Fri, May 23, 2008 at 8:13 AM, greeklinux <[EMAIL PROTECTED]> wrote: > > Hello, > > I want to display diffent values. For this purpose I am > using the Label component with a CompoundPropertyModel. > > I want to show user details on a profile page. > But not all user values are set. So I want to display only > values that are not empty strings. > > I was thinking about to extend the Label class and override > the isVisible() method. But I do not know how to get the value for > the Label that will be displayed. The Label gets his value with the > wicket id as property expression. > > ProfileModel gets an user id and loads a user obj. from DB. > > class user extends page { > ... >CompoundPropertyModel model = new CompoundPropertyModel(new > ProfileModel(userId)); >setModel(model); >Label firstName = new Label("firstName"); >add(firstName); > ... > } > > > Thanks > -- > View this message in context: > http://www.nabble.com/Label-visibility-dependend-on-Model-value-tp17427854p17427854.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Null model with CheckGroup
That's how the example at http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.CheckGroupPage shows it. I added an empty ArrayList as the model, and it works now. Should I send a message to the bugs list to update the examples page above? I did note that when you view the source of the example, it uses the empty ArrayList approach I'm using now. igor.vaynberg wrote: > > CheckGroup group = new CheckGroup("merchantCheckboxGroup", **model**); > > you are never setting the model you are passing in. > > -igor > > On Fri, May 23, 2008 at 12:09 AM, seanblaes <[EMAIL PROTECTED]> wrote: >> >> Hello all, I'm beating my head on the wall and not really sure what I'm >> doing >> wrong... :( >> >> I am attempting to use a CheckGroup to contain several choices - maybe >> it's >> even the wrong way to go about it. I followed the example on the Wicket >> webpage, but it's not working for me. >> >> Here's my HTML: >> >> > wicket:id="filterByMerchantCheckbox" value="1" onchange="var >> l=$('optional_filter_by_merchant'); if (this.checked){l.show()} else >> {l.hide()}"/> >> Merchant >> >> >> >>> name="filter_by_merchant_rich_clicks" >> id="filter_by_merchant_rich_clicks" wicket:id="merchantCheckboxComponent" >> /> >>> wicket:id="merchantCheckboxLabel">Rich Clicks >> >> >> >> >> >> And I have a method to populate this section: >> >> private CheckGroup createMerchantFilterMerchantsCheckboxes(Model model) { >>CheckGroup group = new CheckGroup("merchantCheckboxGroup"); >>ListView merchants = new ListView("merchants", >> MerchantOption.loadOptions()) { >>private static final long serialVersionUID = 1L; >> >>protected void populateItem(ListItem item) { >>item.add(new Check("merchantCheckboxComponent")); >>item.add(new Label("merchantCheckboxLabel", new >> PropertyModel(item.getModel(), "value"))); >>} >>}; >>group.add(merchants); >> >>return group; >> } >> >> >> When I call this method from my page class, it's pretty simple: >> >> ReportTypeOption def = new ReportTypeOption(); >> Model model = new Model(def); >> setModel(model); >> Form form = new Form("reportForm"); >> add(form); >> form.add(createMerchantFilterMerchantsCheckboxes(model)); >> >> >> But, every time I hit the page, it throws >> "org.apache.wicket.WicketRuntimeException: CheckGroup >> [0:reportForm:merchantCheckboxGroup] contains a null model object, must >> be >> an object of type java.util.Collection". >> >> From what I can tell, this code is exactly like what's on the demo page. >> Further, I've tried reading all the docs I can find and have even tried >> stepping through the code. But, I'm not getting anywhere. Does anybody >> have any ideas on how to get that model populated? It's complaining that >> the CheckGroup doesn't have a model associated, not the Check, and indeed >> it's not initialized with a model. Should it be? Which one? >> -- >> View this message in context: >> http://www.nabble.com/Null-model-with-CheckGroup-tp17419490p17419490.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Null-model-with-CheckGroup-tp17419490p17427924.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Background image that resizes with window?
dont really see what this has to do with wicket...sounds like you are after some javascript. -igor On Fri, May 23, 2008 at 6:51 AM, David Nedrow <[EMAIL PROTECTED]> wrote: > I'd like to use an SVG file for a background image on every page. I'd like > the image to fill 100% of the browser window and have it automatically > resize if/when the user changes the size of the client window. > > This clearly can't be done via CSS2 (maybe via CSS3?), so I'm looking for > anyone who has a programmatic solution doing it the "Wicket Way". BTW, I > don't have a problem using CSS3 if necessary, since this is for internal > users and I know exactly which browsers are available (IE7, FireFox 3RC1, > Safari 3). > > Here's a pretty good example of what I'm after > > http://whatstheweather.net/ > > The page is using jquery, but if I try to use an link in the page, it > pushes all of my other content below the image. > > Here's more information on what's being done on that page... > > http://css-tricks.com/how-to-resizeable-background-image/ > > Ideas, comments? > > -David > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wasp
hi i have my own authentication and authorization stuff ready and want to hook it into wicket. that´s what wasp is for, right ? ok, after reading a few pages and browsing trough the code, i THINK what i want then, is using WASP without that SWARM thingy. is there any tutorial/presentaation/code/experience in how to do that out there? basically, i think i´d have to start with implementing a WaspAuthorizationStrategy, right? cu uwe -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?
According to The PropertyModel javadoc refers to the PropertyResolver javadoc which says "This can can then be a bean property with get and set method. Or if a map is given as an object it will be lookup with the property as a key when there is not get method for that property." -- http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/util/lang/PropertyResolver.html given that it more or less works except when I'm trying to change the value, it's not the #1 suspect right now.. On Fri, May 23, 2008 at 10:33 AM, Thomas Mäder <[EMAIL PROTECTED]> wrote: > I would think so, too. > I was looking more closely at your code, and this seems fishy: > > new PropertyModel(mTargetModel.getManufacturersAsMap(), manufacturerName)) > > as I understand it, PropertyModel doesn't work with Maps, does it? It works > on Java Beans. > > Thomas > > > On Fri, May 23, 2008 at 3:16 PM, Kirk Israel <[EMAIL PROTECTED]> wrote: > >> the left/right moves ARE being done in the buttons onSubmit, I was >> hoping calling .setDefaultFormProcessing(false); when adding the >> button to the page would have prevented that? >> >> On Fri, May 23, 2008 at 4:50 AM, Thomas Mäder <[EMAIL PROTECTED]> >> wrote: >> > Do the move left/move right controls do a submit? If so you might also be >> > resubmitting the (old) check box value. >> > >> > Thomas >> > >> >> >> >> >> >> We have a list view that iterates over manufacturers, and each >> >> manufacturer has a "pallet control" of devices >> >> (two list boxes w/ move selection to right list, move selection to >> >> left list buttons between) along with a "all for manufacturer" >> >> checkbox >> >> >> >> >> > >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax ListView as Gmail
On Fri, May 23, 2008 at 2:20 AM, Davidoff <[EMAIL PROTECTED]> wrote: > > I'm creating a simple webmail application: i've created a listview where the > items are rows containing the number of the message, the subject and so > on... my target is to reproduce what Gmail does: clicking on the number of a > mail i wanto to read it's content, and clicking again i want to return to > the list (the content collapses).How can i do this? include a hidden webmarkupcontainer which you then replace with some other component that contains the mail content when the header is clicked. replace it back with a webmarkupcontianer to collapse. > Second question: i created a list like this > http://www.google.it/search?q=ajax+listview&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:it:official&client=firefox-a > but even if i send emails to the address in list, the listview will not > refresh(the messages are always the same). show us some code -igor > -- > View this message in context: > http://www.nabble.com/Ajax-ListView-as-Gmail-tp17421986p17421986.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Label visibility dependend on Model value
Hello, I want to display diffent values. For this purpose I am using the Label component with a CompoundPropertyModel. I want to show user details on a profile page. But not all user values are set. So I want to display only values that are not empty strings. I was thinking about to extend the Label class and override the isVisible() method. But I do not know how to get the value for the Label that will be displayed. The Label gets his value with the wicket id as property expression. ProfileModel gets an user id and loads a user obj. from DB. class user extends page { ... CompoundPropertyModel model = new CompoundPropertyModel(new ProfileModel(userId)); setModel(model); Label firstName = new Label("firstName"); add(firstName); ... } Thanks -- View this message in context: http://www.nabble.com/Label-visibility-dependend-on-Model-value-tp17427854p17427854.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?
I would think so, too. I was looking more closely at your code, and this seems fishy: new PropertyModel(mTargetModel.getManufacturersAsMap(), manufacturerName)) as I understand it, PropertyModel doesn't work with Maps, does it? It works on Java Beans. Thomas On Fri, May 23, 2008 at 3:16 PM, Kirk Israel <[EMAIL PROTECTED]> wrote: > the left/right moves ARE being done in the buttons onSubmit, I was > hoping calling .setDefaultFormProcessing(false); when adding the > button to the page would have prevented that? > > On Fri, May 23, 2008 at 4:50 AM, Thomas Mäder <[EMAIL PROTECTED]> > wrote: > > Do the move left/move right controls do a submit? If so you might also be > > resubmitting the (old) check box value. > > > > Thomas > > > >> > >> > >> We have a list view that iterates over manufacturers, and each > >> manufacturer has a "pallet control" of devices > >> (two list boxes w/ move selection to right list, move selection to > >> left list buttons between) along with a "all for manufacturer" > >> checkbox > >> > >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Possible BUG - discrepancy in component.onBeforeRender and IBehavior.beforeRender.
and what is a good name? :) On Fri, May 23, 2008 at 4:03 PM, Matej Knopp <[EMAIL PROTECTED]> wrote: > Hi, > > beforeRender on behavior has different semantics than onBeforeRender > on component. I agree that this is confusing and it i think it should > be improved in 1.4. > > beforeRender and afterRender can be used to render markup before > component and after component output. Currently there is no method in > IBehavior that is invoked when component's onBeforeRender is called. > > -Matej > > On Thu, May 22, 2008 at 5:43 PM, gumnaam23 <[EMAIL PROTECTED]> wrote: > > > > The following statement > > > > if (!component.isAuto() && getFlag(FLAG_RENDERING)) > > > > in Component-> checkHierarchyChange() > > > > returns false when a Behavior is added to the Component.onBeforeRender() > > phase, but returns true if > > a Behavior is added by another Behavior as part of it's beforeRender() > > phase. > > > > So > > new Component () { > > onBeforeRender() { > >add(some behavior); > > } > > > > Works. > > > > but > > new Component().add(new AbstractBehavior() { > > > > beforeRender(Component c) { > > c.addBehavior(some behavior); > > } > > > > } > > > > doesn't work, as the getFlag(FLAG_RENDERING) returns false in the first > case > > and true in the next case. > > So in the second case, I get an Exception. > > > > Is this an expected behavior or a possible bug ? > > > > > > > > > > -- > > View this message in context: > http://www.nabble.com/Possible-BUG---discrepancy-in-component.onBeforeRender-and-IBehavior.beforeRender.-tp17407123p17407123.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Possible BUG - discrepancy in component.onBeforeRender and IBehavior.beforeRender.
Hi, beforeRender on behavior has different semantics than onBeforeRender on component. I agree that this is confusing and it i think it should be improved in 1.4. beforeRender and afterRender can be used to render markup before component and after component output. Currently there is no method in IBehavior that is invoked when component's onBeforeRender is called. -Matej On Thu, May 22, 2008 at 5:43 PM, gumnaam23 <[EMAIL PROTECTED]> wrote: > > The following statement > > if (!component.isAuto() && getFlag(FLAG_RENDERING)) > > in Component-> checkHierarchyChange() > > returns false when a Behavior is added to the Component.onBeforeRender() > phase, but returns true if > a Behavior is added by another Behavior as part of it's beforeRender() > phase. > > So > new Component () { > onBeforeRender() { >add(some behavior); > } > > Works. > > but > new Component().add(new AbstractBehavior() { > > beforeRender(Component c) { > c.addBehavior(some behavior); > } > > } > > doesn't work, as the getFlag(FLAG_RENDERING) returns false in the first case > and true in the next case. > So in the second case, I get an Exception. > > Is this an expected behavior or a possible bug ? > > > > > -- > View this message in context: > http://www.nabble.com/Possible-BUG---discrepancy-in-component.onBeforeRender-and-IBehavior.beforeRender.-tp17407123p17407123.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Background image that resizes with window?
I'd like to use an SVG file for a background image on every page. I'd like the image to fill 100% of the browser window and have it automatically resize if/when the user changes the size of the client window. This clearly can't be done via CSS2 (maybe via CSS3?), so I'm looking for anyone who has a programmatic solution doing it the "Wicket Way". BTW, I don't have a problem using CSS3 if necessary, since this is for internal users and I know exactly which browsers are available (IE7, FireFox 3RC1, Safari 3). Here's a pretty good example of what I'm after http://whatstheweather.net/ The page is using jquery, but if I try to use an link in the page, it pushes all of my other content below the image. Here's more information on what's being done on that page... http://css-tricks.com/how-to-resizeable-background-image/ Ideas, comments? -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: packaging images/css in a jar?
I faced this exact problem (images in "src/main/resources/images"). This is what I chose to do (interested in cleaner way though): 1) In MyPage.java: URL noProgramImageURL = getClass().getClassLoader().getResource("images/transparentPixel.png"); File noProgramImageFile = new File(noProgramImageURL.toURI()); Image programImage = new Image("programImage", new FileResource(noProgramImageFile)); 2) The FileResource.java class is available at http://www.nabble.com/forum/ViewPost.jtp?post=17359927 mfs wrote: > > src/main/resources?..lets say if its a maven structure.. > > mfs wrote: >> >> Guys, >> >> Wondering as to where would i be packaging my images/css in case of a jar >> ? >> >> Farhan. >> > > -- View this message in context: http://www.nabble.com/packaging-images-css-in-a-jar--tp13652419p17425997.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can ..
hey, can you help me ?!!! 2008/5/23 Tomasz Prus <[EMAIL PROTECTED]>: > What strategy should i use to achive such url: > http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html ? > > 2008/5/23 Jonas <[EMAIL PROTECTED]>: > > Have you looked in the wiki? >> http://cwiki.apache.org/WICKET/reference-library.html >> This might be what you're looking for: >> http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html >> >> >> On Fri, May 23, 2008 at 9:46 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: >> > My boss wants such urls >> > >> > 2008/5/23 Tomasz Prus <[EMAIL PROTECTED]>: >> > >> >> Do You know SEO optimized urls like >> >> http://www.nabble.com/Page-reload-after-file-upload-td15869570.html ? >> >> >> >> 2008/5/23 Thomas Mäder <[EMAIL PROTECTED]>: >> >> >> >> What are you trying to achieve? Why do you need a text url instead of a >> >>> link >> >>> to a page? >> >>> >> >>> Thomas >> >>> >> >>> On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus <[EMAIL PROTECTED]> >> wrote: >> >>> >> >>> > How can i prepare url like this: ../London/9.html >> >>> > >> >>> > I need that city and advertNumber parameters be always at the end of >> >>> url. >> >>> > >> >>> > Can You help me? >> >>> > >> >>> > >> - >> >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> >>> > For additional commands, e-mail: [EMAIL PROTECTED] >> >>> > >> >>> > >> >>> >> >> >> >> >> > >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >
Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?
the left/right moves ARE being done in the buttons onSubmit, I was hoping calling .setDefaultFormProcessing(false); when adding the button to the page would have prevented that? On Fri, May 23, 2008 at 4:50 AM, Thomas Mäder <[EMAIL PROTECTED]> wrote: > Do the move left/move right controls do a submit? If so you might also be > resubmitting the (old) check box value. > > Thomas > >> >> >> We have a list view that iterates over manufacturers, and each >> manufacturer has a "pallet control" of devices >> (two list boxes w/ move selection to right list, move selection to >> left list buttons between) along with a "all for manufacturer" >> checkbox >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GMap2 problem with displaying in IE 6/7
On Wed, May 21, 2008 at 4:55 PM, Martin Funk <[EMAIL PROTECTED]> wrote: > Just to make shure, > do you still see a bug? > > Or are things fine now? > > mf We do not use current version of GMap2, but have older snapshot (we cannot change API right now), but as I see in sources that bug is now fixed. https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2/src/main/java/wicket/contrib/gmap/wicket-gmap.js Revision: 3784 Line: 125 -> comma on end of JS array, but in next revision simplified JS code fix this error, so probably in new snapshots this bug will not appear. Best regards, Adr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can ..
What strategy should i use to achive such url: http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html ? 2008/5/23 Jonas <[EMAIL PROTECTED]>: > Have you looked in the wiki? > http://cwiki.apache.org/WICKET/reference-library.html > This might be what you're looking for: > http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html > > > On Fri, May 23, 2008 at 9:46 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: > > My boss wants such urls > > > > 2008/5/23 Tomasz Prus <[EMAIL PROTECTED]>: > > > >> Do You know SEO optimized urls like > >> http://www.nabble.com/Page-reload-after-file-upload-td15869570.html ? > >> > >> 2008/5/23 Thomas Mäder <[EMAIL PROTECTED]>: > >> > >> What are you trying to achieve? Why do you need a text url instead of a > >>> link > >>> to a page? > >>> > >>> Thomas > >>> > >>> On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus <[EMAIL PROTECTED]> > wrote: > >>> > >>> > How can i prepare url like this: ../London/9.html > >>> > > >>> > I need that city and advertNumber parameters be always at the end of > >>> url. > >>> > > >>> > Can You help me? > >>> > > >>> > - > >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> > For additional commands, e-mail: [EMAIL PROTECTED] > >>> > > >>> > > >>> > >> > >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Data Access Design for Pagination
How long does the query take? How many copies of the DataProvider do you construct (check with the debugger)? Thomas On Thu, May 22, 2008 at 3:51 PM, wfroud <[EMAIL PROTECTED]> wrote: > > > > WicketMessage: After 1 minute the Pagemap null is still locked by: > Thread[http-8080-1,5,main], giving up trying to get the page for path: > 16:entries:topToolbars:1:toolbar:span:navigator:navigation:1:pageLink > >
Ajax ListView as Gmail
I'm creating a simple webmail application: i've created a listview where the items are rows containing the number of the message, the subject and so on... my target is to reproduce what Gmail does: clicking on the number of a mail i wanto to read its content, and clicking again i want to return to the list (the content collapses).How can i do this? Second question: i created a list like this http://www.google.it/search?q=ajax+listview&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:it:official&client=firefox-a but even if i send emails to the address in list, the listview will not refresh(the messages are always the same). -- View this message in context: http://www.nabble.com/Ajax-ListView-as-Gmail-tp17421986p17421986.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: missing something: getting AjaxCheckBox to recheck value from model as its redrawn?
Do the move left/move right controls do a submit? If so you might also be resubmitting the (old) check box value. Thomas > > > We have a list view that iterates over manufacturers, and each > manufacturer has a "pallet control" of devices > (two list boxes w/ move selection to right list, move selection to > left list buttons between) along with a "all for manufacturer" > checkbox > >
Re: how can ..
Have you looked in the wiki? http://cwiki.apache.org/WICKET/reference-library.html This might be what you're looking for: http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html On Fri, May 23, 2008 at 9:46 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: > My boss wants such urls > > 2008/5/23 Tomasz Prus <[EMAIL PROTECTED]>: > >> Do You know SEO optimized urls like >> http://www.nabble.com/Page-reload-after-file-upload-td15869570.html ? >> >> 2008/5/23 Thomas Mäder <[EMAIL PROTECTED]>: >> >> What are you trying to achieve? Why do you need a text url instead of a >>> link >>> to a page? >>> >>> Thomas >>> >>> On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: >>> >>> > How can i prepare url like this: ../London/9.html >>> > >>> > I need that city and advertNumber parameters be always at the end of >>> url. >>> > >>> > Can You help me? >>> > >>> > - >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] >>> > For additional commands, e-mail: [EMAIL PROTECTED] >>> > >>> > >>> >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can ..
My boss wants such urls 2008/5/23 Tomasz Prus <[EMAIL PROTECTED]>: > Do You know SEO optimized urls like > http://www.nabble.com/Page-reload-after-file-upload-td15869570.html ? > > 2008/5/23 Thomas Mäder <[EMAIL PROTECTED]>: > > What are you trying to achieve? Why do you need a text url instead of a >> link >> to a page? >> >> Thomas >> >> On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: >> >> > How can i prepare url like this: ../London/9.html >> > >> > I need that city and advertNumber parameters be always at the end of >> url. >> > >> > Can You help me? >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >
Re: how can ..
Do You know SEO optimized urls like http://www.nabble.com/Page-reload-after-file-upload-td15869570.html ? 2008/5/23 Thomas Mäder <[EMAIL PROTECTED]>: > What are you trying to achieve? Why do you need a text url instead of a > link > to a page? > > Thomas > > On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: > > > How can i prepare url like this: ../London/9.html > > > > I need that city and advertNumber parameters be always at the end of url. > > > > Can You help me? > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: how can ..
What are you trying to achieve? Why do you need a text url instead of a link to a page? Thomas On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus <[EMAIL PROTECTED]> wrote: > How can i prepare url like this: ../London/9.html > > I need that city and advertNumber parameters be always at the end of url. > > Can You help me? > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Null model with CheckGroup
CheckGroup group = new CheckGroup("merchantCheckboxGroup", **model**); you are never setting the model you are passing in. -igor On Fri, May 23, 2008 at 12:09 AM, seanblaes <[EMAIL PROTECTED]> wrote: > > Hello all, I'm beating my head on the wall and not really sure what I'm doing > wrong... :( > > I am attempting to use a CheckGroup to contain several choices - maybe it's > even the wrong way to go about it. I followed the example on the Wicket > webpage, but it's not working for me. > > Here's my HTML: > > wicket:id="filterByMerchantCheckbox" value="1" onchange="var > l=$('optional_filter_by_merchant'); if (this.checked){l.show()} else > {l.hide()}"/> > Merchant > > > > id="filter_by_merchant_rich_clicks" wicket:id="merchantCheckboxComponent" /> > wicket:id="merchantCheckboxLabel">Rich Clicks > > > > > > And I have a method to populate this section: > > private CheckGroup createMerchantFilterMerchantsCheckboxes(Model model) { >CheckGroup group = new CheckGroup("merchantCheckboxGroup"); >ListView merchants = new ListView("merchants", > MerchantOption.loadOptions()) { >private static final long serialVersionUID = 1L; > >protected void populateItem(ListItem item) { >item.add(new Check("merchantCheckboxComponent")); >item.add(new Label("merchantCheckboxLabel", new > PropertyModel(item.getModel(), "value"))); >} >}; >group.add(merchants); > >return group; > } > > > When I call this method from my page class, it's pretty simple: > > ReportTypeOption def = new ReportTypeOption(); > Model model = new Model(def); > setModel(model); > Form form = new Form("reportForm"); > add(form); > form.add(createMerchantFilterMerchantsCheckboxes(model)); > > > But, every time I hit the page, it throws > "org.apache.wicket.WicketRuntimeException: CheckGroup > [0:reportForm:merchantCheckboxGroup] contains a null model object, must be > an object of type java.util.Collection". > > From what I can tell, this code is exactly like what's on the demo page. > Further, I've tried reading all the docs I can find and have even tried > stepping through the code. But, I'm not getting anywhere. Does anybody > have any ideas on how to get that model populated? It's complaining that > the CheckGroup doesn't have a model associated, not the Check, and indeed > it's not initialized with a model. Should it be? Which one? > -- > View this message in context: > http://www.nabble.com/Null-model-with-CheckGroup-tp17419490p17419490.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Null model with CheckGroup
Hello all, I'm beating my head on the wall and not really sure what I'm doing wrong... :( I am attempting to use a CheckGroup to contain several choices - maybe it's even the wrong way to go about it. I followed the example on the Wicket webpage, but it's not working for me. Here's my HTML: Merchant Rich Clicks And I have a method to populate this section: private CheckGroup createMerchantFilterMerchantsCheckboxes(Model model) { CheckGroup group = new CheckGroup("merchantCheckboxGroup"); ListView merchants = new ListView("merchants", MerchantOption.loadOptions()) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem item) { item.add(new Check("merchantCheckboxComponent")); item.add(new Label("merchantCheckboxLabel", new PropertyModel(item.getModel(), "value"))); } }; group.add(merchants); return group; } When I call this method from my page class, it's pretty simple: ReportTypeOption def = new ReportTypeOption(); Model model = new Model(def); setModel(model); Form form = new Form("reportForm"); add(form); form.add(createMerchantFilterMerchantsCheckboxes(model)); But, every time I hit the page, it throws "org.apache.wicket.WicketRuntimeException: CheckGroup [0:reportForm:merchantCheckboxGroup] contains a null model object, must be an object of type java.util.Collection". >From what I can tell, this code is exactly like what's on the demo page. Further, I've tried reading all the docs I can find and have even tried stepping through the code. But, I'm not getting anywhere. Does anybody have any ideas on how to get that model populated? It's complaining that the CheckGroup doesn't have a model associated, not the Check, and indeed it's not initialized with a model. Should it be? Which one? -- View this message in context: http://www.nabble.com/Null-model-with-CheckGroup-tp17419490p17419490.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how can ..
How can i prepare url like this: ../London/9.html I need that city and advertNumber parameters be always at the end of url. Can You help me? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]