How to get subclass method in an inheritance?

Hi guys,
I got the following classes:
public abstract class Animal {
     private Long id;
     private String name;
     public Long getId() {return id;}
     public void setId(Long id) {this.id = id;}
     public String getName() {return name;}
     public void setName(String name) {this.name = name;}
     public abstract void makeSound();
public class Cat extends Animal {
     private String nickName;
     public void makeSound() {
          System.out.println("Miaaau");
     public String getNickName() {return nickName;}
     public void setNickName(String nickName) {this.nickName = nickName;}
try to retrieve from database:
          List animals = sess.find("from " + Cat.class.getName());
          for (Iterator it = animals.iterator(); it.hasNext();) {
                    Animal animal = (Animal) it.next();
                    System.out.println(     "Animal '" + animal.getName() +
                                             "' its class is: " + animal.getClass().getName());
                    System.out.print("Makes sound: ");
                    animal.makeSound();
                    Class cls = animal.getClass();
               try {
               cls = Class.forName("tutorial.inheritance.tableperhierarchy.Cat");
               } catch (ClassNotFoundException e) {
               System.out.println("ClassNotFoundException");
I need to access subclass method where the subclass classpath (tutorial.inheritance.tableperhierarchy.Cat) will only be know at runtime. Pls help, Thanks !
regards,
Mark

I just need to know how to cast a class dynamically
at runtime instead of manual casting it like:
Cat cat = new Cat();This is not a cast. Why do you mean?
/Kaj

Similar Messages

  • How to get protected method ?

    I thought i can get protected method of my class when calling a Class.getMethod(String, Class []) in another class which inside the same package. However, it seem that i can't do that because it throw me a NoSuchMethodException when the method was protected. I thought all classes in same package can access the protected methods or fields of each other ??? Why ?
    So, how i'm able to get the protected method in runtime ? (Hopefully no need to do anything with the SecurityManager)

    It is working
    Pls try the following program ...
    public class p1 {
    public static void main(String as[]) {
    p2 ps2 = new p2();
    ps2.abc();
    class p2 {
    protected void abc() {
    System.out.println("Hello");
    regards,
    namanc

  • How to get main method running in JavaApplet?

    We're currently building a Java Applet with JBuilder5. We can get the event handlers to work, but the we can't get the main method running. What is the problem? Any suggestions?
    Thanks for any helps!
    Miska

    I've searched the tutorials, but they don't say anything to me. Here's the code, it's a bit long but anyway... Could you tell what I should do next? How to use the threads and so on...
    Here's the code:
    package simu;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    public class Simulaattori extends Applet {
    boolean isStandalone = false;
    Button SIMtilaButton = new Button();
    Button VNStilaButton = new Button();
    Button kaasuButton = new Button();
    Button jarruButton = new Button();
    Label asetuslabel = new Label();
    TextField asetusarvoTextField = new TextField();
    Button asetusplusButton = new Button();
    Button asetusmiinusButton = new Button();
    Label nollaatrippilabel = new Label();
    Label trippilabel = new Label();
    Label matkalabel = new Label();
    Button ClrButton = new Button();
    TextField trippimatkaTextField = new TextField();
    TextField kokomatkaTextField = new TextField();
    Label nopeuslabel = new Label();
    TextField nopeusTextField = new TextField();
    Label KaasuJaJarrulabel = new Label();
    TextField kaasujajarruTextField = new TextField();
    /**Get a parameter value*/
    public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
    (getParameter(key) != null ? getParameter(key) : def);
    //Muuttujat
    boolean isSIM_ON;
    boolean isVNS_ON;
    boolean OnkoPoljettu;
    double asetusarvo;
    double voima;
    /**Construct the applet*/
    public Simulaattori() {
    isSIM_ON = false;
    isVNS_ON = false;
    OnkoPoljettu = false;
    voima = 0;
    asetusarvo = 0;
    DisableButtons_SimOff();
    /**Initialize the applet*/
    public void init() {
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() throws Exception {
    SIMtilaButton.setLabel("Sim ON/OFF");
    SIMtilaButton.setBounds(new Rectangle(12, 8, 112, 27));
    SIMtilaButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    SIMtilaButton_actionPerformed(e);
    this.setBackground(new Color(20, 197, 230));
    this.setLayout(null);
    VNStilaButton.setLabel("VNS ON/OFF");
    VNStilaButton.setBounds(new Rectangle(12, 46, 112, 29));
    VNStilaButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    VNStilaButton_actionPerformed(e);
    asetuslabel.setFont(new java.awt.Font("Serif", 1, 18));
    asetuslabel.setText("Asetusarvo:");
    asetuslabel.setBounds(new Rectangle(20, 99, 93, 17));
    asetusarvoTextField.setBounds(new Rectangle(19, 123, 94, 26));
    asetusplusButton.setLabel("+");
    asetusplusButton.setBounds(new Rectangle(19, 164, 44, 27));
    asetusplusButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    asetusplusButton_actionPerformed(e);
    asetusmiinusButton.setLabel("-");
    asetusmiinusButton.setBounds(new Rectangle(71, 164, 42, 27));
    asetusmiinusButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    asetusmiinusButton_actionPerformed(e);
    nollaatrippilabel.setFont(new java.awt.Font("Serif", 1, 18));
    nollaatrippilabel.setText("Nollaa trippi:");
    nollaatrippilabel.setBounds(new Rectangle(170, 10, 112, 22));
    trippilabel.setBounds(new Rectangle(170, 43, 112, 22));
    trippilabel.setText("Trippimittari");
    trippilabel.setFont(new java.awt.Font("Serif", 1, 18));
    matkalabel.setBounds(new Rectangle(170, 113, 112, 22));
    matkalabel.setText("Matkamittari");
    matkalabel.setFont(new java.awt.Font("Serif", 1, 18));
    ClrButton.setCursor(null);
    ClrButton.setFont(new java.awt.Font("Dialog", 0, 8));
    ClrButton.setLabel("CLR");
    ClrButton.setBounds(new Rectangle(282, 7, 52, 28));
    ClrButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    ClrButton_actionPerformed(e);
    trippimatkaTextField.setBounds(new Rectangle(170, 71, 102, 26));
    kokomatkaTextField.setBounds(new Rectangle(170, 140, 102, 26));
    nopeuslabel.setFont(new java.awt.Font("Serif", 1, 18));
    nopeuslabel.setText("Nopeusmittari");
    nopeuslabel.setBounds(new Rectangle(170, 188, 112, 22));
    nopeusTextField.setBounds(new Rectangle(170, 220, 102, 26));
    KaasuJaJarrulabel.setFont(new java.awt.Font("Serif", 1, 20));
    KaasuJaJarrulabel.setText("Kaasu & Jarru");
    KaasuJaJarrulabel.setBounds(new Rectangle(95, 285, 136, 26));
    kaasujajarruTextField.setBounds(new Rectangle(97, 317, 125, 27));
    kaasuButton.setLabel("Kaasu");
    kaasuButton.setBounds(new Rectangle(256, 282, 105, 29));
    kaasuButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    kaasuButton_actionPerformed(e);
    jarruButton.setBounds(new Rectangle(255, 317, 105, 29));
    jarruButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jarruButton_actionPerformed(e);
    jarruButton.setLabel("Jarru");
    this.add(SIMtilaButton, null);
    this.add(VNStilaButton, null);
    this.add(asetuslabel, null);
    this.add(asetusarvoTextField, null);
    this.add(asetusplusButton, null);
    this.add(asetusmiinusButton, null);
    this.add(nollaatrippilabel, null);
    this.add(trippilabel, null);
    this.add(ClrButton, null);
    this.add(trippimatkaTextField, null);
    this.add(matkalabel, null);
    this.add(kokomatkaTextField, null);
    this.add(nopeuslabel, null);
    this.add(nopeusTextField, null);
    this.add(KaasuJaJarrulabel, null);
    this.add(kaasujajarruTextField, null);
    this.add(kaasuButton, null);
    this.add(jarruButton, null);
    /**Get Applet information*/
    public String getAppletInfo() {
    return "Applet Information";
    /**Get parameter info*/
    public String[][] getParameterInfo() {
    return null;
    void SIMtilaButton_actionPerformed(ActionEvent e) {
    if (isSIM_ON) {
    DisableButtons_SimOff();
    isSIM_ON = false;
    else {
    EnableButtons_SimOn();
    isSIM_ON = true;
    void VNStilaButton_actionPerformed(ActionEvent e) {
    if (isVNS_ON) {
    isVNS_ON = false;
    DisableButtons_VNSOff();
    else {
    isVNS_ON = true;
    EnableButtons_VNSOn();
    //asetusarvoksi nykyinen nopeus
    asetusarvo = Nopeusmittari.AnnaNopeus();
    void ClrButton_actionPerformed(ActionEvent e) {
    //tripin nollaus
    Trippimittari.NollaaMittari();
    void asetusplusButton_actionPerformed(ActionEvent e) {
    asetusarvo = asetusarvo + 1;
    void asetusmiinusButton_actionPerformed(ActionEvent e) {
    asetusarvo = asetusarvo - 1;
    void kaasuButton_actionPerformed(ActionEvent e) {
    if (voima >= 0 && voima <= 90) {
    voima = voima + 10;
    else if (voima < 0) {
    voima = 0;
    //kaasun painaminen lopetaa vakionopeuden s��d�n
    isVNS_ON = false;
    void jarruButton_actionPerformed(ActionEvent e) {
    if (voima >= -90 && voima <= 0) {
    voima = voima - 10;
    //kaasujajarruTextField.setText(Double.toString(voima));
    else if (voima > 0) {
    voima = 0;
    //kaasujajarruTextField.setText(Double.toString(voima));
    //jarrun painaminen lopettaa vakionopeuden s��d�n
    isVNS_ON = false;
    void DisableButtons_SimOff() {
    SIMtilaButton.setEnabled(true);
    VNStilaButton.setEnabled(false);
    ClrButton.setEnabled(false);
    asetusplusButton.setEnabled(false);
    asetusmiinusButton.setEnabled(false);
    kaasuButton.setEnabled(false);
    jarruButton.setEnabled(false);
    void EnableButtons_SimOn() {
    SIMtilaButton.setEnabled(true);
    VNStilaButton.setEnabled(true);
    ClrButton.setEnabled(true);
    asetusplusButton.setEnabled(false);
    asetusmiinusButton.setEnabled(false);
    jarruButton.setEnabled(true);
    kaasuButton.setEnabled(true);
    void DisableButtons_VNSOff() {
    asetusmiinusButton.setEnabled(false);
    asetusplusButton.setEnabled(false);
    void EnableButtons_VNSOn() {
    asetusmiinusButton.setEnabled(true);
    asetusplusButton.setEnabled(true);
    public double AnnaVoima() {
    return voima;
    public boolean CheckPolkimet() {
    return OnkoPoljettu;
    public double AnnaAsetusarvo() {
    return asetusarvo;
    public boolean OnkoSIM_ON() {
    return isSIM_ON;
    public boolean OnkoVNS_ON() {
    return isVNS_ON;
    public void Alkutilaan() {
    isSIM_ON = false;
    isVNS_ON = false;
    OnkoPoljettu = false;
    voima = 0;
    asetusarvo = 0;
    DisableButtons_SimOff();
    public void NaytaNopeus(double nopeus) {
    nopeusTextField.setText(Double.toString(nopeus));
    public void NaytaKokoMatka(double matka) {
    kokomatkaTextField.setText(Double.toString(matka));
    public void NaytaTrippiMatka(double trippimatka) {
    trippimatkaTextField.setText(Double.toString(trippimatka));
    public void NaytaVoima() {
    kaasujajarruTextField.setText(Double.toString(voima));
    //P��OHJELMA
    public static void main(String[] args) {
    //Luodaan oliot
    Simulaattori simulaattori = new Simulaattori();
    Saadin saadin = new Saadin();
    Matkamittari matkamittari = new Matkamittari();
    Trippimittari trippimittari = new Trippimittari();
    Nopeusmittari nopeusmittari = new Nopeusmittari();
    Malli malli = new Malli();
    simulaattori.asetusmiinusButton.setEnabled(true);
    while (true) {
    simulaattori.Alkutilaan();
    while (simulaattori.OnkoSIM_ON()) {
    long alkuaika = System.currentTimeMillis();
    simulaattori.trippimatkaTextField.setText("TESTI");
    if (simulaattori.OnkoVNS_ON()) {
    //v�litet��n voima mallille, s��din laskee voiman
    malli.laske_nopeus( Saadin.LaskeVoima() );
    nopeusmittari.LaskeNopeus();
    matkamittari.LaskeMatka();
    trippimittari.LaskeMatka();
    simulaattori.NaytaNopeus(nopeusmittari.AnnaNopeus());
    simulaattori.NaytaKokoMatka(matkamittari.AnnaMatka());
    simulaattori.NaytaTrippiMatka(trippimittari.AnnaMatka());
    simulaattori.NaytaVoima();
    }else {
    //v�litet��n voima mallille
    malli.laske_nopeus((int) (simulaattori.AnnaVoima()) );
    nopeusmittari.LaskeNopeus();
    matkamittari.LaskeMatka();
    trippimittari.LaskeMatka();
    simulaattori.NaytaNopeus(nopeusmittari.AnnaNopeus());
    simulaattori.NaytaKokoMatka(matkamittari.AnnaMatka());
    simulaattori.NaytaTrippiMatka(trippimittari.AnnaMatka());
    long loppuaika = System.currentTimeMillis();
    long suoritusaika = loppuaika - alkuaika;
    while (suoritusaika < 100) {
    loppuaika = System.currentTimeMillis();
    suoritusaika = loppuaika - alkuaika;
    } //end while (simulaattori.OnkoSIM_ON())
    } //end while(1)
    A MAJOR THANK YOU if you can bear me with this...
    Miska

  • How to get the method names in a class

    hi  friends,
    Could any of you tell me the report or function module  to display all the method names in a given class.
    thanks in advance.
    regards,
    kumar

    Hi Kumar ,
    Open ur class in SE24 transaction ,there is a tab for methods ..
    u'll get the list of methods form there ... n in source u'll get their operative details
    Regards
    Renu

  • How to get the child class in inheritance?

    hi,
    if I have a store for renting videos .. and I have Video class (parent) and two (child) classes DVD and Cassete which they are extend the video class.
    And the user wants to rent a DVD which is the child, how do I do that? can I write just getDVD() as simple as that or maybe I need to use a keyword like "getinstance of DVD " or something I don't know how to do this.
    class Video have attributes like title, date of production and director.
    I'm not good in inheritance help please.
    thanks

    georgemc wrote:
    DrLaszloJamf wrote:
    Post a SSCCE: http://mindprod.com/jgloss/sscce.html
    You're not the boss of me ;-)Actually, I haven't stopped to count, but most of the time the poster never bothers to write a sample program. If fact, if I weren't such a softie, I would make that an absolute requirement for any further help. Too often, you are just shooting in the dark and 50 replies later the question is still vague.

  • How to get a method to call the correct passed object in the constructor

    I have 2 constructors for a certain object:
    public class ABC{
    //variables
    private DEF def;
    private GHI ghi;
    public ABC(DEF def){
    this.def = def;
    someMethod();
    public ABC(GHI ghi){
    this.ghi = ghi;
    someMethod();
    }Now, this someMethod() references / calls a method from the 2 classes passed in the constructor say def.getSome() and ghi.getSome().
    Depending on which constructor is used, it should call the respective xxx.getSome(). Do I need to write 2 someMethod()s or is there a way that one method will call the proper xxx.getSome() ?
    Thanks.....

    Hi
    Following the example may be help to you call correct method,
    // Interface QuizMaster
    public interface QuizMaster {
         public String popQuestion();
    // Class StrutsQuizMaster
    public class StrutsQuizMaster implements QuizMaster{
         public String popQuestion() {
              return "Are you new to Struts?";
    // Class SpringQuizMaster
    public class SpringQuizMaster implements QuizMaster{
         public String popQuestion() {
              return "Are you new to Spring?";
    // Class QuizMasterService
    public class QuizMasterService {
         QuizMaster quizMaster;
         public QuizMasterService(SpringQuizMaster quizMaster){
              this.quizMaster = quizMaster;
         public QuizMasterService(StrutsQuizMaster quizMaster){
              this.quizMaster = quizMaster;
         public void askQuestion()
              System.out.println(quizMaster.popQuestion());
    // QuizProgram
    public class QuizProgram {
         public static void main(String[] args) {
              // Option : 1
    // StrutsQuizMaster quizMaster = new StrutsQuizMaster();
    // Option : 2
    SpringQuizMaster quizMaster = new SpringQuizMaster();
              QuizMasterService quizMasterService = new QuizMasterService(quizMaster);                    
              quizMasterService.askQuestion();
    here you can create object of StrutsQuizMaster or SpringQuizMaster and pass into the QuizMasterService object constructor, base on the object correct method will be called.

  • How to get getDBTransaction() method in applicationmoduleImpl class

    Hi, I am using jdev 11.1.1.5.0 and I want to use getDBTransaction() at application module impl class please suggest.
    Thanks in advance

    getDBTransaction() :-)
    http://docs.oracle.com/cd/E21043_01/apirefs.1111/e10653/oracle/jbo/server/ApplicationModuleImpl.html#getDBTransaction%28%29
    Anil Bajpai wrote:
    Hi, I am using jdev 11.1.1.5.0 and I want to use getDBTransaction() at application module impl class please suggest.
    Thanks in advance

  • How to get the subclass from a super class( or interface)

    hi,
    I want to get subclass from a super class (or a interface), how to do that? the subclass of a interface means the class implementing the interface.
    for example;
    List ls;
    I want to get the subclass of ls, i.e., LinkedList, Stack, Vector......
    AbstractList al;
    the subclass of al, i.e., ArrayList, Vector.......
    thanks
    Aiwu

    List ls = new ArrayList();Since ls has been declared as a List we can only use List methods
    with it. This is a good thing because we might later want to change
    it to some other sort of List.
    I want to get subclass from a super class (or a interface), how to do
    that?The instance of the subclass declared above did not really come
    from the super class. A class "knows nothing" about its
    subclasses: many sub classes would not even exist at the time
    the class was written.

  • How to get selection criteria value in method IF_POWL_FEEDER~HANDLE_ACTION

    hi:
    As you know, we could get the leading selected POWL result data through parameter  c_selected and  c_selected in this method.
    but moreever, I want to get the selection criterai values in this method too just like the paramter i_selcrit_values in the method IF_POWL_FEEDER~GET_OBJECTS, how to do it?
    I have tried to define a attribute in my POWL class and save i_selcrit_values into this attribute in the method IF_POWL_FEEDERGET_OBJECTS, but in method IF_POWL_FEEDERHANDLE_ACTION, this attribute is still empty, so this workaround failed.
    thanks.

    hi guys:
    I have founded how to do it:
    METHOD get_selcrit.
      DATA ls_query TYPE powl_query_sty.
      DATA lt_selcrit TYPE rsparams_tt.
      FIELD-SYMBOLS <ls_selcrit> LIKE LINE OF lt_selcrit.
      CALL METHOD cl_powl_runtime_services=>get_current_query
        RECEIVING
          rs_query = ls_query.
      CALL METHOD cl_powl_query_accessor=>get_cached_selcrit
        EXPORTING
          i_query     = ls_query-query
        IMPORTING
          e_crit_para = lt_selcrit.
      READ TABLE lt_selcrit WITH KEY selname = iv_selname
        ASSIGNING <ls_selcrit>.
      IF <ls_selcrit> IS ASSIGNED.
        ev_selcrit = <ls_selcrit>-low.
      ENDIF.
    ENDMETHOD.

  • How to get the reference of the cell id in validate method in adf

    Hi All,
    I am using Jdeveloper 11.1.1.2 and i am using custom validator where i have registered the validator in facesconfig.xml.I need to know how can i get the ID of the inputtext box which is present in the hierarchy as Panel Header->Table->column->textbox :-
    Below is my custom validator class source , please tell me how to get the reference of the textbox which is present in such hierarchy.:-
    package validator;
    import java.io.Serializable;
    import java.util.Date;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.validator.Validator;
    import javax.faces.validator.ValidatorException;
    import oracle.adf.view.rich.component.rich.input.RichInputDate;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adfinternal.view.faces.bi.util.JsfUtils;
    public class ValidateConversion implements Serializable, Validator {
    public ValidateConversion() {
    super();
    public void validate(FacesContext facesContext, UIComponent uIComponent,
    Object object) throws ValidatorException {
    System.out.println("*************");
    System.out.println((String)object);
    //get component id by get("AttributeName");
    String conversionComponentId = (String)uIComponent.getAttributes().get("UncommittedOrder_PH:t7:it14");
    System.out.println("conversionComponentId=" + conversionComponentId);
    RichInputText conversionComponent = (RichInputText)uIComponent.findComponent(conversionComponentId);
    Integer conversion = (Integer)conversionComponent.getValue();
    Integer quantityInBags = (Integer)object;
    //get labels from the two inputDate component.
    String conversionLabel = conversionComponent.getLabel();
    String quantityInBagsLabel = ((RichInputText)uIComponent).getLabel();
    Integer remainder = (quantityInBags % conversion);
    //throw error if valiation fails
    if (remainder > 0) {
    throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
    "The " + quantityInBagsLabel + " should be in multiples of" + conversion +".",
    null));
    Thanks,
    Plese reply!!!

    Thanks Jabr,
    This is my jsff page source and i need to find the reference of it14 which is the textbox :-
    <af:panelGroupLayout id="pgl1" styleClass="AFStretchWidth">
    <af:panelHeader text="Results" id="Results_PH" size="1">
    <af:table value="#{bindings.queryProductResponseType.collectionModel}"
    var="row"
    rows="#{bindings.queryProductResponseType.rangeSize}"
    emptyText="#{bindings.queryProductResponseType.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.queryProductResponseType.rangeSize}"
    rowBandingInterval="1"
    filterModel="#{bindings.queryProductResponseTypeQuery.queryDescriptor}"
    queryListener="#{bindings.queryProductResponseTypeQuery.processQuery}"
    filterVisible="true" varStatus="vs" id="ResultTable_t"
    width="99%" partialTriggers="::cb1 ::cb2 ::cb3 it14"
    binding="#{viewScope.GrowerOrderBean.resultTable}"
    columnStretching="last" rowSelection="multiple"
    sortListener="#{viewScope.GrowerOrderBean.sortResultTable_action}"
    autoHeightRows="8" first="0"
    inlineStyle="height:196px;margin:10px"
    selectionListener="#{viewScope.GrowerOrderBean.resultRowSelect_action}">
    <af:column filterable="false" sortable="false" headerText="Select"
    id="c9" width="55" rendered="false"
    filterFeatures="caseInsensitive">
    <div align="center">
    <af:selectBooleanCheckbox value="#{row.bindings.booleanFlag.inputValue}"
    label="#{bindings.queryProductResponseType.hints.booleanFlag.label}"
    required="#{bindings.queryProductResponseType.hints.booleanFlag.mandatory}"
    shortDesc="#{bindings.queryProductResponseType.hints.booleanFlag.tooltip}"
    id="it19" autoSubmit="true">
    <f:validator binding="#{row.bindings.booleanFlag.validator}"/>
    </af:selectBooleanCheckbox>
    </div>
    </af:column>
    <!-- START of column created by SYSTIME -->
    <af:column sortProperty="quantity" headerText="Quantity in Bags" filterFeatures="caseInsensitive"
    id="c54" rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterable="true" sortable="true">
    <af:inputText label="Quantity in Bags" id="it14"
    partialTriggers="it19" autoSubmit="true"
    readOnly="#{row.activeYN == 'N' or row.availability &lt; 0 or row.availability ==0}"
    valueChangeListener="#{viewScope.GrowerOrderBean.compare}">
    <af:validateLongRange id="RangeCheck_Val1" minimum="1"
    maximum="#{row.availability * row.conversion}"
    messageDetailNotInRange="You have entered a quantity more than is available. Quantity entered must be in the range of {2} to {3}"
    messageDetailMinimum="Minimum {0} allowed is {2}"
    messageDetailMaximum="Maximum {0} allowed is {2}"
    hintNotInRange="#{'Quantity In Bags to Order'}"/>
    <af:validateRegExp pattern="^[1-9]+[0-9]*$"
    messageDetailNoMatch="Quantity In Bags must be in whole number format."/>
    <f:validator validatorId="custom.conversionValidator"/>
    </af:inputText>
    </af:column>
    <!-- END of column created by SYSTIME -->
    <af:column sortProperty="quantity" filterable="true"
    sortable="true" headerText="Quantity" id="c3"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" visible="false">
    <div align="center" >
    <af:inputText value="#{row.bindings.quantity.inputValue}"
    label="#{bindings.queryProductResponseType.hints.quantity.label}"
    required="#{bindings.queryProductResponseType.hints.quantity.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.quantity.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.quantity.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.quantity.tooltip}"
    id="it5" partialTriggers="it19"
    readOnly="#{row.activeYN == 'N' or row.availability &lt; 0 or row.availability ==0}">
    <f:validator binding="#{row.bindings.quantity.validator}"/>
    <af:validateLongRange id="RangeCheck_Val" minimum="1"
    maximum="#{row.bindings.availability.inputValue}"
    messageDetailNotInRange="You have entered a quantity more than is available. Quantity entered must be in the range of {2} to {3}"
    messageDetailMinimum="Minimum {0} allowed is {2}"
    messageDetailMaximum="Maximum {0} allowed is {2}"
    hintNotInRange="#{'Quantity to Order'}"/>
    <af:validateRegExp pattern="^[1-9]+[0-9]*$"
    messageDetailNoMatch="Quantity must be in whole number format."/>
    </af:inputText>
    </div>
    </af:column>
    <af:column sortProperty="brand" filterable="true" sortable="true"
    headerText="Brand" id="c10" width="80"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" displayIndex="-1">
    <af:inputText value="#{row.bindings.brand.inputValue}"
    label="#{bindings.queryProductResponseType.hints.brand.label}"
    required="#{bindings.queryProductResponseType.hints.brand.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.brand.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.brand.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.brand.tooltip}"
    id="it7" readOnly="true">
    <f:validator binding="#{row.bindings.brand.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="seedsz" filterable="true" sortable="true"
    headerText="Seed Size" id="c7" width="50"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.seedsz.inputValue}"
    label="#{bindings.queryProductResponseType.hints.seedsz.label}"
    required="#{bindings.queryProductResponseType.hints.seedsz.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.seedsz.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.seedsz.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.seedsz.tooltip}"
    id="it11" readOnly="true"
    contentStyle="text-transform:uppercase">
    <f:validator binding="#{row.bindings.seedsz.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="pckSize" filterable="true"
    sortable="true" headerText="Pkg Size" id="c11"
    width="50"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive"
    inlineStyle="#{row.conversion > 1 ? 'background-color:Yellow;' : 'background-color:White;'}">
    <af:inputText value="#{row.bindings.pckSize.inputValue}"
    label="#{bindings.queryProductResponseType.hints.pckSize.label}"
    required="#{bindings.queryProductResponseType.hints.pckSize.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.pckSize.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.pckSize.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.pckSize.tooltip}"
    id="it8" readOnly="true">
    <f:validator binding="#{row.bindings.pckSize.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="conversion" filterable="true"
    sortable="true" headerText="Conv" id="c4" width="50"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" displayIndex="-1">
    <af:inputText value="#{row.bindings.conversion.inputValue}"
    label="#{bindings.queryProductResponseType.hints.conversion.label}"
    required="#{bindings.queryProductResponseType.hints.conversion.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.conversion.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.conversion.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.conversion.tooltip}"
    id="conversion_it" readOnly="true">
    <f:validator binding="#{row.bindings.conversion.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="treatment" filterable="true"
    sortable="true" headerText="Treatment" id="c13"
    width="70"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.treatment.inputValue}"
    label="#{bindings.queryProductResponseType.hints.treatment.label}"
    required="#{bindings.queryProductResponseType.hints.treatment.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.treatment.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.treatment.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.treatment.tooltip}"
    id="it20" readOnly="true">
    <f:validator binding="#{row.bindings.treatment.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="availability" filterable="true"
    sortable="true" headerText="Availability" id="c15"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.availability> 500 ? '>=500': (row.availability> 100 and row.availability&lt;500 ? '100-500' : row.availability) }"
    label="#{bindings.queryProductResponseType.hints.availability.label}"
    required="#{bindings.queryProductResponseType.hints.availability.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.availability.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.availability.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.availability.tooltip}"
    id="it9" readOnly="true">
    <f:validator binding="#{row.bindings.availability.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="desiredDeliveryDate" filterable="true"
    sortable="true" headerText="Desired Delivery Month" id="c2"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" width="90">
    <af:selectOneChoice id="soc1" partialTriggers="it19"
    unselectedLabel="#{viewScope.GrowerOrderBean.desiredDeliveryDate}"
    value="#{row.bindings.desiredDeliveryDate.inputValue}"
    readOnly="#{row.activeYN == 'N'}">
    <af:forEach var="item"
    items="#{viewScope.GrowerOrderBean.selectItems}">
    <af:selectItem label="#{item.label}" value="#{item.value}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:column>
    <af:column sortProperty="maturity" filterable="true"
    sortable="true" headerText="Maturity" id="c5"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <div align="center">
    <af:inputText value="#{row.bindings.maturity.inputValue}"
    label="#{bindings.queryProductResponseType.hints.maturity.label}"
    required="#{bindings.queryProductResponseType.hints.maturity.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.maturity.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.maturity.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.maturity.tooltip}"
    id="it16" readOnly="true">
    <f:validator binding="#{row.bindings.maturity.validator}"/>
    </af:inputText>
    </div>
    </af:column>
    <af:column sortProperty="technology" filterable="true"
    sortable="true" headerText="Technology" id="c14"
    rendered="true" filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.technology.inputValue}"
    label="#{bindings.queryProductResponseType.hints.technology.label}"
    required="#{bindings.queryProductResponseType.hints.technology.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.technology.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.technology.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.technology.tooltip}"
    id="it15" readOnly="true">
    <f:validator binding="#{row.bindings.technology.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="prdLine" filterable="true"
    sortable="true" headerText="Product Line" id="c6"
    width="70"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.prdLine.inputValue}"
    label="#{bindings.queryProductResponseType.hints.prdLine.label}"
    required="#{bindings.queryProductResponseType.hints.prdLine.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.prdLine.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.prdLine.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.prdLine.tooltip}"
    id="it12" readOnly="true">
    <f:validator binding="#{row.bindings.prdLine.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="brandMktName" filterable="true"
    sortable="true" headerText="Marketing Brand" id="c8"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" width="80">
    <af:inputText value="#{row.bindings.brandMktName.inputValue}"
    label="#{bindings.queryProductResponseType.hints.brandMktName.label}"
    required="#{bindings.queryProductResponseType.hints.brandMktName.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.brandMktName.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.brandMktName.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.brandMktName.tooltip}"
    id="it17" readOnly="true">
    <f:validator binding="#{row.bindings.brandMktName.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="itemID" filterable="true" sortable="true"
    headerText="Item#" id="c1"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive" width="60">
    <af:inputText value="#{row.bindings.itemID.inputValue}"
    label="#{bindings.queryProductResponseType.hints.itemID.label}"
    required="#{bindings.queryProductResponseType.hints.itemID.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.itemID.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.itemID.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.itemID.tooltip}"
    id="it6" readOnly="true">
    <f:validator binding="#{row.bindings.itemID.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="descp" filterable="true" sortable="true"
    headerText="Description" id="c17" width="105"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.descp.inputValue}"
    label="#{bindings.queryProductResponseType.hints.descp.label}"
    required="#{bindings.queryProductResponseType.hints.descp.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.descp.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.descp.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.descp.tooltip}"
    id="it10" readOnly="true">
    <f:validator binding="#{row.bindings.descp.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="primaryUOM" filterable="true"
    sortable="true"
    headerText="#{bindings.queryProductResponseType.hints.primaryUOM.label}"
    id="c16" rendered="false"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.primaryUOM.inputValue}"
    label="#{bindings.queryProductResponseType.hints.primaryUOM.label}"
    required="#{bindings.queryProductResponseType.hints.primaryUOM.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.primaryUOM.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.primaryUOM.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.primaryUOM.tooltip}"
    id="it18">
    <f:validator binding="#{row.bindings.primaryUOM.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="secondaryUOM" filterable="true"
    sortable="true"
    headerText="#{bindings.queryProductResponseType.hints.secondaryUOM.label}"
    id="c12" rendered="false"
    filterFeatures="caseInsensitive">
    <af:inputText value="#{row.bindings.secondaryUOM.inputValue}"
    label="#{bindings.queryProductResponseType.hints.secondaryUOM.label}"
    required="#{bindings.queryProductResponseType.hints.secondaryUOM.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.secondaryUOM.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.secondaryUOM.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.secondaryUOM.tooltip}"
    id="it21">
    <f:validator binding="#{row.bindings.secondaryUOM.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    <af:spacer width="10" height="5" id="s7"/>
    <af:toolbar id="t1">
    <af:commandButton id="AddToOrderButton2"
    actionListener="#{viewScope.GrowerOrderBean.addToOrder_action}"
    partialSubmit="true"
    styleClass="addToOrderButton">
    <af:clientListener method="setFocus" type="action"/>
    </af:commandButton>
    </af:toolbar>
    <f:facet name="context">
    <af:group id="g1">
    <af:spacer width="60" height="10" id="s1"/>
    <af:commandButton id="cb4"
    actionListener="#{viewScope.GrowerOrderBean.addToOrder_action}"
    partialSubmit="true"
    styleClass="addToOrderButton">
    <af:clientListener method="setFocus" type="action"/>
    </af:commandButton>
    </af:group>
    </f:facet>
    <f:facet name="info"/>
    <f:facet name="legend"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    </af:panelHeader>
    </jsp:root>
    Please reply !!
    Thanks.

  • How to get the old selection in ListSelectionListener valueChanged() method

    Hi,
    Is anyone know how to get the old selection index/value in the ListSelectionListener valueChanged() method? The list.selectedValue() always return the same value which is the new selection. The ListSelectionEvent.getFirstIndex() and getLastIndex are always firstIndex <= lastIndex so that you cant' tell which one is the old selection.
    Please help and thanks!

    Just test the two indexes (first and last): if the corresponding row is selected, then the other is unselected. That gives you the old (unselected) and new (selected) item.
    Of course, I have supposed that you were using a SINGLE_SELECTION model...
    Hope this helped,
    Regards.

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • How to get data in WDDINIT method

    hi...
    how to get data passed through url in WDDINIT method, ... the data is comming in the inbound plug, but plug is executed after WDDINIT...
    thank you.

    Hello Kailash,
    By saying that your data comes in through Inbound Plug itself means that that is the point of access for the data. If there is some standard data, that you can provide through WDDOINIT (e.g. initilizations) but in case of navigation, plugs and events are the only way to send data.
    Hope this helps.
    Regards,
    Neha

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • QM Module - How to get the Inspection Method & Characteristic value(Urgent)

    Hi All,
        I have inspection lot number (PRUEFLOS), batch number 
       (CHARGE), plant (WERK) & material number
       (MATNR) , using these fields how to get the inspection
       method (PMETHODE) & Characteristic Value (ATWRT) ?
       I don’t know the relation among them.
    Could you please help?
    Thanks in advance.
    Saket

    Hi Jose,
    Thanks for your help, could you please look into my requirement.
    For all inspection characteristics listed in the selected COA profile, I have to retrieve the Inspection Method for all listed inspection characteristics. And also I have to retrieve the characteristic value(uncertainty). Additionally, for inspection characteristics that are quantitative, being checked, the characteristic value(uncertainty) from that Inspection method will be retrieved from class 3050_UNCERTAINTY, class type 006, characteristic, P2150_UNCERTAINTY. 
    Please help me out.
    Thanks,
    Saket .

Maybe you are looking for

  • Help in suppressing Adobe Fields

    Hello all, I am new to Adobe forms livecycle designer, apologies if it is a basic question. My requirement is as below: 1. Based on the data in my xml data file may be one field some where in the file, I should be able to suppress other fields in the

  • I need recovery disks

    Hi, had problems with my laptop running bad and all kinds of problems. I decided to re-install the software back to the factory setup when I purchased the laptop. I have a new set of recovery disks I got from HP back then and I had never used them. I

  • Contact person number range assignment

    Hi all, I have Created contact person number range using T Code : VPN1. where do we assign this number range. can any one tell me the "assignment process" menupath or T code. Thanks in advance. Regards, Shaik

  • ZEBRA PRINTER

    Hi Gurus, I want to print a label on a zebra printer..........through  a smartform or a SAP script or none of these........ I just want to print a label on zebra printer through my code....... I dont know how to start with it..........Please Help me.

  • Doubt on Cloning

    I will be moving databases from one server to another with different directory structure All are QA and DVLP databases.2 production databases my question 1.Can i make alter database backup controlfile to trace ----today edit all the changes ---today