Re: Customizing palette
Thanks. I will do that. I was just looking for an easier way to customize the presentation. I did find out though that you can override the style sheet palette.css pretty easily, although this does not allow you to replace the images -- View this message in context: http://www.nabble.com/Customizing-palette-tp18817932p18831058.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: Customizing palette
Thanks, everyone. I did manage to replace the images by subclassing Palette and overriding newAddComponent() and newRemoveComponent(). Strange I could not do the same for the CSS file, so I created my own palette.css and added that in my html. Igor - how do I add an RFE? -- View this message in context: http://www.nabble.com/Customizing-palette-tp18817932p18838793.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: Palette header
This code does not override the list headers. I'm using 1.3.4 - what am I doing wrong? public class MyPalette extends Palette { private static final long serialVersionUID = 1L; public MyPalette(String wicketId, Model toEntriesModel, Model fromEntriesModel, ChoiceRenderer choiceRenderer, int maxRows, boolean allowOrder) { super(wicketId, toEntriesModel, fromEntriesModel, choiceRenderer, maxRows, allowOrder); this.newAvailableHeader(Available for Assigning); this.newSelectedHeader(Assigned to User); } } Thanks. -- View this message in context: http://www.nabble.com/Palette-header-tp12673870p18817811.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: Prepopulating palette
Hi, did you find a solution to this?I have the same issue. -- View this message in context: http://www.nabble.com/Prepopulating-palette-tp18656359p18817837.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]
Customizing palette
Can I customize palette to use a different set of images for the arrows? how about the layout of the headers? Can I attach a javascript to the images to do other things (for example, show more info about the selected item)? -- View this message in context: http://www.nabble.com/Customizing-palette-tp18817932p18817932.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Prepopulating palette
Hi, The solution is to add the selected profile to the available list See this thread: http://www.nabble.com/Palette-header-td12673870.html#a18817811 -- View this message in context: http://www.nabble.com/Prepopulating-palette-tp18656359p18818301.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: Customizing palette
Can you be a bit more specific, eg. how would you replace the button images? -- View this message in context: http://www.nabble.com/Customizing-palette-tp18817932p18820997.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]
Refreshing a listview using AJAX
I have a listview consisting of user info in a HTML table that I want to refresh when the user picks a value from a dropdownlist of department codes. Below is the pseudocode, cobbled together from various postings on the net. The code runs the first time; however, subsequent requests do not refresh the listview. What am I doing wrong? Appreciate any help. Java code: Form f = new Form(bgForm, new CompoundPropertyModel(this)); List String depts = new ArrayListString (); depts.add(A); depts.add(B); depts.add(C); model = new Model(); DropDownChoice dd = new DropDownChoice(bgIds, model, depts); sectionDropDown.setRequired(true); f.add(dd); f.add(new AjaxButton(submitBG, f) { protected void onSubmit(AjaxRequestTarget target, Form form) { userlist = (ArrayList) DB.getUsers(B); target.addComponent(bgUsers); }); add(f); users = new WebMarkupContainer(bgUsers); users.setOutputMarkupId(true); users.setOutputMarkupPlaceholderTag(true); add(users); userlist = (ArrayList) DB.getUsers(A); ListView userEntries = new ListView(userEntries, userlist) { protected void populateItem(ListItem item) { item.setModel(new CompoundPropertyModel(item.getModelObject())); item.add(new Label(last)); item.add(new Label(first)); item.add(new Label(email)); item.add(new Label(status)); } }; users.add(userEntries); HTML: form wicket:id=bgForm id=bgsub name=bgsub method=post action= div label for=busgroups class=label id=bglabelUsers for Business Group/label select wicket:id=bgIds name=busgroups id=busgroups option value=1A/option option value=2B/option /select input wicket:id=submitBG type=submit value=GO /div /form div wicket:id=bgUsers div id=bgusers table summary=List of users for the selected business group tr th scope=colLast Name/th th scope=colFirst Name/th th scope=colEmail/th th scope=colStatus/th /tr tr wicket:id=userEntries td wicket:id=lastAllen /td td wicket:id=firstStephen/td td wicket:id=email[EMAIL PROTECTED]/td td wicket:id=statusActive/td /tr /table /div /div -- View this message in context: http://www.nabble.com/Refreshing-a-listview-using-AJAX-tp18720967p18720967.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: Refreshing a listview using AJAX
Worked!!! Can you explain how putting the model name in quotes does the trick? mypage extends page{ private string dept; public mypage() { add(new dropdownchoice(id, new propertymodel(this, dept)); add(new listview(list, new propertymodel(this, users)); } public listuser getusers() { db.queryusers(dept); } } } -igor -- View this message in context: http://www.nabble.com/Refreshing-a-listview-using-AJAX-tp18720967p18722241.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: Refreshing a listview using AJAX
Only problem here is that I populate the dropdown like so: List depts = new ArrayListString (); depts.add(A); depts.add(B); How do I get this list into the dropdown using the suggested code below? mypage extends page{ private string dept; public mypage() { add(new dropdownchoice(id, new propertymodel(this, dept)); add(new listview(list, new propertymodel(this, users)); } public listuser getusers() { db.queryusers(dept); } } } -igor -- View this message in context: http://www.nabble.com/Refreshing-a-listview-using-AJAX-tp18720967p18723061.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: Another question on client IP address and HttpRequest
Thanks, this works. It's actually in getClientInfo().getProperties().getRemoteAddress(); -- View this message in context: http://www.nabble.com/Another-question-on-client-IP-address-and-HttpRequest-tp18642444p18653387.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]
Another question on client IP address and HttpRequest
I know that the client IP address can be obtained from the raw HttpRequest, but only if you are in a WebPage, but is there a way to get to it from the session? Reason I'm asking is upon the creation of a user session, I'd like to be able to get the IP address of the user and log it for audit purposes. -- View this message in context: http://www.nabble.com/Another-question-on-client-IP-address-and-HttpRequest-tp18642444p18642444.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 to build a dynamic navigation bar
Hello, I want to be able to build a left-side dynamic navigation bar based on user permissions. For example, if the user does not have access to the Prices page, I do not want to show the Prices link on the navigation bar. Also, since the link will point to a Wicket page, it has to be a Wicket link. This is how I would like the NavBar to appear: div id=mainNav ul li Home /li li Prices /li li Contracts /li li Products /li li Transactions /li /ul /div I tried using ListView, but I could not get it to work, as it forces the wicket id of the line items to be all the same. Thanks in advance. -- View this message in context: http://www.nabble.com/How-to-build-a-dynamic-navigation-bar-tp18592899p18592899.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 to build a dynamic navigation bar
Thanks for the quick reply. Wouldn't this force all links to have the same wicket ids (linkid)? I'd like to be able to have the line items look like this: ul wicket:id=list li # Link01 text here /li li # Link02 text here /li li # Link03 text here /li /ul Alexander Landsnes Keül wrote: I'd use a ListView :) Assuming this lil code add( new ListView(list, linkList ) { public void populateItem(ListItem item) { item.add( (Link)linkList ); } }); You'd have the html look something like this ul wicket:id=list li # Link text here /li /ul Just remember to add whatever you want to the item, and not just use add(...). http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/list/ListView.html Alex -Opprinnelig melding- Fra: Edbay [mailto:[EMAIL PROTECTED] Sendt: 22. juli 2008 18:08 Til: users@wicket.apache.org Emne: How to build a dynamic navigation bar Hello, I want to be able to build a left-side dynamic navigation bar based on user permissions. For example, if the user does not have access to the Prices page, I do not want to show the Prices link on the navigation bar. Also, since the link will point to a Wicket page, it has to be a Wicket link. This is how I would like the NavBar to appear: div id=mainNav ul li Home /li li Prices /li li Contracts /li li Products /li li Transactions /li /ul /div I tried using ListView, but I could not get it to work, as it forces the wicket id of the line items to be all the same. Thanks in advance. -- View this message in context: http://www.nabble.com/How-to-build-a-dynamic-navigation-bar-tp18592899p18592899.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/How-to-build-a-dynamic-navigation-bar-tp18592899p18593941.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 to build a dynamic navigation bar
I get this approach. Can you provide the code for the panel? ul !-- note: the tag here is only for preview, it will be replaced by the link panel contents -- li wicket:id=menuItem # Foo /li /ul RepeatingView menu = new RepeatingView(menuItem); menu.add(new MyMenuPanel(menu.newChildId(), Home, HomePage.class)); if (userIsDarthVader) { menu.add(new MyMenuPanel(menu.newChildId(), Enslave Universe, EnslaveUniversePage.class)); } -- View this message in context: http://www.nabble.com/How-to-build-a-dynamic-navigation-bar-tp18592899p18598120.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 to build a dynamic navigation bar
Works! :clap: wicket:panel Foo /wicket:panel public class MyMenuPanel extends Panel { public MyMenuPanel(String id, String label, Class pageClass) { super(id); Link link = new BookmarkablePageLink(link, pageClass); add(link); link.add(new Label(label, label)); } } -- View this message in context: http://www.nabble.com/How-to-build-a-dynamic-navigation-bar-tp18592899p18598822.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]