Sanjeevi Ms

Greenhorn
+ Follow
since Dec 12, 2011
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sanjeevi Ms

Dear All,


I have done the "ListShuttle" Components.I have aatached the source codes.



.XHTML FILE


<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core">


<head>
<link href="../../css/main.css" rel="stylesheet" type="text/css" />
<style>
.pic {
margin-bottom: -4px;
margin-right: 2px;
}
</style>
</head>
<body class="contentBackground">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core">
<t:saveState value="#{collapsiblePanelBean}" />
<f:view>
<h:form id="createProposal">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="95%" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td width="98%" align="left"><t:collapsiblePanel
id="pedDetails" value="false" title="testTitle"
var="test2collapsed">
<f:facet name="header">
<t:div styleClass="panelSection">
<table>
<tr>
<td class="panelTitle"><h:outputText
value="PED Details" /></td>
<td class="panelImage"><t:headerLink immediate="true">
<h:graphicImage value="../../images/downarrow.gif"
alt="" rendered="#{test2collapsed}" />
<h:graphicImage value="../../images/uparrow.GIF"
alt="plusImage" rendered="#{!test2collapsed}" />
</t:headerLink></td>
</tr>
</table>
</t:div>
</f:facet>
<table border="0" width="100%" id="table2" cellspacing="1"
cellpadding="3" bordercolor="#ffffff"
style="border-collapse: collapse">
<tr>
<td>
<fieldset align="center">
<table width="100%">

<tr>
<td colspan="3"></td>
<td class="panelData" colspan="3"><rich:listShuttle
sourceValue="#{pedBean.lista1}"
targetValue="#{pedBean.lista2}" var="items"
listsHeight="250" sourceListWidth="300"
targetListWidth="300"
sourceCaptionLabel="List of PED"
targetCaptionLabel="Available PED">
<rich:column>
<h:outputText value="#{items}" />
</rich:column>
</rich:listShuttle></td>
</tr>



</table>
</fieldset>
</td>
</tr>
</table>
</t:collapsiblePanel></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</ui:composition>
</body>
</html>

.JAVA FILE


package com.starhealth.common;


import java.util.ArrayList;
import java.util.List;


import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


@ManagedBean(name = "pedBean")
@RequestScoped
public class PedBean {


private List<String> lista1;
private List<String> lista2;


/**
* Default Constructor
*/
public PedBean() {


lista1 = new ArrayList<String>();
lista2 = new ArrayList<String>();


lista1.add("Ischaemic Heart Disease");
lista1.add("Hypertension");
lista2.add("Diabetes Mellitus");
lista2.add("Eye Disorder");


}


public List<String> getLista1() {
return lista1;
}


public void setLista1(List<String> lista1) {
this.lista1 = lista1;
}


public List<String> getLista2() {
return lista2;
}


public void setLista2(List<String> lista2) {
this.lista2 = lista2;
}
}

FACES-CONFIG.XML

<managed-bean>


<managed-bean-name>pedBean</managed-bean-name>


<managed-bean-class>com.starhealth.common.PedBean</managed-bean-class>


<managed-bean-scope>request</managed-bean-scope>


</managed-bean>

Happy Coding...

Regards,

Sanjeevi M

Senior Software Developer

10 years ago
JSF
HI All,


I have done this "ListShuttle" component in JSF 2.0.

Try it..
The Sources are:

.xhtml



<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core">

<head>
<link href="../../css/main.css" rel="stylesheet" type="text/css" />
<style>
.pic {
margin-bottom: -4px;
margin-right: 2px;
}
</style>
</head>
<body class="contentBackground">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core">
<t:saveState value="#{collapsiblePanelBean}" />
<f:view>
<h:form id="createProposal">


<fieldset align="center">
<table width="100%">

<tr>
<td colspan="3"></td>
<td class="panelData" colspan="3"><rich:listShuttle
sourceValue="#{pedBean.lista1}" targetValue="#{pedBean.lista2}"
var="items" listsHeight="250" sourceListWidth="300"
targetListWidth="300" sourceCaptionLabel="List of PED"
targetCaptionLabel="Available PED">
<rich:column>
<h:outputText value="#{items}" />
</rich:column>
</rich:listShuttle></td>
</tr>


</table>
</h:form>
</f:view>
</ui:composition>
</body>
</html>

Bean:


package com.starhealth.common;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name = "pedBean")
@RequestScoped
public class PedBean {

private List<String> lista1;
private List<String> lista2;

/**
* Default Constructor
*/
public PedBean() {

lista1 = new ArrayList<String>();
lista2 = new ArrayList<String>();

lista1.add("Ischaemic Heart Disease");
lista1.add("Hypertension");
lista2.add("Diabetes Mellitus");
lista2.add("Eye Disorder");

}

public List<String> getLista1() {
return lista1;
}

public void setLista1(List<String> lista1) {
this.lista1 = lista1;
}

public List<String> getLista2() {
return lista2;
}

public void setLista2(List<String> lista2) {
this.lista2 = lista2;
}
}

Regards,

Sanjeevi M,

Senior Software Developer
10 years ago
JSF
Try this way.....

XHTML Page:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jstl/core">

<fieldset align="center">
<table width="100%">

<tr>
<td colspan="3"></td>
<td class="panelData" colspan="3"><rich:listShuttle
sourceValue="#{pedBean.lista1}" targetValue="#{pedBean.lista2}"
var="items" listsHeight="250" sourceListWidth="300"
targetListWidth="300" sourceCaptionLabel="List of PED"
targetCaptionLabel="Available PED">
<rich:column>
<h:outputText value="#{items}" />
</rich:column>
</rich:listShuttle></td>
</tr>


</table>
</ui:composition>


Bean:



package com.starhealth.common;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name = "pedBean")
@RequestScoped
public class PedBean {

private List<String> lista1;
private List<String> lista2;

/**
* Default Constructor
*/
public PedBean() {

lista1 = new ArrayList<String>();
lista2 = new ArrayList<String>();

lista1.add("Ischaemic Heart Disease");
lista1.add("Hypertension");
lista2.add("Diabetes Mellitus");
lista2.add("Eye Disorder");

}

public List<String> getLista1() {
return lista1;
}

public void setLista1(List<String> lista1) {
this.lista1 = lista1;
}

public List<String> getLista2() {
return lista2;
}

public void setLista2(List<String> lista2) {
this.lista2 = lista2;
}
}


Regards,

Sanjeevi M

Senior Software Developer
10 years ago
JSF
Hi Dear Amarshi,


I tried creating listShuttle in JSF. I used the following link :

http://livedemo.exadel.com/richfaces-demo/richfaces/listShuttle.jsf?c=listShuttle&tab=usage

but the converter is missing "converter="listShuttleconverter"". I want full source code. including "ManageBean,faces-config.xml and listShuttle.xhtml" files..

Can you Help me ?

and the error log is :


javax.servlet.ServletException: Expression Error: Named Object: listShuttleconverter not found.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

root cause

javax.faces.FacesException: Expression Error: Named Object: listShuttleconverter not found.
com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:688)
com.sun.facelets.tag.jsf.ValueHolderRule$LiteralConverterMetadata.applyMetadata(ValueHolderRule.java:45)
com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:144)
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
10 years ago
JSF
Hi All!,

I tried this following link to create a "listShuttle" in JSF,but result not yet get.

http://livedemo.exadel.com/richfaces-demo/richfaces/listShuttle.jsf?c=listShuttle&tab=usage

and

http://passionbytes.com:8080/passionbytes/richfaces/listShuttle.jsf;jsessionid=79DEC6EFA4C04C6241ABACB127C60600

Can anyone post me the source code with"web.xml,faces-config.xml, .java , .jsp and the lib" files
..

Thanks in Advance,

Sanjeevi M
10 years ago
JSF
Hi Hebert Coelho,

I have sort out my issues.
Thanks for the reply. The Problem in "message.properties" file.

Regards,

Sanjeevi M
10 years ago
JSF
Hi All!

How to create a connection from MySQL along with ".JSP",".Class" "Face-Config.xml","Web.xml" and the ".Jar" files.
Please provide the sample code friends. I am tried many way but couldn't happened.

Thanks in Advance,

Sanjeevi
10 years ago
JSF
Hi All !

I tried to create a sample .jsf application with reference given by roseindia.net, but unfortunately i didn't get the solution.
Showing "FacesContext not found error" in Eclipse and MyEclipse too.. Can you guys give a solution with all jar files and links too.

Thanks
Sanjeevi M

sanju.jee07@gmail.com
10 years ago
JSF