Re: wicket xml - add label as xml element atribute

2008-05-16 Thread Milan Křápek
Yeah, thanks a lot that was the thing I was searching for. But there is one 
more problem. 
When I do that this way, I get on the output something like:

loc myAttritbute=attributeValue wicket:id=thisComponent/

Is there any way to remove wicket:id attribute from the output code?

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



Re: wicket xml - add label as xml element atribute

2008-05-16 Thread Martijn Dashorst
http://www.google.com/search?q=remove+wicket+attribute+markup

On 5/16/08, Milan Křápek [EMAIL PROTECTED] wrote:
 Yeah, thanks a lot that was the thing I was searching for. But there is one 
 more problem.
  When I do that this way, I get on the output something like:

  loc myAttritbute=attributeValue wicket:id=thisComponent/

  Is there any way to remove wicket:id attribute from the output code?


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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3


wicket xml - add label as xml element atribute

2008-05-15 Thread Milan Křápek
Hi, 
 I want to generate XML document using wicket but I have this problem.

I want to generate something like

root
  var name=a1/
  var name=a2/
  var name=a3/
 
  otherStructure/
/root

I decided to generate the var elements by ListView. This has some problem, 
because after rendering I have in my XML document 
some span wicket:id=...  elements that I cannot have there.

After some investigation and removing wicket dependent markups by 
  getMarkupSettings().setStripWicketTags(true); and setRenderBodyOnly(true);

 I get this XML code:

?xml version=1.0 encoding=UTF-8?
root
  wicket:container wicket:id=vars
span wicket:id=var/
  /wicket:container
/root

where vars is my ListView that add Label var that contains string s = var 
name=\ + String varName + \ /.
I thought this should work, but wicket encode '' and '' as lt; gt; that is 
not valid XML.

All I need is to say wicket to do not encode this characters. Any Idea??

The second idea I have was to do something like :

?xml version=1.0 encoding=UTF-8?
root
  wicket:container wicket:id=vars
var wicket:message=name:myLabel/
  /wicket:container
/root

But it has some problem too. I know how to give to wicket:message attribute 
some value from my properties file, but is there any way to add there a Label??

Thanks for any halp. I did not say that there cannot be any other way how to do 
it, but I have not found it.

Please help. This is very urgent and blokable for me. If I did not find the way 
how to do it I will have to look up for some another presentation layer. That 
will be very bad, because except this I found Wicket great.

Sorry for my English.

Milan


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



Re: wicket xml - add label as xml element atribute

2008-05-15 Thread Michael Sparer

I generated my sitemap xml files using wicket, the xml is something like:

?xml version=1.0 encoding=UTF-8?
urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9;
   url wicket:id=urlList
  loc wicket:id=locNodehttp://www.example.com//loc
  lastmod wicket:id=lastmodNode2005-01-01/lastmod
  changefreq wicket:id=changefreqNodemonthly/changefreq
  priority wicket:id=priorityNode0.8/priority
   /url
/urlset 

be sure to name the markup file .xml and to override 

@Override
public String getMarkupType() {
return xml;
}

in your page ... that should work

Milan Křápek wrote:
 
 Hi, 
  I want to generate XML document using wicket but I have this problem.
 
 I want to generate something like
 
 root
   var name=a1/
   var name=a2/
   var name=a3/
  
   otherStructure/
 /root
 
 I decided to generate the var elements by ListView. This has some
 problem, because after rendering I have in my XML document 
 some   elements that I cannot have there.
 
 After some investigation and removing wicket dependent markups by 
   getMarkupSettings().setStripWicketTags(true); and
 setRenderBodyOnly(true);
 
  I get this XML code:
 
 ?xml version=1.0 encoding=UTF-8?
 root
   wicket:container wicket:id=vars
 
   /wicket:container
 /root
 
 where vars is my ListView that add Label var that contains string s =
 var name=\ + String varName + \ /.
 I thought this should work, but wicket encode '' and '' as lt; gt;
 that is not valid XML.
 
 All I need is to say wicket to do not encode this characters. Any Idea??
 
 The second idea I have was to do something like :
 
 ?xml version=1.0 encoding=UTF-8?
 root
   wicket:container wicket:id=vars
 var wicket:message=name:myLabel/
   /wicket:container
 /root
 
 But it has some problem too. I know how to give to wicket:message
 attribute some value from my properties file, but is there any way to add
 there a Label??
 
 Thanks for any halp. I did not say that there cannot be any other way how
 to do it, but I have not found it.
 
 Please help. This is very urgent and blokable for me. If I did not find
 the way how to do it I will have to look up for some another presentation
 layer. That will be very bad, because except this I found Wicket great.
 
 Sorry for my English.
 
 Milan
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/wicket-xml---add-label-as-xml-element-atribute-tp17253179p17253615.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: wicket xml - add label as xml element atribute

2008-05-15 Thread Milan Křápek
Thanks, 
  the XML code is fine, but I need to know how to do it in the .java file. It 
seems you just use Labels that fill the value of each node. But my problem is 
little bit different. What I want is to be able do set there some attribute.

You have in your XML code:

loc wicket:id=locNodemy.location.com/loc

but I need 

loc url=my.location.com/

And this I have givven by DTD so I cannot have there any wicket:id. And I need 
to pass the value to attribute and not as text value in the loc element. 

So I think I cannot use your method :o(

Best regards

Milan

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



Re: wicket xml - add label as xml element atribute

2008-05-15 Thread Maurice Marrink
You can use
 setEscapeModelStrings(false) to not escape special characters.
 attributemodifiers to add attributes to tags or use onComponentTag for this

Maurice

On Thu, May 15, 2008 at 4:05 PM, Milan Křápek [EMAIL PROTECTED] wrote:
 Thanks,
  the XML code is fine, but I need to know how to do it in the .java file. It 
 seems you just use Labels that fill the value of each node. But my problem is 
 little bit different. What I want is to be able do set there some attribute.

 You have in your XML code:

 loc wicket:id=locNodemy.location.com/loc

 but I need

 loc url=my.location.com/

 And this I have givven by DTD so I cannot have there any wicket:id. And I 
 need to pass the value to attribute and not as text value in the loc 
 element.

 So I think I cannot use your method :o(

 Best regards

 Milan

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




Re: wicket xml - add label as xml element atribute

2008-05-15 Thread Michael Sparer

i see, try the following:

WebComponent comp = new WebComponent(locNode);
comp.add(new AttributeModifier(url, true, new Model(mylocation.com));
add(comp);

with the markup eg. loc wicket:id=url / 

that should work

Milan Křápek wrote:
 
 Thanks, 
   the XML code is fine, but I need to know how to do it in the .java file.
 It seems you just use Labels that fill the value of each node. But my
 problem is little bit different. What I want is to be able do set there
 some attribute.
 
 You have in your XML code:
 
 loc wicket:id=locNodemy.location.com/loc
 
 but I need 
 
 loc url=my.location.com/
 
 And this I have givven by DTD so I cannot have there any wicket:id. And I
 need to pass the value to attribute and not as text value in the loc
 element. 
 
 So I think I cannot use your method :o(
 
 Best regards
 
 Milan
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/wicket-xml---add-label-as-xml-element-atribute-tp17253179p17254329.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]