List of usage examples for com.google.gwt.safehtml.shared SafeHtmlUtils htmlEscape
public static String htmlEscape(String s)
From source file:fr.amapj.view.views.appinstance.PopupSqlAppInstance.java
License:Open Source License
private void addAffichageRequest() { // Titre/*from w w w . j a v a 2 s . com*/ setStepTitle("vrifier les requetes SQL"); // computeRequest(); String str = "Il y a " + selected.verifiedRequests.size() + " requetes executer<br/><br/>" + "Voici la liste des requetes :<br/><br/>"; int index = 1; for (String s : selected.verifiedRequests) { str = str + "Requete " + index + "<br/>" + SafeHtmlUtils.htmlEscape(s) + "<br/><br/>"; index++; } addLabel(str, ContentMode.HTML); }
From source file:fr.amapj.view.views.appinstance.PopupSqlAppInstance.java
License:Open Source License
private String addDataBase(DataBaseResponseDTO dataBase) { String str = ""; if (selected.success) { str = str + "OK pour la base " + dataBase.dbName + " <br/><br/>"; } else {//from w ww .j a v a 2s . com str = str + "<h1>!!! ECHEC !!! pour la base " + dataBase.dbName + "</h1><br/><br/>"; } for (ResponseDTO responseDTO : dataBase.responses) { str = str + "Requete " + responseDTO.index + " : " + responseDTO.sqlRequest + "<br/>"; str = str + SafeHtmlUtils.htmlEscape(responseDTO.sqlResponse) + "<br/><br/>"; if (selected.sqlType == SqlType.REQUETE_SQL_STANDARD) { str = str + "<table>"; List<List<String>> lines = responseDTO.sqlResultSet; if (lines != null) { for (List<String> ls : lines) { str = str + " <tr>"; for (String string : ls) { if (string != null) { string = SafeHtmlUtils.htmlEscape(string); } str = str + "<td>" + string + "</td>"; } str = str + " </tr>"; } } str = str + " </table>"; str = str + "<br/><br/>"; } } return str; }
From source file:gov.wa.wsdot.apps.analytics.client.activities.twitter.view.search.SearchView.java
License:Open Source License
public void getSuggestions(String searchText) { String url = JSON_URL_SUGGESTION; String searchString = SafeHtmlUtils.htmlEscape(searchText.trim().replace("'", "")); // Append the name of the callback function to the JSON URL. url += searchString;//from w ww . j a v a2 s . co m url = URL.encode(url); JsonpRequestBuilder jsonp = new JsonpRequestBuilder(); // Set timeout for 30 seconds (30000 milliseconds) jsonp.setTimeout(30000); jsonp.requestObject(url, new AsyncCallback<Words>() { @Override public void onFailure(Throwable caught) { // Just fail silently here. } @Override public void onSuccess(Words words) { if (words.getWords() != null) { List<SearchObject> searchHints = new ArrayList<SearchObject>(); for (int i = 0; i < words.getWords().length(); i++) { SearchObject search = new SearchObject(); search.setKeyword(words.getWords().get(i)); searchHints.add(search); } updateSuggestions(searchHints); } } }); }
From source file:gov.wa.wsdot.mobile.client.activities.borderwait.BorderWaitCell.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { SafeHtml content = TEMPLATE.content(AppBundle.INSTANCE.css().cellImage(), getDisplayImage(model), AppBundle.INSTANCE.css().cellDetails2(), SafeHtmlUtils.htmlEscape(getDisplayString(model)), SafeHtmlUtils.htmlEscape(getDisplayLastUpdated(model)), getDisplayWaitTime(model)); safeHtmlBuilder.append(content);//from ww w .j a va2s . c o m }
From source file:gov.wa.wsdot.mobile.client.activities.camera.CameraCell.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { safeHtmlBuilder.append(TEMPLATE.content(AppBundle.INSTANCE.css().cameraImage(), AppBundle.INSTANCE.css().img(), SafeHtmlUtils.htmlEscape(getUrl(model)))); }
From source file:gov.wa.wsdot.mobile.client.activities.camera.VideoCell.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { safeHtmlBuilder.append(TEMPLATE.content(AppBundle.INSTANCE.css().cameraImage(), SafeHtmlUtils.htmlEscape(getUrl(model)), SafeHtmlUtils.htmlEscape(getVideoUrl(model)))); }
From source file:gov.wa.wsdot.mobile.client.activities.socialmedia.twitter.TwitterCell.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { SafeHtml content = TEMPLATE.content(AppBundle.INSTANCE.css().cameraImage(), AppBundle.INSTANCE.css().img(), SafeHtmlUtils.htmlEscape(getMediaUrl(model)), AppBundle.INSTANCE.css().cellImage(), getDisplayImage(model), AppBundle.INSTANCE.css().cellDetails(), SafeHtmlUtils.htmlEscape(getDisplayString(model)), SafeHtmlUtils.fromTrustedString(getDisplayDescription(model)), SafeHtmlUtils.htmlEscape(getDisplayLastUpdated(model))); SafeHtml contentNoCameraImage = TEMPLATE.content(AppBundle.INSTANCE.css().cameraImageHidden(), AppBundle.INSTANCE.css().img(), SafeHtmlUtils.htmlEscape(getMediaUrl(model)), AppBundle.INSTANCE.css().cellImage(), getDisplayImage(model), AppBundle.INSTANCE.css().cellDetails(), SafeHtmlUtils.htmlEscape(getDisplayString(model)), SafeHtmlUtils.fromTrustedString(getDisplayDescription(model)), SafeHtmlUtils.htmlEscape(getDisplayLastUpdated(model))); if (getMediaUrl(model) != "") { safeHtmlBuilder.append(content); } else {// w ww .j av a 2 s.co m safeHtmlBuilder.append(contentNoCameraImage); } }
From source file:gov.wa.wsdot.mobile.client.activities.trafficmap.menu.traveltimes.TravelTimesCell.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { SafeHtml content = TEMPLATE.content(AppBundle.INSTANCE.css().cellTravelTimes(), SafeHtmlUtils.htmlEscape(getDisplayTitle(model)), SafeHtmlUtils.htmlEscape(getDisplayDistanceAverageTime(model)), SafeHtmlUtils.htmlEscape(getDisplayLastUpdated(model)), SafeHtmlUtils.htmlEscape(getDisplayCurrentTimeColor(model)), SafeHtmlUtils.htmlEscape(getDisplayCurrentTime(model))); safeHtmlBuilder.append(content);//from ww w . j a v a 2 s .c om }
From source file:gov.wa.wsdot.mobile.client.widget.CellDetailsWithIcon.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { SafeHtml content = TEMPLATE.content(AppBundle.INSTANCE.css().cellImage(), getDisplayImage(model), AppBundle.INSTANCE.css().cellDetails(), SafeHtmlUtils.htmlEscape(getDisplayString(model)), SafeHtmlUtils.htmlEscape(getDisplayDescription(model)), SafeHtmlUtils.htmlEscape(getDisplayLastUpdated(model))); safeHtmlBuilder.append(content);/*from www . ja v a 2 s . c om*/ }
From source file:gov.wa.wsdot.mobile.client.widget.CellDetailsWithPhoto.java
License:Open Source License
@Override public void render(SafeHtmlBuilder safeHtmlBuilder, final T model) { SafeHtml content = TEMPLATE.content(AppBundle.INSTANCE.css().cellImage(), getDisplayImage(model), AppBundle.INSTANCE.css().cellDetails(), SafeHtmlUtils.htmlEscape(getDisplayString(model)), SafeHtmlUtils.htmlEscape(getDisplayDescription(model)), SafeHtmlUtils.htmlEscape(getDisplayLastUpdated(model))); safeHtmlBuilder.append(content);// w w w .jav a2 s . c o m }