Thank you for your help! But the major problem is The Label Is Not at the same level as the form , the Label is deep inside those table tags. Is there any solution to this kind of problem. Thanks again~ Kevin Liu <[EMAIL PROTECTED]> wrote: I have a html page that displays "welcome ,XXX" ,or something like that, the "XXX" is the current user name, and I use Label to display it. But there is an exception when it runs.
Unable to find component with id 'userName' in [MarkupContainer [Component id = _relative_path_prefix_14, page = com.cmip.web.pages.TopFrame, path = 3:topForm:_relative_path_prefix_13:_relative_path_prefix_14.WebMarkupContainer, isVisible = true, isVersioned = true]]. This means that you declared wicket:id=userName in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match. The code: public TopFrame(){ super(); String name = ((CMIPSession)this.getSession()).getUser().getUserName(); Label userName = new Label("userName",new Model(name)); Form topForm = new Form("topForm"); topForm.add(userName); this.add(topForm); html: °æ±¾ºÅ£ºV1.0 ¡¡ Welcome updateTime(); -Kevin Liu --------------------------------- Pinpoint customers who are looking for what you sell. -Kevin Liu --------------------------------- Pinpoint customers who are looking for what you sell.