Help - Multiple same-class functions

I've been looking around the internet for a couple of days
now trying to find an answer to this question. My search has been
fruitless, so I've resorted to posting on a forum. Hopefully
someone here will be able to give me a clue...
I'm currently working for a company who uses ActionScript in
their Flash animations. Unfortunately, it seems that the people who
wrote the code are no longer with the company, so I'm stuck trying
to figure out what everything does. (Fortunately it's decently
commented). For the most part, everything has been
straightforwards, except this.
The problem is that before every single function declaration
is a re-declaration of the preceeding functions.
The code is a bit old, written in 2004 (I think) and it's
Actionscript 2.0 / 3.0, and anything like this won't compile.
By the way, I don't think this is a random typo/error thingy,
because it happens over 1400 times over of a bunch of classes.
Anyone have any ideas?
EDIT: Also, this code must have compiled at some point or
another, because the website currently WORKS. With everything from
the classes that now aren't compiling.
Example below:

854371 wrote:
its urgentOnly to you. Nobody here cares about your urgency. It's not relevant to the question. You're better off not mentioning it. You might think that if you mention that it's urgent, then people will answer more quickly. That will never, ever happen, I 100% promise you. It will either have no effect at all, or it will annoy people into not answering you when they would have otherwise.

Similar Messages

  • Help with SMTP class function with authentication

    My server is no longer supporting the php mail() functionality.  I need to use SMTP class function with authentication in my php code and they suggested this to replace it: http://www.yrhostsupport.com/index.php?/Knowledgebase/Article/View/101/2/smtp-class-functi on-with-authentication-in-php-code
    So I tried it, but can't get it to work. This is my test form:
    <form method="post" action="forms/sendmail-test2.php" onsubmit="return checkEmail(this);">
    <script type="text/javascript" language="JavaScript">
    </script>
    <fieldset><legend>Info</legend>
    <label> Name </label>
      <input type="text"
      name="name" size="30" maxlength="40"/><br />
    <label> <span class="redText">*</span> Email </label>
        <input name="email" type="text" size="30" maxlength="40"/>
        <br />
    <label><span class="redText">*</span> Message </label>
      <textarea cols="40" rows="5" name="message" type="text" /></textarea><br />
        </fieldset>
    <input type="reset" value="Reset" />
    <input type=submit value="Submit Form" />
    </fieldset>
    </form>
    This is sendmail-test2.php where the form goes. It won't send unless I comment out the first 10 lines.
    <?php
    include('Mail.php');
    //$to = "[email protected]";
    //$name = $_REQUEST['name'] ;
    //$email = $_REQUEST['email'] ;
    //$message = $_REQUEST['name'] ;
    //$headers = "From: $email";
    //$subject = " price quote";
    //$fields = array();
    //$fields{"name"} = "Name"; 
    //$fields{"email"} = "Email";
    //$fields{"message"} = "Message";
    $recipients = '[email protected]'; //CHANGE
    $headers['From']    = '[email protected]'; //CHANGE
    $headers['To']      = '[email protected]'; //CHANGE
    $headers['Subject'] = 'Test message';
    $body = 'Test message';
    // Define SMTP Parameters
    $params['host'] = 'levy.dnsbox25.com';
    $params['port'] = '25';
    $params['auth'] = 'PLAIN';
    $params['username'] = '[email protected]'; //CHANGE
    $params['password'] = 'xxxxxx'; //CHANGE
    /* The following option enables SMTP debugging and will print the SMTP
    conversation to the page, it will only help with authentication issues. */
    $params['debug'] = 'true';
    // Create the mail object using the Mail::factory method
    $mail_object =& Mail::factory('smtp', $params);
    // Print the parameters you are using to the page
    foreach ($params as $p){
          echo "$p<br />";
    // Send the message
    $mail_object->send($recipients, $headers, $body);
    ?>
    It used to work fine when I used
    $send = mail($to, $subject, $body, $headers);
    $send2 = mail($from, $subject2, $autoreply, $headers2);
    But they said I can't use it any more. I'm good with HTML and CSS but I don't know much about php. Thanks for any help integrating a from into this new code!

    Thanks, bregent. I changed it to this and it sends, but nothing shows up in the body except "Test message". How would I "insert the form fields' 'email' and 'name' and 'message' in the body"?
    <?php
    include('Mail.php');
    $to = "[email protected]";
    $name = $_REQUEST['name'] ;
    $email = $_REQUEST['email'] ;
    $message = $_REQUEST['name'] ;
    //$headers = "From: $email";
    $subject = " price quote";
    $fields = array();
    $fields{"name"} = "Name"; 
    $fields{"email"} = "Email";
    $fields{"message"} = "Message";
    $recipients = '[email protected]'; //CHANGE
    $headers['From']    = '[email protected]'; //CHANGE
    $headers['To']      = '[email protected]'; //CHANGE
    $headers['Subject'] = 'Test message';
    $body = 'Test message';
    $fields = array();
    $fields{"name"} = "Name"; 
    $fields{"email"} = "Email";
    $fields{"message"} = "Message";
    // Define SMTP Parameters
    $params['host'] = 'levy.dnsbox25.com';
    $params['port'] = '25';
    $params['auth'] = 'PLAIN';
    $params['username'] = '[email protected]'; //CHANGE
    $params['password'] = xxx'; //CHANGE
    /* The following option enables SMTP debugging and will print the SMTP
    conversation to the page, it will only help with authentication issues. */
    $params['debug'] = 'true';
    // Create the mail object using the Mail::factory method
    $mail_object =& Mail::factory('smtp', $params);
    // Print the parameters you are using to the page
    foreach ($params as $p){
          echo "$p<br />";
    // Send the message
    $mail_object->send($recipients, $headers, $body);
    ?>

  • Can We Use Multiple Edgehero Classes On The Same Element?

    Does anyone know if it is possible to add multiple Edgehero classes to the same element? More specifically, I would like to use RotateX and RotateY on a rectangle, but it only seems to do one or the other, adding both classes to the element doesn't make it rotate in both directions.

    Maybe check out the Star Wars demo to see if that would help.
    Rob got the idea from the one I made earlier and here is the code:
    sym.$('gradient').css('background', '-moz-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%)');
    sym.$('container').css('-moz-transform-origin', '50% 100%');
    sym.$('container').css('-moz-transform', 'perspective(250px) rotateX(25deg)');
    // Chrome and others
    sym.$('gradient').css('background', '-webkit-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%)');
    sym.$('container').css('-webkit-transform-origin', '50% 100%');
    sym.$('container').css('-webkit-transform', 'perspective(250px) rotateX(25deg)');
    // Internet Explorer
    sym.$('gradient').css('background', '-ms-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%)');
    sym.$('container').css('-ms-transform-origin', '50% 100%');
    sym.$('container').css('-ms-transform', 'perspective(250px) rotateX(25deg)');
    and the orginal file before edgeHero;
    https://app.box.com/s/068vx5x6lj5t2yydrx17

  • Multiple windows of the same class with a different argument

    Suppose I have a main window with a list of users. If I click on any one user, the "chat window" should open with the argument as that "user".
    If i click on another, a similar "chat window" should open but with a different user.
    I can't have so many stages because I don't know how many users are there.
    How do I open multiple windows of the same class but with a different argument?

    Here is a sample (opens, at random locations, a bunch of child windows parameterized by color).
    Could be simpler, but hopefully you get the gist.
    import java.util.Random;
    import javafx.application.Application;
    import javafx.geometry.Rectangle2D;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.layout.StackPane;
    import javafx.stage.*;
    public class ColoredStages extends Application {
      final String[] colors = { "firebrick", "palegreen", "azure", "chocolate", "goldenrod" };
      final Random random = new Random(42);
      Rectangle2D screenBounds;
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) {
        screenBounds = Screen.getPrimary().getVisualBounds();
        stage.setTitle("Primary");
        stage.setScene(new ColoredScene("cornsilk"));
        stage.show();
        for (String color : colors) {
          Stage coloredStage = new ColoredStage(stage, color);
          coloredStage.show();
      class ColoredStage extends Stage {
        ColoredStage(Stage owner, String color) {
          super();
          initOwner(owner);
          initStyle(StageStyle.UTILITY);
          setX(screenBounds.getMinX() + random.nextInt((int) screenBounds.getWidth()));
          setY(screenBounds.getMinY() + random.nextInt((int) screenBounds.getHeight()));
          setScene(new ColoredScene(color));
      class ColoredScene extends Scene {
        ColoredScene(String color) {
          super(new StackPane());
          StackPane layout = (StackPane) getRoot();
          layout.getChildren().addAll(new Label(color));
          layout.setStyle("-fx-font-size: 20px; -fx-padding: 30px; -fx-background-color: " + color);
    }

  • Can I use multiple p class="logos" tag with the same name within the same html page?

    I was told not to use <div class> tags too many times. I was using them for text, images, to clear floats, I basically built my website using multiple <div class> tags. So if I can't use multiple <div class> tags could I use <p class> tags multiple times in the same html page?
    I have a string of logos at the bottom of my webpage which will all be using the same css characteristics for all logos. Would this be the proper way to write the code:
    HTML
    <p class="logos">Logo1<a href="...></a></p>
    <p class="logos">Logo2<a href="...></a></p>
    <p class="logos">Logo3<a href="...></a></p>
    <p class="logos">Logo4<a href="...></a></p>
    <p class="logos">Logo5<a href="...></a></p>
    <p class="logos">Logo6<a href="...></a></p>
    CSS
    .logos {
    margin-left:10px;
    Here's my website: http://www.darbymanufacturing.com/test_website/index.html - this is the website built with all div class tags
    I restarted the website in order to write the code properly so that I don't come to errors when uploading on the server like I am having with the website link above.

    Instead of writing something like this -
    <p class="logos">Logo1<a href="...></a></p>
    <p class="logos">Logo2<a href="...></a></p>
    <p class="logos">Logo3<a href="...></a></p>
    <p class="logos">Logo4<a href="...></a></p>
    <p class="logos">Logo5<a href="...></a></p>
    <p class="logos">Logo6<a href="...></a></p>
    Why not have something like this -
    <div id="logodiv">
    <p>Logo1<a href="...></a></p>
    <p>Logo2<a href="...></a></p>
    <p>Logo3<a href="...></a></p>
    <p>Logo4<a href="...></a></p>
    <p>Logo5<a href="...></a></p>
    <p>Logo6<a href="...></a></p>
    </div>
    with CSS like this -
    #logodiv p { ... }

  • PLEASE help..class function not found..

    I am writing a simple email validation and I get a TON of errors.
    1) is Class function not found. on - function validateEmail();
    2) and 11 Undefined variable or class name: document .
    The code is listed below -
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <%
    function validateEmail();
    if (document.forms[0].EMAIL_ADDRESS.value.length != 0)
    if ( (document.forms[0].EMAIL_ADDRESS.value.indexOf("@") == -1) ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(0) == ".") ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(0) == "@") ||
    (document.forms[0].EMAIL_ADDRESS.value.length < 6) ||
    (document.forms[0].EMAIL_ADDRESS.value.indexOf(".") == -1) ||
    (document.forms[0].EMAIL_ADDRESS.charAt(document.forms[0].EMAIL_ADDRESS.value.indexOf("@")+1) == ".") ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(document.forms[0].EMAIL_ADDRESS.value.indexOf("@")-1) == ".") ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(0) == ' ') )
    alert ("Please enter valid email address");
    document.forms[0].EMAIL_ADDRESS.focus();
    document.forms[0].EMAIL_ADDRESS.select();
    return false;
    else
    return true;
    %>
    </head>
    -- lots of input fields with the last being -
    <input type="text" name=EMAIL_ADDRESS onBlur="validateEmail();"></td>
    ????

    When I remove tags <% %> all of the function ends up in html and thus on my page.
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    <%
    function validateEmail();
    if (document.forms[0].EMAIL_ADDRESS.value.length != 0)
    if ( (document.forms[0].EMAIL_ADDRESS.value.indexOf("@") == -1) ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(0) == ".") ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(0) == "@") ||
    (document.forms[0].EMAIL_ADDRESS.value.length < 6) ||
    (document.forms[0].EMAIL_ADDRESS.value.indexOf(".") == -1) ||
    (document.forms[0].EMAIL_ADDRESS.charAt(document.forms[0].EMAIL_ADDRESS.value.indexOf("@")+1) == ".") ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(document.forms[0].EMAIL_ADDRESS.value.indexOf("@")-1) == ".") ||
    (document.forms[0].EMAIL_ADDRESS.value.charAt(0) == ' ') )
    alert ("Please enter valid email address");
    document.forms[0].EMAIL_ADDRESS.focus();
    document.forms[0].EMAIL_ADDRESS.select();
    return false;
    else
    return true;
    %>
    </head>
    <body bgcolor="powderblue">
    <Form Name="My Form" Action=userInfoInsert.jsp Method=Post>
    <table border="0" width="100%">
    <tr>
    <td width="100%">
    <table border="0" width="100%">
    <tr>
    <td width="41%">First Name     <input type="text" name=FIRST_NAME ></td>
    <td width="59%">Last Name
    <input type="text" name=LAST_NAME ></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="100%">Address         
    <input type="text" name=Address ></td>
    </tr>
    <tr>
    <td width="100%">Address         
    <input type="text" name=Address ></td>
    </tr>
    <tr>
    <td width="100%">
    <table border="0" width="100%">
    <tr>
    <td width="32%">City            
       <input type="text" name=CITY size=10></td>
    <td width="18%">State
    <input type="text" name=STATE size=5></td>
    <td width="50%">Zip Code
    <input type="text" name=ZIP_CODE size=10 ></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td width="100%">Phone #         
    <input type="text" name=PHONE size="15" ></td>
    </tr>
    <tr>
    <td width="100%">SSN              
    <input type="text" name=SSN size="17" ></td>
    </tr>
    <tr>
    <td width="100%">
    <table border="0" width="100%">
    <tr>
    <td width="41%">Hint Question <input type="text" name=FIRST_NAME ></td>
    <td width="59%">Hint Answer <input type="text" name=LAST_NAME ></td>
    </tr>
    </table>
    </tr>
    <tr>
    <td width="100%">User Name     <input type="text" name=USER_NAME ></td>
    </tr>
    <tr>
    <td width="100%">Password        <input type="text" name=PASSWORD ></td>
    </tr>
    <tr>
    <td width="100%">Re-Password  <input type="text" name=RE_PASSWORD ></td>
    </tr>
    <tr>
    <td width="100%">Email Address
    <input type="text" name=EMAIL_ADDRESS onBlur="validateEmail();"></td>
    </tr>
    </table>
    <INPUT type=Submit Value=Submit>
    </form>
    </body>
    </html>

  • Can the same partner function be entered in the sales order more than once.

    Hi
    I know that as per standard same partner function cannot be entered more than once in Sales order.
    If somebody has tried ways to do this please share.
    THanks
    Alags

    Yes. You can have multiple Ship to Party, Bill to Parrty & Payer in Sales Order. But Sold to Party will have to Unique & single.
    This functionality of having multilpe Partners is widely used & just follow as Deepak suggested above & you too can have multiple Partners of same type in single Sales Order.
    But there has to be a strong Business case in doing so... say different Ship tp Party for different line items in Sales Order or different BIll to Party for some line Items in Sales Order.
    Hope this helps,
    Thanks,
    JIgnesh Mehta

  • How to convert the class in the one package to same class in the other pack

    How to convert the class in the one package to same class in the other package
    example:
    BeanDTO.java
    package cho3.hello.bean;
    public class BeanDTO {
    private String name;
    private int age;
    * @return
    public int getAge() {
         return age;
    * @return
    public String getName() {
         return name;
    * @param i
    public void setAge(int i) {
         age = i;
    * @param string
    public void setName(String string) {
         name = string;
    BeanDTO.java in other package
    package ch03.hello;
    public class BeanDTO {
    private String name;
    private int age;
    * @return
    public int getAge() {
         return age;
    * @return
    public String getName() {
         return name;
    * @param i
    public void setAge(int i) {
         age = i;
    * @param string
    public void setName(String string) {
         name = string;
    My converter lass lokks like
    public class BeanUtilTest {
         public static void main(String[] args) {
              try
                   ch03.hello.BeanDTO bean=new ch03.hello.BeanDTO();
              bean.setAge(10);
              bean.setName("mahesh");
              cho3.hello.bean.BeanDTO beanDto=new cho3.hello.bean.BeanDTO();
              ClassConverter classconv=new ClassConverter();
              //classconv.
              System.out.println("hi "+beanDto.getClass().toString());
              System.out.println("hi helli "+bean.toString()+" "+bean.getAge()+" "+bean.getName()+" "+bean.getClass());
              Object b=classconv.convert(beanDto.getClass(),(Object)bean);
              System.out.println(b.toString());
              beanDto= (cho3.hello.bean.BeanDTO)b;
              System.out.println(" "+beanDto.getAge()+" "+beanDto.getName() );
              }catch(Exception e)
                   e.printStackTrace();
    But its giving class cast exception. Please help on this..

    Do you mean "two different layers" as in separate JVMs or "two different layers" as in functional areas running within the same JVM.
    In either case, if the first class is actually semantically and functionally the same as the second (and they are always intended to be the same) then import and and use the first class in place of the second. That's beyond any question of how to get the data of the first into the second if and when you need to.
    Once you make the breakthrough and use one class instead of two I'd guess that almost solves your problem. But if you want to describe your architecture a little that would help others pin down want you're trying to do.

  • Passing values between methods in the same class

    Hi,
    How to pass internal tables or values between methods in the same class.
    How to check if the internal method in another method is initial or not.
    How to see if the method has already been executed.
    Thanks.

    Just declare the internal table as an attribute in the class - that way every method in this class has access to it.
    Since any method has access to all class attributes you can easily check if the internal table is initial or not.
    I am not aware of any standard functionality if a method has already been executed or not, one way would be to declare a class attribute for each method and set it once the method has been executed. That way every method in that class would know which method has already been executed or not.
    Hope that helps,
    Michael

  • Glassfish v3 ClassCastException for same class, at a List.get() command.

    Hello everyone,
    I am in the process of developing a small web application with JSF 2.0 and JPA, both of which I am not entirely familiar with. But thanks to Google and a lot of very dedicated experts, the Java and JSF forums have helped me with creating a basic form for entering and storing data. I am using Netbeans 6.8 which has glassfish V3 for the app server. However I have a problem where the auto-deploy in glass fish ends up giving me a ClassCastException for the same class, which after a bit of research on the net, seems to be a classloader problem.
    A related link http://72.5.124.102/thread.jspa?messageID=10119180 probably confirms the cause as a hot-deploy issue.
    My JSF page is created dynamically in the constructor of the managed bean, and it is here that I get the exception occasionally. A restart of the server solves the issue. Nevertheless, I would like to know if there is any other way to solve the classloader problem other than using a build.xml file as suggested in the forum link given above.
    I am posting a part of my code as well, so that if you think there a classloader problem in my code, you can let me know, so I can fix it.
    @ManagedBean(name = "CustomFields")
    @RequestScoped
    public class CustomFields {
        private String tableName;
        private List<UiSetup> dispFieldsList = new ArrayList();
        private HtmlPanelGrid customPanelSec = new HtmlPanelGrid();
        public HtmlPanelGrid getCustomPanelSec() {
            return customPanelSec;
        public void setCustomPanelSec(HtmlPanelGrid customPanelSec) {
            this.customPanelSec = customPanelSec;
        public String getTableName() {
            return tableName;
        public void setTableName(String tableName) {
            this.tableName = tableName;
        public CustomFields() {
            System.out.println("Invoked customFields backing bean");
            String callerBean = "";
            FacesContext context = FacesContext.getCurrentInstance();
            Application application = context.getApplication();
            tableName = context.getExternalContext().getRequestParameterMap().get("callerPage");
            callerBean = context.getExternalContext().getRequestParameterMap().get("backingBean");
            // This is a JPA contoller class for an entity that defines the custom fields that have to be enabled for this page.
            UiSetupJpaController fldsToShow = new UiSetupJpaController();
            dispFieldsList.clear();
            System.out.println("Did this1");
            // This function getDisplayFields gets the fields that have to be shown on the page.
            this.dispFieldsList = fldsToShow.getDisplayFields(tableName);
            System.out.println("Did this2");
            int totFields = this.dispFieldsList.size();
            System.out.println("Did this3");
            UiSetup us = this.dispFieldsList.get(totFields - 1);// This is where the error is thrown always.
            System.out.println("Did this4");
            customPanelSec.getChildren().clear();
            for (int i = 0; i < totFields; i++) {
                try {
                    HtmlPanelGrid fldLblGroup = new HtmlPanelGrid();
                    HtmlOutputLabel customLabel = (HtmlOutputLabel) application.createComponent(HtmlOutputLabel.COMPONENT_TYPE);
                    String labelName = dispFieldsList.get(i).getDisplayName();
                    customLabel.setValue(labelName);
                    String fieldName = dispFieldsList.get(i).getFieldName();
                    HtmlPanelGroup customField = (HtmlPanelGroup) application.createComponent(HtmlPanelGroup.COMPONENT_TYPE);
                    HtmlInputText customText = new HtmlInputText();
                    String valExp = "#{" + callerBean + "." + fieldName + "}";
                    customText.setId(fieldName);
                    customText.setValueExpression("value", createValueExpr(valExp, BigDecimal.class, context));
                    customField.getChildren().clear();
                    customField.getChildren().add(customText);
                    customPanelSec.getChildren().add(customLabel);
                    customPanelSec.getChildren().add(customField);
                }catch (Exception e) {
                    System.out.println(e.getMessage());
        private ValueExpression createValueExpr(String valexp, Class cls, FacesContext fcs) {
            return fcs.getApplication().getExpressionFactory().createValueExpression(fcs.getELContext(), valexp, cls);
    }The error message is as follows
    com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: karma.com.managedbeans.master.CustomFields.
    at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:193)
    at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
    at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:405)
    at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:267)
    Caused by: java.lang.ClassCastException: karma.com.model.ui.UiSetup cannot be cast to karma.com.model.ui.UiSetup
    at karma.com.managedbeans.master.CustomFields.<init>(CustomFields.java:397)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
    ... 82 moreRegards,
    Swati

    Thanks very much for your reply. I have implemented your suggestion of using a PostConstruct method with the @ManagedProperty to inject the values into the tableName and the callerBean properties. The good news is that the page is rendered correctly and I haven't encountered the exception the few times that I invoked the page.
    However, I can't be sure the issue is resolved, since, like I mentioned, the error is seemingly erratic and I don't quite know if it is not seen because of a genuine fix or because, well, its currently not in a mood to show up.
    There is just one more thing I would like to mention. I have said that the code fails at the List.get() line. However, its not happening because the list is empty. In fact the earlier lines are giving expected outputs and totFields value is set all right. Maybe this has nothing to do with the error, but I thought I will mention it all the same, in case it triggers another idea altogether.
    Thanks very much
    Regards
    Swati

  • How to run a class function on the click event ?

    Hi Tecs,
    i want tht when someone click on some paricular location on the form, then the class function must be called with some parameter, when someone click on some other location, the function should be called with different parameters.
    How this can be done , plz help.
    Thnx in advance.

    Almost every tag supports onclick .. For example h:panelGrid and even h:form.
    JSF<h:panelGrid onclick="document.getElementById('formId:hiddenActionId').click(); return false;">
        <h:form id="formId">
            <h:commandButton id="hiddenActionId" value="action" actionListener="#{myBean.action}" style="display: none;">
                <f:attribute name="param1" value="value1" />
                <f:attribute name="param2" value="value2" />
            </h:commandButton>
        </h:form>
    </h:panelGrid>MyBeanpublic void action(ActionEvent event) {
        String param1 = (String) event.getComponent().getAttributes().get("param1"); // returns "value1"
        String param2 = (String) event.getComponent().getAttributes().get("param2"); // returns "value2"
        // do your thing
    }[EDIT]You really cannot avoid JavaScript. Heck, JSF itself also generates a heap of JavaScript ;)
    Message was edited by:
    BalusC

  • Accessing a private variable from a public method of the same class

    can anyone please tell me how to access a private variable, declared in a private method from a public method of the same class?
    here is the code, i'm trying to get the variable int[][][] grids.
    public static int[][] generateS(boolean[][] constraints)
      private static int[][][] sudokuGrids()
        int[][][] grids; // array of arrays!
        grids = new int[][][]
        {

    Are you sure that you want to have everything static here? You're possibly throwing away all the object-oriented goodness that java has to offer.
    Anyway, it seems to me that you can't get to that variable because it is buried within a method -- think scoping rules. I think that if you want to get at that variable your program design may be under the weather and may benefit from a significant refactoring in an OOP-manner.
    If you need more specific help, then ask away, but give us more information please about what you are trying to accomplish here and how you want to do this. Good luck.
    Pete
    Edited by: petes1234 on Nov 16, 2007 7:51 PM

  • How to remove the rule or class function in CS5

    i need to know how to remove the rule or class function in CS5  at the bottom of the screen there are two options for formating HTML and Css when i click the HTML it only allows me to change the bold or italics or link something but when i click CSS it allows me to format how i want the paragraph aligned and the text size and font when i click on lets say changing the font size a box comes up asking me to name a rule so it applies it to everything else i type i want to know how to stop tht like edit everything on my own and if i use CS5 here will it be compatible with CS4 or CS3 at my skool plzz help ive been frustrated with this

    If I use CS5 here will it be compatible with CS4 or CS3 at my skool plzz help ive been frustrated with this
    Code is code.   It doesn't matter which product you use.
    i need to know how to remove the rule or class function in CS5
    You can't.  DW encourages you to use good coding methods, which means using CSS classes and to keep content (HTML) separate from styles (CSS).  For example, if you change font-size on p tags like so:
         p {font-size: 38px}
    Every paragraph will have 38px sized text.
    If you want to apply a special style to just a portion of your text, you must define a CSS class name like so:
    .foo {
    font-size: 38px;
    color: red;
    HTML:
    <p>This is normal paragraph text <span class="foo"> And this is very big and red.</span></p>
    This is normal paragraph text And this is very big and red. 
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    Message was edited by: Nancy O.  -- unfortunately, this forum doesn't support Raw HTML with inline styles. You'll need to paste my code examples into your DW page to see the effect.

  • Need some help with a remove function

    Design and code a program that will maintain a list of product names. Use a String type to represent the product name and an array of strings to implement the list. Your program must implement the following methods:
    Add a product to the list
    Remove a product from the list
    Display then entire list
    Find out if a particular product is on the list.
    You need to create a command command loop with a menu() function. The program must continue asking for input until the user stops.
    This is the assignment and this is what I have so far. I need some help writing the remove function.
    Thanks
    * Title: SimpleSearchableList.java
    * Description: this example will show a reasonably efficient and
    * simple algorithm for rearranging the value in an array
    * in ascending order.
    public class SimpleSearchableList {
         private static String[] List = new String[25]; //These variables (field variables)
         private static int Size; //are common to the entire class, but unavailable
         //except to the methods of the class...
         public static void main(String[] args)
              String Cmd;
              for(;;) {
                   Menu();
                   System.out.print("Command: ");
                   Cmd = SimpleIO.inputString();
                   if(Cmd.equals("Quit"))
                        break;
                   else if(Cmd.equals("Fill"))
                        FillList();
                   else if(Cmd.equals("Search"))
                        SearchList();
                   else if(Cmd.equals("Show"))
                        ShowList();
                   else if(Cmd.equals("Remove"))
                        Remove();
         //Tells you what you can do...
         public static void Menu()
              System.out.println("Choices..................................");
              System.out.println("\tFill to Enter Product");
              System.out.println("\tShow to Show Products");
              System.out.println("\tSearch to Search for Product");
              System.out.println("\tRemove a Product");
              System.out.println("\tQuit");
              System.out.println(".........................................");
         //This method will allow the user to fill an array with values...
         public static void FillList()
              int Count;
              System.out.println("Type Stop to Stop");
              for(Count = 0 ; Count < List.length ; Count++)
                   System.out.print("Enter Product: ");
                   List[Count] = SimpleIO.inputString();
                   if(List[Count].equals("Stop"))
                        break;
              Size = Count;
         //This method will rearrange the values in the array so that
         // go from smallest to largest (ascending) order...
         public static void SearchList()
              String KeyValue;
              boolean NotFoundFlag;
              int Z;
              System.out.println("Enter Product Names Below, Stop To Quit");
              while(true)
                   System.out.print("Enter: ");
                   KeyValue = SimpleIO.inputString();
                   if(KeyValue.equals("Stop")) //Note the use of a method for testing
                        break; // for equality...
                   NotFoundFlag = true; //We'll assume the negative
                   for(Z = 0 ; Z < Size ; Z++)
                        if(List[Z].equals(KeyValue)) {
                             NotFoundFlag = false; //If we fine the name, we'll reset the flag
              System.out.println(List[Z] + " was found");
                   if(NotFoundFlag)
                        System.out.println(KeyValue + " was not found");     
         //This method will display the contents of the array...
         public static void ShowList()
              int Z;
              for(Z = 0 ; Z < Size ; Z++)
                   System.out.println("Product " + (Z+1) + " = " + List[Z]);
         public static void Remove()
    }

    I need help removing a product from the arrayYes. So what's your problem?
    "Doctor, I need help."
    "What's wrong?"
    "I need help!"
    Great.
    By the way, you can't remove anything from an array. You'll have to copy the remaining stuff into a new one, or maybe maintain a list of "empty" slots. Or null the slots and handle that. The first way will be the easiest though.

  • Help needed with printf function!!!!

    public class Try
    {public static void main (String[] args)
    {int a;
    String b;
    a = 000002;
    b = "JSmith";
    System.out.printf(b + "%d", a);
    }}I need a help with the printf function.
    The result of this small excercise that I just made is:
    Jsmith2
    How do I make it so that the zeros is also displayed? (using the printf)
    I want it to look like this: Jsmith000002
    Thank you in advance

    TrySystem.out.printf(b + "%06d", a);(I don't have a compiler here so I haven't tested this).
    The "6" is the width - the minimum number of characters that will be
    printed and the "0" (it's a zero) is a flag indicating that the output should
    be padded with zeros.
    You should also note that the value of a is two. It doesn't matter whether
    you say a=2; or a=0002; - a is still just plain two.

Maybe you are looking for

  • How do I reduce size of PDF?

    The pdf for my community newsmagazne has 16 pages. When I send it to the company which prints it, I get the message - PDF is 40.7 MB - exceeds 20.0 MG used by this server. Print size is 100%. I send PDF as Best - Better is not good enough. What can I

  • Planning Layout: Environment-Specific Attributes

    Hello, In the following link, I find information about attributes in a planning layout: http://help.sap.com/saphelp_sem60/helpdata/en/38/021c0d3a5c473392a7147b941541b6/frameset.htm Does somebody know where I could change these attributes? Thanks for

  • Problem in check table

    hi all, i have a table.i mapped field of that table to check table field.check table has 5 columns.out of which one is primary key.so when i am using first table colume in my application it is showing only primary key values of check table(help).but

  • Epson R1800 Unable to Print Borderless 4x6

    Maybe this is too simple a task for this printer, but after updating to the Snow Leopard drivers I can't get a borderless 4x6 out of the printer. It is printing with a border and cutting off the image. Should this be that difficult? I am using epson

  • How to speed up Dynamic Link? What Hardware will improve this?

    I'm currently using AE and PP CS6 with Dynamic Link and rendering out in Media Encoder is very slow. I am not using my computers full power, only about 25% CPU and half of ram. What other components could speed this up? SSD? Rendering on GPU?