How to create a sparkChart (RichSparkChart or UISparkChart) in java bean?

I’m creating a table in my bean. One of the columns needs to be a spark chart. I’m unable to create a spark chart which actually renders a chart. Here is a sample/simplified my code:
this.adfColumn = new RichColumn ();
RichSparkChart sparkChart = new RichSparkChart();
sparkChart.setSubType("line");
sparkChart.setNoDataErrorText("no data");
for ( int i = 1; i < 25; i++ )
UISparkItem sparkItem = new UISparkItem();
sparkItem.setValue( new Double(i) );
sparkChart.getChildren().add ( sparkItem );
this.adfColumn.getChildren().add (sparkChart);
What happens is that the column does render, and so does the spark chart but with the “no data” message. It is interesting to point out that if I comment out the for-loop, ie do not add any spark items, then the column renders with a spark chart which I assume is some default/sample of the spark chart (?).
I have also tried setting the sparkItems’s value as a Tree.Entry as that is what our .jsff code does now, with no difference whatsoever.
ANY ideas/advice will be most helpful!!!

Hi,
Non-programmatically, the spark items would be generated for each row by a component such as an af:iterator. e.g.
<af:column id="c10" width="200"
           headerText="Week Trend">
  <dvt:sparkChart id="sparkChart1" subType="area"
                  shortDesc="Last weeks trend"
                  inlineStyle="width:200px;">
    <af:iterator id="i1" value="#{row.DataForWeek}"
                 var="sparkData" rows="7">
      <dvt:sparkItem id="si2"
                     value="#{sparkData.DataForDay}"/>
    </af:iterator>
  </dvt:sparkChart>
</af:column>So, rather than having a for loop generating spark items, you could create a UIXIterator with a single spark item child that refers to the data in the row as above.
Kevin

Similar Messages

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • How to create and call a COM component in Java

    Hi All,
    can you suggest how to create and call a COM component..or if have any sample simple application can you send it to me...i will try to develop my project.
    actually i am configuring a OCR Engine using SDK which is in VB .Net when i contacted their support they told that if i have any sample COM based component Project they will help me...
    So please can you help in this.
    Thanks in advance.

    As said by my fellow posters Java Devolopment Environment (Except Microsoft implementation of JVM,this is no longer supported by MS themseleves) does not provide an built-in support to serve this cause.
    If you are looking to devolop a custom based solution the below is a good place to start with where end user is talking about Java <=> JNI <=> Native <=> COM connectivity.
    [http://bloggershetty.blogspot.com/2004/12/java-jni-com-activex-bridge-lots-of.html]
    However,if you are looking for ready made solutions ?
    Implementation any one of the solutions stated below might serve your cause.
    Open Source Solutions:
    [http://j-interop.org/]
    [http://www.danadler.com/jacob/]
    Commercial Solutions:
    [http://javacombridge.com/]
    [http://www.jnbridge.com/]
    [http://www.nevaobject.com/j2cdetails.asp?kw=java%20com%20bridge]
    [http://j-integra.intrinsyc.com/]
    Hope this might help :)
    REGARDS,
    RaHuL

  • How to create a mail user agent by using JAVA...

    my lecturer has asked me to create a mail user agent by using JAVA , i have no idea how to start this assignment......

    What part are you stuck on? Creating a GUI (look at the Swing tutorials), or writing the talk-to-mail-server bit? Look at Java Mail, or the email RFCs.

  • How to create CRUD application using bapi in webdynpro java

    Hi All,
          I have implemented the CRUD application using bapi  Now i want to create, retrieve , update and delete the existing table by click on Insert, delete, retrieve ,and update button dynamically. i get null values from database,  Please let me know the logic and procedure for how to create CRUD application using bapi  Please any one help me..
    Thanks in advance

    Hi,
    Hey tell me one thing your BAPI having CURD methods. See you are getting data from BAPI and pull the data in Table in WDJ. So if u can do any action it will comes trough BAPI.
    If your BAPI having CURD methods. You can implement CURD methods in WDJAVA also.
    @ You said you are getting null values from the database. Please let me know what code you have to wrote for CURD. Please tell me.
    Hope this is help full for u
    Best Regards
    Vijay K

  • How to create a set up program for my Java application

    Can some one please tell how to create a Setup for my Java Application

    Thanks for your reply.
    But still if you could have answered my query it would have been of a little more help for me, as I am quite new to any of these kinds of forum.
    Still thanks a lot for the reply.

  • Webinar (Aug 11): How to create Cross-Platform Automated GUI Tests for Java Apps

    Join Squish expert, Amanda Burma, and learn how to create cross-platform automated GUI tests for your Java applications!
    Register here (multiple time slots)
    August 11th 2014
    Duration: 30 minutes plus Q & A
    This webinar will cover:
    General Squish for Java overview
    Automating BDD Scenarios
    Executing Cross-Platform Automated GUI Tests
    Interacting with Java application objects, properties & API
    See you there!
    Unable to attend? Register and we'll send links to future events and access to our webinar archive following the event.
    Webinar schedule
    Learn more about Squish
    Evaluate froglogic squish

    <property name="messaging.client.jar.path" value="Location in your local drive" />
    <property name="messaging.client.jar.name" value="nameOfYourFile.jar" />

  • How to create and edit a .ini file using java

    Hi All...
    Pls help me in creating and editing an .ini file using java...
    thanks in advance
    Regards,
    sathya

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • How to create two level dynamic list using JSP , Java Script and Oracle

    I am new in JSP. And i am facing problem in creating two level dynamic list using JSP ,Java Script where the listdata will come from Oracle 10g express edition database. Is there any easy way in JSP that is available on in ASP.NET.
    Plz response with details.

    1) Learn JDBC API [http://java.sun.com/docs/books/tutorial/jdbc/index.html].
    2) Create DAO class which contains JDBC code and do all SQL queries and returns or takes ID's or DTO objects.
    3) Learn Servlet API [http://java.sun.com/javaee/5/docs/tutorial/doc/].
    4) Create Servlet class which calls the DAO class, gets the list of DTO's as result, puts it as a request attribute and forwards the request to a JSP page.
    5) Learn JSP and JSTL [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Also learn HTML if you even don't know it.
    6) Create JSP page which uses the JSTL c:forEach tag to access the list of DTO's and iterate over it and prints a HTML list out.
    You don't need Javascript for this.

  • How to create a UML diagram from a existing .java/.class file?

    I want to create a UML diagram from a existing .java/.class file automatic in JDeveloper. Can I get it? thanks!

    create a new class diagram and then simply drag the java classes from your project onto the diagram area.

  • How to create a folder with spaces written in Java under Linux?

    Hello,
    I have a serious problem
    I want to run a Linux command using a Java class with the runtime interface, there is a command to create a folder named eg "My Folder", with a space
    For create the Unix command is easy to do either:
    mkdir My\ Folder
    or
    mkdir "My Folder"
    But how to translate this in Java, I tried with two commands :
    Runtime.exec("mkdir My\\ Folder")
    Runtime.exec("mkdir \"My Folder\"")
    For example :
    import java.io.IOException;
    public class CreerDossier {
    public static void main(String[] args) throws IOException {
    Runtime runtime = Runtime.getRuntime();
    runtime.exec("mkdir My\\ Folder");
    runtime.exec("mkdir \"My Folder\"");
    But it's still not working,
    For runtime.exec("mkdir My\\ Folder") it creates two folders My\ and Folder
    For runtime.exec("mkdir \"My Folder\"") it creates also two folders "My and Folder"
    Are there solutions?
    Thank you !

    But my real problem is how to apply the chmod 777 on a folder containing spacesSo why not say so in the first place?
    Runtime.exec ("chmod 777 My\\ Folder");Runtime.exec(new String[]{"chmod", "777", "My Folder"});
    That is why I chose the example of mkdirYour reasoning on this point is incomprehensible. You wanted help with A so you asked about B. Just wasting time.

  • How to create multiple component instances at runtime using java

    Hi,
    I need to create component instances at runtime using java.I found ComponentSet.add method.But I am not finding a way to get handle of ComponentSet.
    I see methods with params of IRuntimeNode.But how to get ComponentSet from IRuntimeNode.
    If anybody knows or have sampel code then please share with me.
    thanks,
    ashok

    Ashok --
    This is a common challenge for those using Configurator Extensions with multiple instantiation for the first time. The problem is that the CIO's representation of the structure for multiply-instantiable Components differs slightly from what both Configurator Developer users and Configurator Runtime users see in those respective applications. Multiply-instantiable Components are not direct children of the Model in which they're defined. Internally, there is an entity that sits between the parent Model and the instantiable Components; that intermediate entity is the ComponentSet object you've found in the CIO documentation.
    If the name of your multiply-instantiable Component is "My Component", then its ComponentSet may be accessed simply by calling getChildByName("My Component") on its parent Model; a List of the instantiated Components may be accessed with the ComponentSet's getChildComponentNodes() method, and instances may be added and deleted using its add() and delete() methods.
    Hope this helps.
    Eogan

  • How to create a textbox and dropdown list in Java similar to google search

    Hi,
    I want to create a textbox and dropdown in java very much similar to google search . As user types in the letters it should display the dropdown list similar to google. Can anyone help me with this one asap.
    Thanks
    Lavanya

    But my real problem is how to apply the chmod 777 on a folder containing spacesSo why not say so in the first place?
    Runtime.exec ("chmod 777 My\\ Folder");Runtime.exec(new String[]{"chmod", "777", "My Folder"});
    That is why I chose the example of mkdirYour reasoning on this point is incomprehensible. You wanted help with A so you asked about B. Just wasting time.

  • How to create an email list server solution with java

    hi all
    I would like to create a email list service with java.
    (when I say email list service, I mean , you send email and everyone who subscribes to the list receives the email automatically or the email is held in a queue for approval )
    this solution would have to be integrated with the emailing standards .
    Could someone share with me how one would create a list service with java and how it would work with the email and pick it up ?
    stephen

    or if there is an open source solution please let me know
    stephen

  • How to create Table Popins inside a table using Java Webdynpro

    Hi All,
    I am working on a Java Webdynpro project and one of our requirements is to create Table popins inside the Table. I need to popin data beneath the row based on a value selected from the DropDown Box which is one of the  column in the Table.
    Also, I need to display vertical scrollbar instead of  Table Footer to scroll thru the table rows. Any ideas.........
    I would appreciate if you can let me know how can I do this. I am working on the 7.0 version of Java Webdynpro.
    Thanks for your time and consideration!
    Regards,
    Madhavi

    Hi,
    Please refer the following link:
    Re: Table popins
    step by step procudure to create table popin on lead select.
    thanks & regards,
    Manoj
    Edited by: Manoj Kumar on Apr 1, 2008 10:17 AM

Maybe you are looking for

  • How do i restore a backup in my iphone with the newest version of iTunes

    how do i restore a backup in my iphone with the newest version of iTunes?

  • Archive link Picture Print

    Hello all, I have a picture stored in archive link. I have a screen in which i use the class CL_GUI_PICTURE to display the picture. (I use the FM 'ARCHIVELINK_URL_GENERATE' to generate the url for that picture). What i need is a way to print that pic

  • Create Interactive PDF Form

    Hello, How can i create interactive PDF Form i.e. AcroForm Programmatically using Acrobat SDK

  • Macbook pro graphics card glitch?

    Every now and again on my laptop (13 in, mid 2010 macbook pro) the screen glitches for a second. The visual will get distorted and there will be white boxes all over the place and then it will revert back to normal. Should I be concerned?

  • Photo Smart Plus B209-a Issue with print head

    Have been using my Photo Smart printer for a few years. I have changed my ink cartridges several times and never a problem.  I changed the ink cartridges yesterday   and now I have an error message that my print head is incompatabale with my printer