Passing text component to methods

I have a method that reads a file and output puts it to a JTextArea. Everything is working fine but I am wondering if I can pass an object from a class above JTextArea (like TextComponent). Looking for a generic feel with whatever text based component I passed...will this make a difference with lightweight and heavyweigth components (swing vs. awt)? Or even streams for that matter? Will byte and character streams act differently?
What is the super class of all text based gui components?
What is the super class of all streams?
Yes I have read the java api doc on streams and using swing! Thanks

You have me until
Everything is working fine but I am wondering if I can pass an object from a class above JTextArea (like TextComponent).What are you asking for here?
You want to know if you can pass an object to a method? Yes.
You want to know if you can modify a class further up in JTextArea's hierarchy, so it has a method that passes an object to another method? Yes, by extending it and implementing the functionality you want.
Looking for a generic feel with whatever text based component I passed...will this make a difference with lightweight and heavyweigth components (swing vs. awt)?Not sure what you were asking for in the first place, so I'm unable to help you with this one.
Or even streams for that matter? Will byte and character streams act differently?If you're asking, "When I pass a stream through a method, will it act differently when I use it inside that method?", then I can answer no, it will not. You are passing your stream by reference.
class MyClass {
   private Object anObject;
   public MyClass() {
      anObject = new Object();
      MySecondClass secondClass = new MySecondClass(anObject);
class MySecondClass {
   private Object theSameObject;
   public MyClass(Object argument) {
      theSameObject = argument;
}In the above example, anObject was created in MyClass, and passed to the constructor of MySecondClass. The field theSameObject in MySecondClass is set to point to the Object passed into its constructor, which just happens to be the Object anObject created in MyClass. anObject was created in MyClass. theSameObject is essentially the exact same Object in that it references (points to) anObject.
If I'm wrong feel free to call me on it, java gurus.
What is the super class of all text based gui components?AWT or Swing?
If it's AWT, look up the API for an AWT text component, try TextField, and look at the class hierarchy.
If it's Swing, do the same for JTextField. You can easily do some detective work and figure out the super classes of 'text based gui components'.
What is the super class of all streams?You can do the same as above for streams as well.
Yes I have read the java api doc on streams and using swing! ThanksIf you've read the API docs on streams and Swing, then why did you ask the last two questions? Not trying to offend, it just seems kind of wierd.

Similar Messages

  • Issue using JS to change the value of an output text component dynamically

    I am developing an application and I need to change the output text component value at run time when the mouse moves over a field. I am using javascript and then using UIComponent.setproperty to change the value.
    I am not able to do this and am getting nothing.
    Kindly let me know what am I doing wrong
    I am using ADF 11g (10th November release).
    Regards,
    Deepak

    Hi i'm doing the same thing with an input text
    here is my code
    jspx:
    <af:inputText value="#{bindings.MiddleName.inputValue}"
    label="#{bindings.MiddleName.hints.label}"
    required="#{bindings.MiddleName.hints.mandatory}"
    columns="#{bindings.MiddleName.hints.displayWidth}"
    maximumLength="#{bindings.MiddleName.hints.precision}"
    shortDesc="#{bindings.MiddleName.hints.tooltip}"
    id="it4" autoSubmit="true">
    <f:validator binding="#{bindings.MiddleName.validator}"/>
    <af:clientListener type="valueChange" method="mo_UpperCase"/>
    </af:inputText>
    js:
    function mo_UpperCase(event){
    var inputField = event.getSource();
    if (event.getNewValue().toUpperCase()!=event.getNewValue())
    inputField.setValue(event.getNewValue().toUpperCase());
    In my case i change the input text to upercase when the value is changing
    I hope it works with output text also,
    change my examples clientlistener type from valueChange to mouseOver
    If you have more than one component and you need to pass parameters check this thread also:
    bug at af:clientAttribute 11.1.1.2.0
    Tilemahos

  • Dynamically resize a text component

    I am trying to build a simple twitter application.  I pull in the feed from twitter and set it to an arrayCollection.  This information is passed to a list component as a dataProvider.  The list contains a itemRenderer that pulls in a custom component for displaying the information I want from Twitter.  Here is the code for the component called Tweet:
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" verticalScrollPolicy="off">
        <mx:Image width="50" height="50" source="{data.link[1].href}" />
         <mx:Text width="100%"  id="twitterText" text="{data.title} {'\n'} {data.author.name} {data.published}" /> 
    </mx:HBox>
    pretty simple.  The problem is, the text componnent does not resize its height to the amount of text, so my text is cut off.  If i set a static height, I have too much white space on short tweets.  I have tried changing the height with AS3 but can't seem to get it to work.  Any ideas?
    Here is the the list component I am using:
      <mx:Canvas width="100%" height="100%" x="0" y="100" backgroundColor="#FF0000" borderStyle="none">                       
                <mx:List dataProvider="{ac}" itemRenderer="Tweet" top="58" left="0" right="0" bottom="40" id="theList"></mx:List>
       </mx:Canvas>
    Oh and if it helps,  I am using the same method Lee Brimelow teaches in his 3 beginner Flex tutorials on his site gotoandlearn.com

    I finally figured out the problem.  The problem was not with the text component but rather the list component.  Here is my list component now:
    <mx:List dataProvider="{ac}" itemRenderer="Tweet" id="tweetList" top="0" left="0" right="0" bottom="145" themeColor="#A5A5A5" variableRowHeight="true"></mx:List>
    I ran across the property variableRowHeight.  It defaults to false.  When set to true, each item in the list can be a different size.  The textarea was resizing correctly.

  • How to email text from a text component in my applet on a the host server ?

    How to email text from a text component in my applet on a the host server, back to my email address ?
    Assuming I have Email Form on the host server.
    Help will be appreciated.

    You can do like below
    =REPLACE(Fields!Column.Value," " & Parameters!ParameterName.value & " ","<b>" & Parameters!ParameterName.value & "</b>")
    The select the expression and  right click and choose placeholder properties
    Inside that set Markup type as HTML 
    then it will highlight the passed parameter value in bold within the full xml string
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Center text in a text component with line wrapping

    I need to display dynamic text in a text component. I need line wrapping (on work boundaries) and also need horizontal and vertical center alignment.
    How do I do this? I saw a previous post on aligning text in a JTextArea that said to use a JTextPane but I don't see in JTextPane how to do word wrapping.
    Thanks,
    John

    //  File:          SystemInfoWindow.java.java
    //  Classes:     SystemInfoWindow
    //  Package:     utilities.msglib
    //  Purpose:     Implement the SystemInfoWindow class.
    //     Author:          JJB 
    //     Revision History:
    //     Date            By   Rel#  Description of change
    //     =============  ===  ====  ===============================================
    //     Jul 3, 2006   JJB  1.00  Original version
    //  Public Types / Classes          Type Description
    //  ========================     =============================================
    //     SystemInfoWindow
    package utilities.msglib;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    import javax.swing.JTextPane;
    import javax.swing.SwingUtilities;
    * TODO Enter description
    class SystemInfoWindow extends JDialog {
          * @param args
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        Test thisClass = new Test();
                        thisClass.setVisible(true);
                        SystemInfoWindow window = new SystemInfoWindow(thisClass);
                        window.setMessage("System shutdown in progress ... lot sof atatarte athis tis a sa logoint of tesxt it keeps going and going and going thsoreoiat afsjkjslakjs fshafhdskrjlkjsdfj");
                        window.setVisible(true);
         //     ------------------------  Inner Classes ---------------------
         static class Test extends JFrame {
              private JPanel jContentPane = null;
               * This is the default constructor
              public Test() {
                   super();
                   initialize();
               * This method initializes this
               * @return void
              private void initialize() {
                   this.setSize(300, 200);
                   this.setContentPane(getJContentPane());
                   this.setTitle("JFrame");
               * This method initializes jContentPane
               * @return javax.swing.JPanel
              private JPanel getJContentPane() {
                   if (jContentPane == null) {
                        jContentPane = new JPanel();
                        jContentPane.setLayout(new BorderLayout());
                   return jContentPane;
         //     ------------------------  Static Fields ---------------------
         private static final long serialVersionUID = -8602533190114692294L;
         //     ------------------------  Static Methods --------------------
         //     ------------------------  Public Fields ---------------------
         //     ------------------------  Non-Public Fields -----------------
         private JPanel jContentPane = null;
         private JTextPane textField = null;
         public SystemInfoWindow(JFrame frame) {
              super(frame);
              initialize();
              //setUndecorated(true);
              setLocationRelativeTo(frame);
              pack();
         //     ------------------------  Interface Implementations ---------
         //     ------------------------  Public Methods --------------------
         public void setMessage(String text){
              textField.setText(text);
              adjustSize();
         //     ------------------------  Non-Public Methods ----------------
         private void adjustSize(){
              Dimension oldSize = textField.getPreferredSize();
              textField.setPreferredSize(new Dimension(
                        oldSize.width, oldSize.height + 30));
              pack();
         //     ------------------------  Generated Code --------------------
          * This method initializes this
          * @return void
         private void initialize() {
              this.setSize(300, 200);
              this.setModal(true);
              this.setContentPane(getJContentPane());
              this.addWindowListener(new java.awt.event.WindowAdapter() {
                   public void windowOpened(java.awt.event.WindowEvent e) {
                        //setLocationRelativeTo(MsgLibGlobals.parent);
                        pack();
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setLayout(new BorderLayout());
                   jContentPane.setMaximumSize(new java.awt.Dimension(50,2147483647));
                   jContentPane.add(getTextField(), java.awt.BorderLayout.CENTER);
              return jContentPane;
          * This method initializes textField     
          * @return javax.swing.JTextPane     
         private JTextPane getTextField() {
              if (textField == null) {
                   textField = new JTextPane();
                   textField.setEditable(false);
                   textField.setMaximumSize(new java.awt.Dimension(20,2147483647));
              return textField;
    }Message was edited by:
    BaltimoreJohn

  • Passing output to a method, I'm lost!

    I want to put all of my "output" including the returns on the three Temp functions in my method DisplayTemperatures, but I'm stuck and don't know how to do this. Please help
    import javax.swing.*;
    import java.text.DecimalFormat;
    public class Temp {
         public static void main(String[] args) {
              int Hourly_Temperatures[];
              String output;
              Hourly_Temperatures = new int[24];
              DecimalFormat twoDigits = new DecimalFormat ("00");     
              for (int i = 0;i < Hourly_Temperatures.length;i++) { //inputs temps               
                   Hourly_Temperatures[i] = Integer.parseInt(JOptionPane.showInputDialog("Enter temperature between -50 & 130\nHour: " + twoDigits.format(i) + ":00"));
                   while (Hourly_Temperatures[i] < -50|| Hourly_Temperatures[i] > 130) {
                        Hourly_Temperatures[i] = Integer.parseInt(JOptionPane.showInputDialog(null,"Invalid Entry!\nEnter temperature"));
              output = "Hour\tTemperature\n"; // build output string
              for (int counter = 0; counter < Hourly_Temperatures.length; counter++)
              output += twoDigits.format(counter) + ":00" + "\t" + Hourly_Temperatures[counter] + "\n";
              JTextArea outputArea = new JTextArea();
              outputArea.setText(output);
              JOptionPane.showMessageDialog(null,outputArea,"24 hour Temperature",JOptionPane.INFORMATION_MESSAGE);
              //System.exit(0);
         } //end main
         public int High_Temp(int Temperatures[]){
              int highTemp = Temperatures[0];
              for (int counter =0; counter < Temperatures.length; counter++)
              if (Temperatures[counter]>highTemp)
              highTemp = Temperatures[counter];
              return highTemp;
         }//end method High_Temp
         public int Low_Temp(int Temperatures[]){
                   int lowTemp = Temperatures[0];
                   for (int counter =0; counter < Temperatures.length; counter++)
                   if (Temperatures[counter]<lowTemp)
                   lowTemp = Temperatures[counter];
                   return lowTemp;
         }//end method Low_temp
         public int Average_Temp(int Temperatures[]){
              int total = 0;
              for (int counter =0; counter < Temperatures.length; counter++)
              total += Temperatures[counter];
              return total / Temperatures.length;
         }// end method Average_Temp
         public void Display_Temperatures(int Temperatues[], int Average_Temp){
        }// end method Display_Temperatures
    } //end class

    I am not sure I understand what problem you are having in passing output to the method. However, I'll guess:
    If you want to pass output to Display_Temperatures() then:
    1. change Display_Temperatures to accept a String
    2. move display code from main to Display_Temperatures.
    3. pass output to Display_Temperatures()
    Display_Temperatures(output)If you want to do all the calculations also in Display_Temperatures:
    1. change Display_Temperatures to accept only 1 arg - int[]
    2. move all the calculations & display code from main to Display_Temperatures
    3. pass Hourly_Temperatures to Display_Temperatures()
    Display_Temperatures(Hourly_Temperatures)If you make these changes then you will encounter some compilation errors. Post them here only after you've first tried to understand and fix them.
    If it is something else you want to do, then you will have to explain it better; at least I've not understood your problem.
    The naming standards that almost all jave professionals follow is:
    1. not to use underscore char ( _ ) in method names; so Display_Temperatures shd be DisplayTemperatures
    2. var names don't have _ char within the name and begin with a lower case; so Hourly_Temperatures shd be hourlyTemperatures
    It is generally a good practice to create an instance of the class in the main() method and write the process code in the instance methods instead of putting all that code in main() itself. Read the [url http://java.sun.com/docs/books/tutorial/]tutorials for this starting from the "Your First Cup of Java".

  • Concatenating VARCHAR2 to pass to a Java method

    Hi, I've imported in Oracle 10g a Java method which processes a String. I've mapped the String to a varchar2 as follow:
    create or replace function PARSE(input in varchar2) RETURN varchar2
    as language java
    name 'Base64.decodeToString(java.lang.String) return String';
    I then built a simple PL/SQL program to build the string to pass to the Java method as follows:
    create or replace procedure TEST_PARSE(input_tid in number) is
    begin
    declare
    result varchar2(32767);
    cursor object_cur is select TEXT from OBJECTSTORE where TID=input_tid order by rnumber;
    object_row object_cur%ROWTYPE;
    begin
    open object_cur;
    loop
    fetch object_cur into object_row;
    exit when object_cur%NOTFOUND;
    result := result || object_cur.TEXT;
    end loop;
    close object_cur;
    result := PARSE(result);
    end
    The PL/SQL program just concatenates the TEXT column from a bunch of records in the table OBJECTSTORE. The TEXT column is defined as a VARCHAR2(4000).
    Now if the SELECT in the TEST_PARSE program returns only 1 record, then everything works and the PARSE Java function returns the processed String.
    If the SELECT returns 2 or more records then I get the following warning and the Java method doesn't return anything:
    "Warning: PL/SQL procedure successfully completed with compilation errors"
    Since I know that the Java method works fine (it has been tested within java programs successfully ) I think the problem is something to do with data types or maybe with the size of the concatenated string.
    Any help really appreciated. Thank you!

    Thanks guys, it still doesn't work, but at least now I can see some error messages:
    Error code -24345: ORA-24345: A Truncation or null fetch error occurred
    1) The error occurs when I call the Java method. As before this happens only when the select returns more than 1 record and I concatenate two or more TEXT (each one is a VARCHAR2(4000)). However the concatenation works fine so I guess the problem is that the resulting string is too big for the Java method to process.
    Or maybe the string returned by the Java method is too big for the PL/SQL varchar2?
    2) Also why do I get a compilation error if I try to add the size of the varchar2 in the mapping below?
    create or replace function PARSE(input in varchar2) RETURN varchar2
    as language java
    name 'Base64.decodeToString(java.lang.String) return String';

  • Getting a value of an input text component in backing bean

    I have created an input text component on a page where I will be entering a number, setting Autosubmit feature as true. ValueChangeListener property is set as #{test.displayTable} where displayTable is a method defined in test managed bean.
    Now I know to fetch the value entered in input text component by creating a RichInputText variable in Advanced property.
    But in case the Advanced property is blank, then how will I be able to retrieve the value of it? This is the code. I am not able to get the value entered in the component. I can't even find any getvalue method for it.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot root = facesContext.getViewRoot();
    RichInputText inputText = (RichInputText) root.findComponent("it1");  // it1 is the id of the input text component
    System.out.println("inputText: "+inputText);On using sop statement, this is the output which is getting generated, while I had entered 90.
    inputText: RichInputText[UIXEditableFacesBeanImpl, id=it1]

    One more thing. Once the VO is getting refreshed, I am able to display an inline message saying that 'Table refreshed Successfully!' (refer the code)
    But in case if the user doesn't enter anything, and press TAB button, I want to display an error message exactly besides the input text component, saying that 'Please Enter an Integer.' According to my understanding, if the user enters a null value then while casting string to Integer, it will throw an exception, so I will be writing the code in the catch part. Any suggestions?
    public void displayTable(ValueChangeEvent valueChangeEvent) {
            BindingContext bctx = BindingContext.getCurrent();
            BindingContainer bindings = bctx.getCurrentBindingsEntry();
            OperationBinding method = (OperationBinding)bindings.get("displayEmployeeTable");
            try {
                Integer getValue = Integer.valueOf(valueChangeEvent.getNewValue().toString());
                System.out.println("getValue: " + getValue);
                method.getParamsMap().put("deptId", getValue);
            } catch (Exception e) {
            method.execute();
            FacesMessage message = new FacesMessage("Table refreshed Successfully!");
            message.setSeverity(FacesMessage.SEVERITY_INFO);
            FacesContext fc = FacesContext.getCurrentInstance();
            fc.addMessage(null, message);
        }Edited by: Sonull on Jan 12, 2013 3:56 PM

  • Scrollable Text Component

    I need to make a scrollable text component which reads characters from an InputStream object. I have two questions.
    Q1: My first attempt was to make a Text Area but I couldn't find any ways to easily make it scrollable. The method in the JTextComponent class that returns the scrollable object needs a Rectangle object in its paramaters. But I don't have a Rectangle object, I have a Text Area object. This gets me thinking that perhaps I should be using a different object than a Text Area. So, what class/object should I use from the API to make a scrollable text component?
    Q2: I want this scrollable Text Component to read characters from an InputStream object. How can I do this easily?

    * SaveReloadText.java
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    public class SaveReloadText extends JFrame {
        public SaveReloadText() {
            initComponents();
        private void initComponents() {
            setTitle("Save-Reload JTextArea");
            toolbar = new JToolBar();
            saveButton = new JButton("Save");
            reloadButton = new JButton("Reload");
            reloadButton.setEnabled(false);
            textarea = new JTextArea();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            saveButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    saveButtonActionPerformed(evt);
            toolbar.add(saveButton);
            reloadButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    reloadButtonActionPerformed(evt);
            toolbar.add(reloadButton);
            getContentPane().add(toolbar, BorderLayout.NORTH);
            textarea.setBackground(new Color(204, 204, 204));
            textarea.setText(
                    "BLA BLA BLA\n" +
                    "\n" +
                    "bla bla bla bla bla bla bla bla blabla bla bla  bla bla bla, \n" +
                    "bla bla bla bla bla bla bla bla blabla bla bla  bl, etc. \n" +
                    "\n" +
                    "Bla bla bla bla bla bla bla bla blabla bla bla  bla bla bla bla bla. \n" +
                    "\n" +
                    "Bla bla bla bla bla bla bla bla blabla bla bla  bla bla bla, \n" +
                    "bla bla bla bla bla bla bla bla blabla bla bla  bla bla bla bla bla bla blabla. \n" +
                    "Bla bla bla bla . \n" +
                    "\n" +
                    "bla bla bla bla bla bla,  bla bla blabla bla bla . \n" +
                    "\n" +
                    "bla bla bla bla bla bla bla bla blabla bla bla  bla bla bla bla bla  bla bla bla \n" +
                    "bla bla bla, blahhhhhhhhhhh. "
            getContentPane().add(new JScrollPane(textarea), BorderLayout.CENTER);
            setSize(300,200);
            setLocationRelativeTo(null);
        private void saveButtonActionPerformed(final ActionEvent evt) {
            try{
                doSave();
            }catch(IOException ex){
                ex.printStackTrace();
                return;
            textarea.setText("");
            saveButton.setEnabled(false);
            reloadButton.setEnabled(true);
        private void reloadButtonActionPerformed(final ActionEvent evt) {
            try{
                doReload();
            }catch(IOException ex){
                ex.printStackTrace();
                return;
            saveButton.setEnabled(true);
            reloadButton.setEnabled(false);
        private void doSave() throws IOException{
            Writer writer = new BufferedWriter(new FileWriter(new File(FILE_NAME)));
            textarea.write(writer);
            writer.close();
        private void doReload() throws IOException{
            Reader reader = new BufferedReader(new FileReader(new File(FILE_NAME)));
            textarea.read(reader,null);
            reader.close();
        public static void main(final String args[]) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new SaveReloadText().setVisible(true);
        private final String FILE_NAME = "c:\\Masturbation_Technique.txt";
        private BufferedWriter writer;
        private BufferedReader reader;
        private JButton saveButton,reloadButton;
        private JTextArea textarea;
        private JToolBar toolbar;
    }

  • Custom text component with different start and end points for each line

    I'm trying to create a custom component extending textArea in which each individual line in the textArea would have different start and end points.  For example, the start/end points for line 1 might be 20 pixels in the front and 35 pixels at the end but start/end points for line 2 might be 25 pixels in front and 20 pixels at the end, etc.  These boundary values would be passed in.  The width of the entire textArea component would be a fixed size.  The result would be something like this:
         Jack and Jill
              ran up the hill
      to fetch a pail of water
    depending on the boundary values of each individual line of course.  The custom component would take a string and render it in the text component with the appropriate individual line start and end points.  I'm trying to do this by adding the text component to the display with the passed in string and then adding in spaces in the beginning of each line and adding a "/n" at the end of the line wherever appropriate based on the start and end values for that line.
    Just wondering if I'm on the right track and if anyone has any advice on this.

    > Applying the marker places the same icon on all lines of the graph and I need a different one for each
    What do you have selected when you assign the marker? It
    shouldn't apply to all the markers on the whole graph unless you have all the existing markers selected when you apply the new one.
    Assigning marker designs is exactly analogous to assigning bar graph designs.
    If you have a single marker selected when you assign the new design, it will apply to only that graph data point.
    If you use the group select tool (or option-click with the direct select tool) to reclick on an already-selected marker until all the markers for the same line are selected, and then assign a design, the new design will apply only to the selected line. (You can extend the graph by adding more rows, and the new data points will inherit the marker for the line they are on.)
    The thread linked to below demonstrates in more detail how the marker designs are scaled:
    http://www.adobeforums.com/cgi-bin/webx/.3bc10970/0

  • Passing Parameters via Post Method from Webdynpro Java to a web application

    Hello Experts,
    I want to pass few parameters from a web dynpro application to an external web application.
    In order to achieve this, I am referring to the below thread:
    HTTP Post
    As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.
    But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:
    Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.
    I am using SAP NetWeaver Developer Studio Version: 7.01.00
    Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.
    Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.
    Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.
    Thanks & Regards,
    Anurag

    Hi,
    This is purely a java approach, even you can try this for your requirement.
    There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.
    if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.
    If it is Asynchronous  means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.
    here you go and find the way to implement Asynchronous  scenario,
    http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
    http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
    http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html
    Thanks & Regards
    Rajesh A

  • How to pass text in MDX query

    Hi All,
    I was wondering how to pass text in MDX query.
    Below mentioned is my sample query and it is working fine.
    SELECT
    {[Measures].members} ON AXIS(0),
    NON EMPTY [0MATERIAL].[LEVEL01].MEMBERS
    *[0DOC_NUMBER].[LEVEL01].MEMBERS ON AXIS(1)"
    FROM [$ZTEST]"
    WHERE {[0MATERIAL].[000012345]} ";      
    But in data base 000012345 consists of material name as “ Pepsi “
    Now based on Pepsi I want to fetch results? Is it possible?
    Thanks in advance.

    Srinivas,
    So you are using JAVA, if you consult the developer's guide there is a section specifically addressing your question the ResultSet API should handle this via the formatted
    <b>Retrieving Result Sets
    ResultSet API</b>
    Note that the concept allows for more than two axes, however a two-dimensional, table-like data set makes the
    example easy to illustrate. On the columns axis, two members (“Store Cost” and ”Store Sales”) of the measures
    dimension have been selected; on the rows axis, three members (“Berlin,” ”Hamburg,” and ”Munich”) of the City level
    of a geographical hierarchy. The dataset has six cells:
    Cells provide four mandatory properties:
    • Value — supports all common column types, for example:
    o numeric types
    o dates
    o time values
    o strings
    o null
    • Data type — int value describing the data-type (see java.sql.Types)
    • Status — state of the cell (for example, error or null)
    <b>• Formatted value — a string representation of value</b>
    You can retrieve text in this manner.
    Do you want to be able to pass text as if it were a value as well?
    Cheers,
    Scott

  • Word processing within a text component

    Although this is a potentially great application, I am at present prevented from using it to create a website due to the lack, as far as I can determine, of any form of processing individual text within the text components e.g. making individual words or word groups bold or italic or giving them COLORS.
    I have large informatory text areas on my pages which need this sort of processing in order to avoid client eyestrain as well as my own.
    Of course one can get around this to some extent by using multiple components but for long texts this quickly becomes very tedious and error prone, especially if one wants to copy from another source.
    The Static Text component, which I presume is meant for this sort of text, in it's present simple form allows word wrap but no line formatting. The basic Text Area component (multiple lines) has no word wrap but does allow line formatting. However when one sets the Read Only property, it seems that any self created line formatting is duly destroyed. This is strangely not the case with the old Standard Mutliline Text Area component.
    I may be missing something but if not I hope that these features may yet be incorporated.
    Regards,
    Dave

    You can use static text to render pure HTML, just set "escape" property to false.
    Note that the HTML text must be well former.
    Regards.

  • How to create a text Component With Certain Properties

    I need to create a text component with the following properties:
    Has Capability to be italic, right/left aligned, have different background / foreground colors, and most importantly, the ability to have a fixed width and a height that is set by the amount of text in it (ie line wrapping expands the field vertically).
    It should be a simple exercise, but I cannot seem to figure out how to do it.

    Here is the correct syntax :
    private static JEditorPane constructPane(String text, int normWidth, int normHeight, boolean rightAlign, boolean italic,boolean isWhite) {
              JEditorPane pane = new JEditorPane();
              pane.setEditable(false);
              pane.setContentType("text/html");
              pane.setText(
                   "<html><head></head><body>"
                   + (italic?"<i>":"")
                   + "<table><COLGROUP><COL width=\""+normWidth+"\"><THREAD><tr><td valign=\"top\" align="+(rightAlign?"\"right\"":"\"left\"")+">"
                   + text+"</td></tr></table>"
                   + (italic?"</i>":"")
                   + "</body></html>");
              pane.setSize(normWidth,normHeight);
              if(isWhite)
                   pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1,0,1,0,Color.WHITE),BorderFactory.createEmptyBorder(0,1,0,1)));
                   pane.setForeground(Color.WHITE);
              else {
                   pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1,0,1,0,Color.BLACK),BorderFactory.createEmptyBorder(0,1,0,1)));
                   pane.setForeground(Color.BLACK);
              return pane;
         }

  • Passing parameter in a method

    hi i have a situation where i have to pass parameter to my method i don't what to pass the parameter define from the viewO because am not using parameter to query from the view,i just what to pass it to my procedure,my method is
                    public void submit_agr(String par_id,String dref_id,String tas_id,String agr_id){
                        ViewObject sub = this.findViewObject("AGR1");
                      i don't what to use this-> sub.setNamedWhereClauseParam("tas_id", tas_id); the tas_id is not in AGR1 VIEWO
                      // sub.
                        sub.executeQuery();
                        Row row = sub.first();
                        par_id = (String)row.getAttribute("par_id");
                        agr_id = (String)row.getAttribute("id");
                        callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new  Object[] {par_id,dref_id,tas_id,agr_id});
                    }

    i try this AM IN jDEVELOPER 11.1.2.1.0
                    public void submit_agr(String par_id,String dref_id,String tas_id,String agr_id){
                        ViewObject sub = this.findViewObject("AGR1");                 
                        Row row = sub.first();
                        sub.setNamedWhereClauseParam("tas_id", new Number(10));-how will i pass this to my procedure
                        sub.setNamedWhereClauseParam("dref_id", new Number(10));-how will i pass this to my procedure
                        par_id = (String)row.getAttribute("par_id");
                        agr_id = (String)row.getAttribute("id");
                        sub.executeQuery();
                        callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new  Object[] {par_id,dref_id,tas_id,agr_id});
                    }how will i pass the two prameter to my procedure
    Edited by: Tshifhiwa on 2012/07/01 3:14 PM

Maybe you are looking for

  • How to get the name of the subform

    Hi All, My form is designed in the below structure. masgterpage-->form1-->table                               -->subform How can i get the name of the subform dynamically(as it varies from page to page, but the rest of the structure is same). Please

  • Syntax error on include of Function Module (user exit)  EXIT_SAPLRSAP_002

    When I do a syntax check in the a routine within inlude ZXRSAU02 of FM EXIT_SAPLRSAP_002, I get an error.  This object has been in production so I must be doing the syntax check incorrectly. The error is 'Field i_t_data is unknown. It is neither in o

  • Storage bin Linkage

    Hi, We had done posting and valid documents are available and we can see the document showing the storage bin. For a material , storage location can u please share the associated tables link or logic to get the data for pick the storage bin in out pu

  • Urgent : Mass Upload of Element Links

    Hello, Can somebody pls suggest how to load Element links when it comes to mass upload? If the option is API then we would like to know how to pass people group segements as our link criteria is based on that. Regards, Gayatri

  • Error in the Hierarchy structure

    Hi All,      We faced error an hierarchy load. Error records written to application log.The level of the node ID 000284 does not suit the lev. of the higher lev. node. Help to solve this error. Thanks,