This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Applets and the fly likes Can we use jsf tags inside applet in XHTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Can we use jsf tags inside applet in XHTML" Watch "Can we use jsf tags inside applet in XHTML" New topic
Author

Can we use jsf tags inside applet in XHTML

Praveen Yendluri
Ranch Hand

Joined: Apr 13, 2011
Posts: 33
Hello Everyone,

Below is my Xhtml code the that has to generate bar charts using perspective for java (pfj.jar).
In this code I have used an applet to display. I am trying to set data dynamically(using <ui:repeat> tag) from back bean "myBean" in the applet. At this point it is throwing error.

Can we use jsf tags inside applet? But when I set it with static data (like (setData(0,1,30)) )it displaying graph properly and able to print bean values properly.

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>Facelet Title</title>
<script>
</script>
</h:head>
<h:body>
<h:form>

<!-- Just Printing Bean values -->
<ui:repeat value="#{myBean.releasedData}" var="released" >
#{released.late} #{released.good} #{released.warned}


</ui:repeat>

<applet
code="TDGChartApplet.class"
archive="PfjFull.jar"
width="750"
height="425" >
<param name="TDGSCRIPT" value='
setUseSampleData(false);
setGraphType(18);
setDepthRadius (0);
setStackedDataValueSum (true);

setDataTextDisplay (true);

<ui:repeat value=#{myBean.releasedData}" var="released" >
setData(0,0,#{released.late});
setData(1,0, #{released.good});
setData(2,0, #{released.warned});
</ui:repeat>
setDataRangeToExtent();
setSeriesLabel (0,"Good");
setSeriesLabel (1,"Warned");
setSeriesLabel (2,"Late");


setSeriesType(getSeries(1),1);
setSeriesFillColor(0,new Color(0,255,0));
setSeriesFillColor(1, new Color(0,0,255));
setSeriesFillColor(2, new Color(0,0,10));

setLineWidth(getSeries(1),1);
setMarkerShape(getSeries(1),3);
setAxisAssignment(0,0);
setAxisAssignment(getSeries(1),1);

setY1ScaleMinAuto (false);
setY1ScaleMin(0);
setY2ScaleMinAuto(false);
setY2ScaleMin(0);
setY1TitleString ("Number of Work Orders");
setY2TitleString ("Average Number Of Days");
setTextRotation(getY2Title(),1);
setFillColor(getY2Title(),new Color(0,0,255));

setFontSizeVC (getGroup(0),600);


'/>

</applet>
</h:form>
</h:body>
</html>


Error it is throwing:

javax.faces.view.facelets.FaceletException: Error Parsing /index.xhtml: Error Traced[line: 36] The value of attribute "value" associated with an element type "null" must not contain the '<' character.

Please can anyone assist on this?

Thank you,
Praveen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we use jsf tags inside applet in XHTML
 
Similar Threads
ui:repeat + AJAX
Bean value not maintained in RequestScoped
impossible to make work a galleria from primefaces
How to include an applet in JSF
Trying to change <ui:include> src tag dinamically