On Wednesday 05 March 2014 08:54:44 Martin Grigorov wrote:

> >
> > BUT IT IS STILL STATIC, HOW I CAN MODIFY IT DINAMICALLY INTO THE JAVA CODE?
> > I am sorry but I am new in wicket and it results so difficult for me. In
> > PHP I can do it so quickly.
> >
> 
> New in Wicket: http://markmail.org/message/efxl7bgzfd3sy2ga
> For 3 years experience with Wicket you should have heart of Label component
> and models.
Yes, ok. But I use wicket for hobby, it is not my daily work.
I already use Label, but for write text into the page.
The Models in wicket is still a misterius for me, I read books, docs, but I 
still
not undenstand models, so I use it just as I see on docs, but I don't know how 
it works exatly.
If you can help me, I will appreciate a lot.

> The Hello World example shows how to use Label -
> http://wicket.apache.org/guide/guide/helloWorld.html#helloWorld_3
> Use a Label for each <meta> and use .setVisible(false) if any of them
> should be hidden when there is novalue for it.

I try to use Label with one item but it doesn't change meta tags, but simply 
write text on rendered webpage as first line.

html code:

...
<meta property="og:type" content="website static" />
<meta property="og:title" content="title" wicket:id="ogTitle" />
...

java code:
...
public class Facebook extends Panel implements Serializable
{       private static final long serialVersionUID = 1L;
        
public Facebook(String id, String query, String in)
{
super(id);      
add(new Label("ogTitle","Title for facebook"));
        } 
} 


And this is the soucecode of the rendered webpage:
...
<meta property="og:type" content="website static" />
<meta property="og:title" content="title" wicket:id="ogTitle">Title for 
facebook</meta>

<meta ...



If I remove content="title" it is almost the same:
...
<meta property="og:type" content="website static" />
<meta property="og:title" wicket:id="ogTitle">Title for facebook</meta>
<meta ...


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to