Monday, December 31, 2012

Re: how to add meta tag in the header's page [with uibinder ?]

Here is an example for setting the description meta element

public static void setMetaDescription(String description){

NodeList<Element> nodes = Document.get().getElementsByTagName("meta");

for( int i = 0; i < nodes.getLength(); i++ ){

MetaElement meta = (MetaElement)nodes.getItem(i);

if( "description".equals(meta.getName()) ){

meta.setContent(description);

break;

}

}

}

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gH8DbwD85tcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment