1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.tobago.example.demo;
21
22 import javax.enterprise.context.SessionScoped;
23 import javax.faces.context.FacesContext;
24 import javax.inject.Named;
25 import java.io.Serializable;
26
27 @SessionScoped
28 @Named
29 public class MetaController implements Serializable {
30
31 private boolean formatDetection = true;
32
33 public boolean isFormatDetection() {
34 return formatDetection;
35 }
36
37 public void setFormatDetection(final boolean formatDetection) {
38 this.formatDetection = formatDetection;
39 }
40
41 public boolean isRenderNoindex() {
42 final String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
43 return viewId.contains("content/35-deprecated") || viewId.contains("content/40-test");
44 }
45 }