Re: Problem with Application getInitParameter()

2008-12-05 Thread Nav Che
Maybe you want to try this :


((WebRequest)getRequestCycle().getRequest()).getHttpServletRequest().getServerName()

//Naveen
On Fri, Dec 5, 2008 at 6:58 AM, Tauren Mills [EMAIL PROTECTED] wrote:

 Maybe I'm going nuts, but I can't figure out what is wrong.  It seems so
 simple, but it isn't working.  I call getInitParameter in my application
 twice.  One time it returns a value, the other it gets a null.  And the
 correct xml is there in web.xml.

 First, here is the pertinent application code (I've trimmed out unimportant
 stuff):

 public class DynamicApplication extends WicketeerBaseApplication {

private MerchantInfo merchantInfo;
private String siteBaseUrl;

public MerchantInfo getMerchantInfo() {
return merchantInfo;
}
public void setMerchantInfo(MerchantInfo merchantInfo) {
this.merchantInfo = merchantInfo;
}
public String getSiteBaseUrl() {
return siteBaseUrl;
}
public void setSiteBaseUrl(String siteBaseUrl) {
this.siteBaseUrl = siteBaseUrl;
}

@Override
protected void init() {
super.init();
this.siteBaseUrl = getInitParameter(site-base-url);
this.merchantInfo =

 GoogleOrderService.loadMerchantInfo(getServletContext(),getInitParameter(checkout-config-file));
}
 }

 Now here are the pertinent parts from web.xml:

!-- Base URL of the website.  Used in linkbacks from google checkout.
 --
context-param
param-namesite-base-url/param-name
param-valuehttp://localhost:8080//param-value
/context-param

!-- location of configuration file for google checkout with respect to
 context
 root. Using the default path here. --
context-param
param-namecheckout-config-file/param-name
param-value/WEB-INF/checkout-config.xml/param-value
/context-param

 So, when the application init() runs, merchantInfo gets properly populated
 with the correct MerchantInfo instance based on the contents of
 checkout-config.xml.  So the init param name and value were read correctly.

 But, then when I try to just get a simple string value for site-base-url, I
 get back a null.  I've looked for typos, tried retyping the web.xml
 section,
 swapping the order of getInitParam in init(), restarting... all sorts of
 stuff.  It just always gets null.

 Any possible thoughts on what might cause this?  Using wicket-1.3.3.
 Pulling my hair out.  Maybe its just late and I need to sleep.

 Is there a better way to get the server name so I don't even need to hard
 code it?  urlFor() only gives back the path, not the server.

 Thanks,
 Tauren



ListItemMultipleChoice : How to get the selected values on submit

2008-11-10 Thread Nav Che
Hello All,

I have 2 listmultiplechoice components with AvailableUsers  SelectedUsers.
I had written a javascript to move the items from one listbox to another. (
Similar to palette ). ...But then onSubmit() I am not getting the selected
list values to remove or add to the selectedusers list. Could someone please
let me know if they have implemented the palette way using 2
listmultiplechoice components.

Thanks.

Naveen
PS : I know this was asked earlier but then there were no proper suggestions


Re: How to pass parameters to a BreadCrumbPanel

2008-10-23 Thread Nav Che
Hello Wayne,

Thanks for your advise, i shall try it out... I was actually planning to
write my own breadcrumbs for pages instead of panels. Not sure how
successful i would be :)

Thanks again

//Naveen

On Thu, Oct 23, 2008 at 1:53 AM, Wayne Pope 
[EMAIL PROTECTED] wrote:

 Hi Naveen,

 I do it something like this:

TabbedPanel tabbedPanel = new TabbedPanel(tabs, tabs){
@Override
protected WebMarkupContainer newLink(String linkId, final int
 index) {
PageParameters parameters = new PageParameters();
parameters.put(selected, ((ITab) getTabs().get(index))
.getTitle().getObject());
parameters.put(somethingIneedID, somethingIneedID);
return new BookmarkablePageLink(linkId, MyPage.class,
parameters);
}

};
if (found)
tabbedPanel.setSelectedTab(selected);

if (tabSelect != null)
tabbedPanel.setSelectedTab(tabSelect);
add(tabbedPanel);

 you should be able to figue it out from there.
 Wayne


 On Tue, Oct 21, 2008 at 9:06 PM, Nav Che [EMAIL PROTECTED] wrote:

  Hello All,
 
  How do i pass parameters between panels. Basically i have panels in my
  appilcation which use breadcrumb model.
 
  Say on panel A i display list of users and I want the user Id to be a
 link
  upon clickin it should show the edit panel ( panel B )  of user and for
  which it shld either pass user object or userid.
 
  Please advise.
 
  Thanks in advance
 
  Regards
  naveen
 



Re: Pages or components... how do u decide?

2008-10-22 Thread Nav Che
Hello Ned,

I am using BreadCrumbPanels, and on a BreadCrumbLink, i wanted to pass a
parameter but looks like I cannot instantiate the custom constructor of the
panel in this case. Please advise. :(

//Naveen

On Tue, Oct 21, 2008 at 6:19 PM, Ned Collyer [EMAIL PROTECTED] wrote:


 Their constructor :)


 Nav Che wrote:
 
  Ned,
 
  But then how do u pass parameters across the panels???
 
  //nav
 
 --
 View this message in context:
 http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20100652.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 pass parameters to a BreadCrumbPanel

2008-10-21 Thread Nav Che
Hello All,

How do i pass parameters between panels. Basically i have panels in my
appilcation which use breadcrumb model.

Say on panel A i display list of users and I want the user Id to be a link
upon clickin it should show the edit panel ( panel B )  of user and for
which it shld either pass user object or userid.

Please advise.

Thanks in advance

Regards
naveen


Re: Pages or components... how do u decide?

2008-10-21 Thread Nav Che
Ned,

But then how do u pass parameters across the panels???

//nav

On Sun, Oct 19, 2008 at 5:55 PM, Ned Collyer [EMAIL PROTECTED] wrote:


 I use markup inheritance for some pages, but I try to avoid making new
 pages
 (after all, what do they give you that a panel does not (other than an
 URL)?)

 I do use markup inheritance for components A LOT!!



 jwcarman wrote:
 
  Are you using one page and just passing in your content component?
  Are you not using markup inheritance?
 
  On Thu, Oct 16, 2008 at 5:16 PM, Ned Collyer [EMAIL PROTECTED]
  wrote:
 
  The system I'm building at the moment has almost everything pushed down
  into
  components.  Most of the functionality is achieved by a single base page
  which takes a component in its constructor.
 
  For Bookmarkable pages, I extend this base page, and pass a component to
  the
  super.
 
  How do _you_ separate concerns?  Is there a best practice?
 
  A benefit of using a page is that it can be accessed with getPage()
  regardless of how deep in the hierarchy you are... so I guess it could
 be
  useful for storing the primary model for that section of the site.
 
  Anyway, I'm interested in hearing how others deal with Page vs
  Components,
  and how they structure their applications.
 
  So many ways of skinning a cat :)
 
  Rgds
 
  Ned
  --
  View this message in context:
 
 http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20016807.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/Pages-or-components...-how-do-u-decide--tp20016807p20060673.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: tomcat doesnt work with wicket

2008-10-17 Thread Nav Che
You need to initialize the logger, see if u r tomcat conf directory as any
log4j property fileI am running wicket on tomcat with eclipse and i dont
see any issues.

//Nav

On Fri, Oct 17, 2008 at 8:32 AM, overseastars [EMAIL PROTECTED] wrote:



 I dont know exactly the problem. But I went to the logs folder under tomcat
 home folder and find nothing there. no files.actually.  also according to
 the console on eclipse, I think it doesnt start the wicket development
 model
 at all.



 overseastars wrote:
 
 
  Hi all
 
  I have this strange problem now. If i use jetty, everything is find. But
  if I wanna run wicket application on tomcat in eclipse, it doesnt work.
  Any ideas to solve this? Do I need to do sth with tomcat??? I'm a
  newbie. So is the question..
 
 
 

 --
 View this message in context:
 http://www.nabble.com/tomcat-doesnt-work-with-wicket-tp20032073p20032357.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]