title: JSF - Set multiple values on @ManagedProperty in a single bean
body: <p>I need to set 2 different ManagedProperty on the same bean. So i tried :</p>
  
  <pre><code>@ManagedBean(name="selector")
  @RequestScoped
  public class Selector {
      @ManagedProperty(value="#{param.page}")
      @ManagedProperty(value="#{param.profile_page}")
      private String page;
      private String profile_page;
  
      public String getProfile_page() { 
          if(profile_page==null || profile_page.trim().isEmpty()) {
              this.profile_page="main";
          }
          return profile_page;
      }
      public void setProfile_page(String profile_page) { this.profile_page = profile_page; }
  
      public String getPage() {
          if(page==null || page.trim().isEmpty()) {
              this.page="homepage";
          }
          return page;
      }
      public void setPage(String page) { this.page=page; }
  }
  </code></pre>
  
  <p>but unfortunatly i can't write 2 different @ManagedProperty : it says duplicate annotations. How can I fix it?</p>
  
  <p>Another : when i return this value, its a String, and i need to confrontate. This syntax :</p>
  
  <pre><code>&lt;h:panelGroup rendered="#{selector.profile_page.compareTo("main")}"&gt;
      &lt;ui:include src="/profile/profile_main.xhtml" /&gt;
  &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>will work?</p>
  
  <p>Cheers</p>