Re: How to handle these nested table tags

2007-09-10 Thread Roland Huss

Hi,

 td width=284 align=center class=welcomeBox
 ¡¡  Welcome label wicket:id=userName/label

Could it be, that label is not supported as markup for a Label component
and that you should use something like  instead ?

... roland

-- 
View this message in context: 
http://www.nabble.com/How-to-handle-these-nested-%3Ctable%3E-tags-tf4412208.html#a12587601
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 handle these nested table tags

2007-09-10 Thread Kevin Liu
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. 

Re: How to handle these nested table tags

2007-09-10 Thread Ryan Holmes
No, LABEL is a valid HTML element for a Label component (it would be  
pretty twisted if it wasn't ;)). Besides, if a tag check was failing,  
the error message would say so.


But keep the guesses coming. That's all I've been able to for Kevin  
so far...


-Ryan

On Sep 10, 2007, at 12:00 AM, Roland Huss wrote:



Hi,


td width=284 align=center class=welcomeBox
¡¡  Welcome label wicket:id=userName/label


Could it be, that label is not supported as markup for a Label  
component

and that you should use something like  instead ?

... roland

--
View this message in context: http://www.nabble.com/How-to-handle- 
these-nested-%3Ctable%3E-tags-tf4412208.html#a12587601

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: How to handle these nested table tags

2007-09-10 Thread Igor Vaynberg
this is already fixed in trunk

-igor


On 9/10/07, Kent Tong [EMAIL PROTECTED] wrote:



 Kevin Liu-4 wrote:
 
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.
 

 Please file a bug report at http://issues.apache.org/jira/browse/WICKET.
 The
 bug is,
 RelativePathPrefixHandler creates auto-components but are not marking them
 as
 transparent resolver:

 public boolean resolve(MarkupContainer container, MarkupStream
 markupStream, ComponentTag tag)
 {
 if (WICKET_RELATIVE_PATH_PREFIX_CONTAINER_ID.equals(
 tag.getId()))
 {
 final Component wc;
 String id =
 WICKET_RELATIVE_PATH_PREFIX_CONTAINER_ID +
 container.getPage
 ().getAutoIndex();
 if (tag.isOpenClose())
 {
 wc = new WebComponent(id);
 }
 else
 {
 //problem:
 wc = new WebMarkupContainer(id);
 //I think it should be:
 //wc = new
 TransparentWebMarkupContainer(id);
 }
 container.autoAdd(wc, markupStream);
 return true;
 }
 return false;
 }


 --
 View this message in context:
 http://www.nabble.com/How-to-handle-these-nested-%3Ctable%3E-tags-tf4412208.html#a12595047
 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 handle these nested table tags

2007-09-09 Thread Ryan Holmes
hmmm... the hierarchies seem to match. The only weird things I see  
are that your img tags are unclosed (Wicket may require valid xml  
templates -- I'm not sure because I always use xhtml) and your call  
to add the topForm component uses an explicit this reference. I  
can't remember if this with a method call does nothing or if it can  
actually interfere with dynamic binding. Either way, you don't want  
to do it. Just call add(topForm).


If neither of those suggestions work (and I kind of doubt they will),  
think about whether your page's superclass might be causing the  
problem. For instance, a weird markup inheritance scenario could  
conceivably cause this.


-Ryan

On Sep 9, 2007, at 9:58 PM, Kevin Liu 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.WebMarkupC 
ontainer, 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:

  body style=padding: 0px 0px 0px 0px;margin: 0px 0px 0px 0px;
  form wicket:id=topForm
  table width=100% border=0 cellspacing=0 cellpadding=0
  tr
td width=485img src=images/logo_top.gif width=485  
height=85/td

td background=images/bg_top.gifnbsp;/td
td width=260 align=right background=images/bg_top.gif
table width=242 height=80 border=0 cellpadding=5  
cellspacing=0

tr valign=top
td colspan=2 align=right class=whiteText°æ±¾ºÅ£ºV1.0/td
/tr
tr align=center
td height=37a href=Main.html  
target=mainframeimg src=images/button_desktop.gif width=112  
height=27 border=0 alt=·µ»ØÖ÷Ò³  
onClick=javascript:self.location='Top.html'/a/td
  tda href=../public/Logout.html  
target=mainframeimg src=images/button_logout.gif width=112  
height=27 border=0/a/td

/tr
  /table
/td
  /tr
/table

table width=100% border=0 cellpadding=0 cellspacing=0
  tr
td width=485 height=1img src=images/spacer.gif  
width=1 height=1/td

  /tr
  tr bgcolor=#38E089
td height=4img src=images/spacer.gif width=4  
height=4/td

  /tr
  tr
td height=1img src=images/spacer.gif width=1  
height=1/td

  /tr
  tr background=images/bg_3D_bar.gif
td height=28 background=images/bg_3D_bar.giftable  
width=100% border=0 cellspacing=0 cellpadding=0

tr
  td width=140 align=center class=whiteTextspan  
id=serverTime /span/td
  td width=2img src=images/pic_shr.gif width=2  
height=23/td
  tdtable width=316 border=0 cellspacing=0  
cellpadding=1

  tr
td width=28nbsp;/td
td width=284 align=center class=welcomeBox
¡¡  Welcome label wicket:id=userName/label
/td
  /tr
/table/td
/tr
  /table/td
  /tr
/table
 script language=javascript
   updateTime();
/script
/form
/body


-Kevin Liu

-
Pinpoint customers who are looking for what you sell.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]