JSF perguntas e respostas de entrevista
Question: How to pass a parameter to the JSF application using the URL string?Answer: if you have the following URL: http://your_server/your_app/product.jsf?id=777, you access the passing parameter id with the following lines of java code:FacesContext fc = FacesContext.getCurrentInstance(); String id = (String) fc.getExternalContext().getRequestParameterMap().get("id"); From the page, you can access the same parameter using the predefined variable with name param. For example, <h:outputText value="#{param['id']}" /> Note: You have to call the jsf page directly and using the servlet mapping. |
Salvar para revisao
Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.
Faca login para salvar favoritos, perguntas dificeis e conjuntos de revisao.
Isto e util? Sim Nao
Mais uteis segundo os usuarios:
- What is JSF?
- What is required for JSF to get started?
- What is JSF architecture?
- How the components of JSF are rendered? An Example
- How JSF different from conventional JSP / Servlet Model?