Showing posts with label JSF. Show all posts
Showing posts with label JSF. Show all posts

Thursday, March 10, 2011

Richfaces-Soultion : Add of jquery-min.js, rich:datascroller stop working...

load java script (jquery-min.js)


rich:datascroller tag(component) is not supporting

Using jquery, but rich:datascroller not worked (without using jQuery.noConflict() method)

Thursday, February 3, 2011

Using JSF : To Track XML file location which is under the Web application

 HI

There is an web application, where my xml file is under the WEB Content folder.

/JavaSource
/WEB Content
       /xml/test.xml
/WEB-INF


we can get the location of .xml file using the below suggested code :

ServletContext serCtx = (ServletContext) FacesContext
                    .getCurrentInstance().getExternalContext().getContext();

String filepath = serCtx.getRealPath("/xml/test.xml");


We can get the path of the xml file, where it stored while running the project and we can modify xml and save the file in the same location by using the below code

new XMLOutputter(Format.getPrettyFormat()).output(org.jdom.Document doc,
                    new FileWriter(filepath));

Flex with JSF

HI
   Flex with JSF

Exadel provided Fiji,

For Demo :
we can visit the link  http://livedemo.exadel.com/fiji-demo/pages/endPoint.jsf?c=endpoint&tab=usage.

Wednesday, September 22, 2010

Opening New Window in JSF

Create a temp jspx page and redirect to the page by calling ur param values.
while redirecting to the temp jspx page, call onload an action which calls ur actually method to get values.

Call the below line from ur actually Jspx page.
oncomplete="window.open('redirect.jspx')" action="actuallyBean.redirectMethod"

In ur actuallyBean, redirectMethod read the parameters using request values

public String redirectMethod()
{
      HttpServletRequest request=(HttpServeltRequest)FacesContext.getCurrentInstance()
.getExternalContext().getRequest();
     session.setAtribute("valueInSession", request.getPerameter("id")) ;
      return "";


keep this value in httpsession, until it redirects to the  redirect.jspx.


now, In redirect.jspx, onload call the action
In action get the values from the httpsession and removeattribute from httpsession.

This redirect of page, opening new window takes less than sec, so There won't be any problem.