title: Facing error while getting values from URL (javax.el.PropertyNotWritableException:)
body: <p>i have a page on which i am using h:link like</p>
  
  <pre><code>&lt;h:link outcome="countryPages_View.xhtml"&gt;
      &lt;img src="images/afghanistan.png" style="border: none;"/&gt;
      &lt;f:param name="SaarcCountryId" value="11" /&gt;
      &lt;f:param name="once" value="true" /&gt;
      &lt;f:param name="fromPage" value="homePage" /&gt;
  &lt;/h:link&gt;
  
  &lt;h:link outcome="countryPages_View.xhtml"&gt;
      &lt;h:graphicImage  url="images/bangladesh.png" style="margin-left:10px;border: none" /&gt;
      &lt;f:param name="SaarcCountryId" value="5" /&gt;
      &lt;f:param name="once" value="true" /&gt;
      &lt;f:param name="fromPage" value="homePage" /&gt;
  &lt;/h:link&gt;
  </code></pre>
  
  <p>When i click on the image, then url becomes ok. URL becomes like this</p>
  
  <pre><code>http://localhost:8080/WIT/faces/countryPages_View.xhtml?SaarcCountryId=1&amp;once=true&amp;fromPage=homePage
  </code></pre>
  
  <p>Then on my page i am getting values like this</p>
  
  <pre><code>&lt;ui:composition template="./WEB-INF/templates/layout.xhtml"&gt;
      &lt;ui:define name="title"&gt;SAARC Country View&lt;/ui:define&gt;
      &lt;ui:define name="content"&gt;
          &lt;f:metadata&gt;
              &lt;f:viewParam name="SaarcCountryId" value="#{countryPages_Setup.cntryid}" /&gt;
              &lt;f:viewParam name="once" value="#{countryPages_Setup.onse}" /&gt;
              &lt;f:viewParam name="fromPage" value="#{countryPages_Setup.page}}" /&gt;
              &lt;f:event type="preRenderView" listener="#{countryPages_Setup.beforeRenderPage}" /&gt;
          &lt;/f:metadata&gt;
          &lt;h:form id="countryPages" prependId="false"&gt;
              ....
          &lt;/h:form&gt;
  
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>My bean is like this</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class CountryPages_Setup implements Serializable {
      private String cntryid;
      private String page;
      private String onse;
  
      public void beforeRenderPage(ComponentSystemEvent event) {
          System.out.println(page);
          System.out.println(onse);
          System.out.println(cntryid);        
      } //end of beforeRenderPage()
  
      //Constructor
      public CountryPages_Setup() {
  
      } //end of constructor
  
      // getter and setter
      public String getCntryid() {
          return cntryid;
      }
      public void setCntryid(String cntryid) {
          this.cntryid = cntryid;
      }
      public String getOnse() {
          return onse;
      }
      public void setOnse(String onse) {
          this.onse = onse;
      }
      ...
  } //end of class CountryPages_Setup
  </code></pre>
  
  <p>When my page loads i am getting errors.</p>
  
  <pre><code>exception
  javax.servlet.ServletException: javax.el.PropertyNotWritableException: /countryPages_View.xhtml @20,88 value="#{countryPages_Setup.page}}": Illegal Syntax for Set Operation
  
  root cause
  javax.faces.component.UpdateModelException: javax.el.PropertyNotWritableException: /countryPages_View.xhtml @20,88 value="#{countryPages_Setup.page}}": Illegal Syntax for Set Operation
  
  root cause
  javax.el.PropertyNotWritableException: /countryPages_View.xhtml @20,88 value="#{countryPages_Setup.page}}": Illegal Syntax for Set Operation
  </code></pre>
  
  <p>Why i am getting this error? I made setter and getter for my view params? Also when page loads then first my constructor call. I want to use these f:param values in my constructor. I think after constructor my beforeRenderPage() method will call. How can i get these values in the constructor so i can use it in my constructor?</p>
  
  <p>Thanks</p>