Using LOV with Validation on the Numeric Fields results in Error

Dear JHeadstart Team,
During my work with lov I encountered another problem. I defined a lov and attached the lov to a numeric field and check the LOV for validation. Now when I use LOV using the LOV button it works fine but when I enter some numbers and then press tab the LOV was not shown correctly and resulted in the following errors and the worst thing is that you can not navigate to any other pages and all try to navigate to other pages results in errors too. When we put the same LOV on a string field (which is not desirable for us) it worked fine.
It seems to me like a bug. Am I right? Is ther any solution or workaround for this problem?
Thanks in advance,
Navid
16:31:29 DEBUG (LovItemBean) -Cleared value of item HrTrainingCourseSchedulesTitle
16:31:29 DEBUG (LovItemBean) -Cleared value binding #{bindings.HrTrainingCourseSchedulesTitle.inputValue} of item HrTrainingCourseSchedulesTitle
16:31:29 ERROR (ApplyRequestValuesPhase) -java.lang.ClassCastException: java.lang.Long
javax.faces.el.EvaluationException: java.lang.ClassCastException: java.lang.Long
     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
     at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1079)
     at oracle.adf.view.faces.component.UIXEditableValue.broadcast(UIXEditableValue.java:247)
     at oracle.adf.view.faces.component.UIXSelectInput.broadcast(UIXSelectInput.java:215)
     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:249)
     at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
     at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
     at com.pooya.controller.jsf.PooyaAuthenticationFilter.doFilter(PooyaAuthenticationFilter.java:256)
     at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
     at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
     at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
     at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
     at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
     at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: java.lang.Long
     at oracle.jheadstart.controller.jsf.bean.LovItemBean.validateWithLov(LovItemBean.java:101)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
     ... 31 more

Hi Navid,
We ran into the same bug and have the next workaround for it:
We extended the JHeadstart class 'LovItemBean' and we have overridden the method 'validateWithLov(...)' with:
  public void validateWithLov(ValueChangeEvent valueChangeEvent)
    Object newValue = valueChangeEvent.getNewValue();
    if(newValue != null && !(newValue instanceof String))
      newValue = newValue.toString();
      ValueChangeEvent newEvent = new ValueChangeEvent(valueChangeEvent.getComponent(), valueChangeEvent.getOldValue(), newValue);
      newEvent.setPhaseId(valueChangeEvent.getPhaseId());
      super.validateWithLov(newEvent);
    else
      super.validateWithLov(valueChangeEvent);
  }Next step is to use a custom template in your JHeaedstart Application Structure file for 'LOV_ITEM_BEAN'. In this custom template you should use your own class as 'managed-bean-class' instead of the default JHeadstart one.
Now you can safely generate LOV with validation of number fields.
Maybe something the JHeadstart can pcik up in the next release of JHeadstart :-)
Hope this helps.
Pascal

Similar Messages

  • Problem in using LOV for validation-JHS 10.1.3

    Hi all,
    This problem was also noticed by Phil McDermott (Problem in using LOV for validation-JHS 10.1.3
    I am following the demo and I noticed that the Use LOV for Validation functionality does not work on the browse page. However, it does work on the details page!
    Another effect of this problem is that once you tried to validate on the browse screen, the lov button does not work anymore.
    Thanks, Joep
    Just found out that is does not work when entering "ph" like suggested in the tutorial. When I enter "p" and then tab to the next field, the lov popup does show.
    Message was edited by:
    Joep Hendrix

    Thanks for your reply Steven.
    I had the same problem as Joep reported here, following the steps at:
    http://www.oracle.com/technology/products/jdev/tips/muench/jhstutorial/index.html#genandrunagain
    Your solution works for me.
    The "completed version of the tutorial application" also has this issue:
    http://otn.oracle.com/products/jdev/tips/muench/jhstutorial/MyDemo.zip
    Are there any other known issues for this tutorial? Where can I find such errata list?
    many thanks
    Jan Vervecken

  • Validations on the screen fields in a module pool program

    Hi all
    i am creating a sales order against a purchase order ,i am selecting a PO click on a button to call another screen which has all the mandatory fields of the SO i want validations on the screen fields or the input fields as when i enter the header data and the items data and the partner data from the input serach help that is already enabled on the screen fields ,if there is any mismatch among the fileds and an error message is displayed for example:-" material no 100-100 does not exist for  sales area" then only that field where this message is present should be field enabled and the rest of the fields should be field disabled.
    also the error message i m displaying is in short text form and not in long text i clicked on it (long text) however how to use it was not known to me .
    thanks
    varun
    Moderator message: please do more research before asking, try solving problems yourself first, look for previous discussions of similar issues, post texts in more readable format, you have been warned several times before.
    Edited by: Thomas Zloch on Feb 7, 2012

    i want to have input search help as if i select sales document type then corresponding sales organizations should appear
    This would be quite opposite of what h_vakz does. h_vakz gives Sales document based on Sales org..and you want vice versa. Create a simple SH with
    selection method : TVAKZ
    AUART as importing only
    VKORG as exporting only. So when you enter an AUART you get all VKORG it is defined in. I'm not aware of a standard search help which matches the requirement. If anybody does please help me.
    i have header data (only mandatory fields),items data,partner data(all mandatory fields)
    and when i select all the header data the search help that is on the material number and partners role and number should appear corresponding to that header data
    You will have to be more specific sir..
    not able to apply please guide someone
    As for that just mention them in SCREEN->ELEMENT LIST->REFERENCES

  • 1 year ago i installed Elements 12 on my PC with a serial number.  Today i have installed Elements 12 also on my laptop. But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this progra

    One year ago i installed Elements 12 on my PC with a serial number and it was OK.
    Today i have installed Elements 12 also on my laptop.
    But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this program real disapeare in 7 days?
    Hans

    Hi,
    Since you already have one copy activated the serial number must be logged in your account details - I would first check that the one logged and the one you are attempting to enter are the same.
    You can check your account details by going to www.adobe.com and clicking on Manage Account. You need to sign in with your Adobe Id and then click on View All under Plans & Products. Next click on View your products and after a while it should produce your list.
    If there is a problem with the serial number, only Adobe can help you there (we are just users). Please see the response in this thread
    First of all, I would have to say that getting in touch with you is a nightmare and I am not at all happy that I can't just email or live chat with someone who can help!  I am not a technical person, I just want to be able to use Photoshop Elements and ge
    Brian

  • Fill the LOV with data during the execution

    Hi
    I am using Oracle 10g
    I want to ask please if there is a way to fill the LOV with data during the execution
    so can I change the query specified in LOV wizard during the execution and get a new record set according to the value in the text boxes
    thank you for help

    You can use the SET_LOV_PROPERTY built-in to change the record group of the LOV and to create a new record group you can use the CREATE_GROUP_FROM_QUERY built-in.
    it will be something like this.
    RG_ID := FIND_GROUP('<record group name>');
      IF NOT ID_NULL(RG_ID) THEN
           DELETE_GROUP(RG_ID);
      END IF ;
      RG_ID := CREATE_GROUP_FROM_QUERY('<record group name>', '<your SQL statement here>');
      POP_GROUP := POPULATE_GROUP('<record group name>');
      SET_LOV_PROPERTY('<LOV name>', GROUP_NAME, '<record group name>');Use the online help for more information about these built-ins.
    Tony

  • Displaying no default zeroes for the numeric field in the table display.

    hi folks,
         I am binding a table in the context which has some numeric fields. I'm  displaying the same table which has some records for editing purpose. But the problem is that the numeric  field column is being displayed with zeros if it doesnot have any value in it. Can u explain how to disable the zeroes by not displaying them by defualt when there is no value for the numeric field.
    regards,
    Ramu

    set the format of the context attribute TEST is the context attribute name
    data: lr_info type ref to if_wd_context_node_info.
    data: ls_prop type WDY_ATTRIBUTE_FORMAT_PROP.
    lr_info = wd_context->get_node_info( ).
    ls_prop = lr_info->GET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST' ).
    LS_PROP-NULL_AS_BLANK = 'X'.
    lr_info->sET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST'
                 FORMAT_PROPERTIES = ls_prop ).
    Abhi

  • HT201343 My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found

    My MBP is Early 2011 but dunno why cant use mirroring with apple TV, the icon cannot be found. So cannot use mirroring.
    I have follow trouble shooting , they recommend to go system preference -> display , thus can find out the mirroring icon if no mean it doesnt support. But according to the web, Early 2011 MBP should be able to use, dunno why.

    Just realise I havent updated my OS to mountain lion and this is the reason why I cannot use mirroring before ^^
    Thanks all

  • Any Problems using SSL with Safari and the move with Internet explorer to require only TLS encryption.

    Any Problems using SSL with Safari and the move with Internet explorer to require only TLS encryption.

    Hi .
    Apple no longer supports Safari for Windows if that's what you are asking >  Apple apparently kills Windows PC support in Safari 6.0
    Microsoft has not written IE for Safari for many years.

  • When I sync my iPhone 4s with my itunes, the notes/fields in contacts do not sync.  Any ideas?

    When I sync my iPhone 4s with my itunes, the notes/fields in contacts do not sync.  Any ideas?

    In iTunes I go to iPhone --> Info --> Synch Contacts --> All contacts

  • Is there a way that when using airplay with power point the ATV does not sleep/screen saver frequently

    s there a way that when using airplay with power point the ATV does not sleep/screen saver frequently???

    I have done this for several Titles, using Photoshop and a Layer Mask, that gets "erased," revealing the letters. My Titles were of "handwriting with chalk" on a blackboard, so I could keep the edge of that Layer Mask, looking more like the "chalk." Photoshop also makes it easy to output Layer Comps for each "step" in the handwriting process. IIRC, I did about 5 Frames per Layer Comp on Import, but do not recall if I used an extremely short Cross-Dissolve Transition between those - I intened to do so, but just do not remember if I liked that, or went with just the Still Images? Will try to find that animation, and maybe create a full tutorial of the process. In my case, I also added an SFX of chalk on a chalkboard.
    If you have Photoshop, it's really quite easy to pull off.
    Now, I do not know if Photoshop Elements has Layer Masks yet, which make it so very easy to accomplish. One could do it backward, where the Text Layer gets Erased, and then one would have their full Image as the last in the sequence, and then the next would have a little bit of the Text removed, then a bit more, then a bit more - going backward, until the "writing surface" is clean. One could also do this with a Transparent Background, so that one saw the Video below, and no actual "writing surface" visible.
    Good luck,
    Hunt

  • Problem with Action Builder and Numeric Field

    Here's my scenario:
    I have a form with a numeric field for the PO Amount and a text field for the Role.  I tried to create an action builder to do the following:
    Condition - When numeric field PO Amount is less than 250,000
    Result - Set Value of Role to be Manager
    When I enter an amount less than 250,000, nothing appears in the Role text field.
    Any help is appreciated!  Thanks!

    Hi,
    this is not so difficult.
    You have to use the script editor (about windows)
    Then you have to mark your numeric field.
    Then you have to select "EXIT" and "JAVASCRIPT".
    Then you have to copy the following script:
    (I come from germany and I don't know which amount you mean because in german is this switched 1,000.00 $ is in german 1.000,00 $) This is the only thing which you adapt maybe.
    if(this.rawValue <250)
        TextField1.rawValue = null;
    }else
        TextField1.rawValue = "Manager";
    Hope it will helps,
    Mandy

  • Disappears pattern while clicks on the numeric field

    Hi
    I added the pattern to dipaly $ with numeric values . But when i opened the PDF and clicks the field it disappears pattern and it shows the value without $. then once i moved some other place again it working fine .
    Here the Field type is Readonly . But its working fine while testing LC designer and the problem in the PDF which is generated separately from server .
    Please suggest how to aviod the disappear pattern .

    Hi
    I am not usingText Box .
    In My case i am using table with ROW and column . This row will dynamically grow based on the Values from XML.
    Here one of the the column nothing but cell needs to display Numeric values with dollar and comma.
    So i made the
    cell type into Numeric filed
    Pattern num{($zzz,zzz,zz9)}
    and the value type is readonly .
    But here the issue is ,
    When i clicks in the cell the pattern got disapperas . (Only in Adobe Reader )
    E. G  value -1000
    displays - $,1000 but when i clicks in the cell 1000
    Is any change needs to do in Table or Row. Please let me know.
    Question 2 :
    Problem in Dynamic PDF (dispalying the values from XML )
    Here i am having one more doubt . when we made readonly still i am able to click (not able to Edit thats fine )and mouse pointer still blinking there.
    But same PDF if you opened in the acrobat PRo . you cant able to click . why any reason

  • Using LOV with bind var as custom attribute?

    I have an Portal LOV which uses a bind variable.
    Can I use this LOV as a custom attribute? If so, how do I specific the bind variable value?
    In the display option of the attribute I tried LOV_NAME(LOV_Bind => 'value'), but the LOV is not applied.

    It's been quite a while, but I think I remember trying this and not being able to achieve it. You can use a LOV with a bind variable in a report or in a form, or similar, but there is no way in an item to from specify where to get the bind variable. My suggestion if this is a requirement would be to use a portal form which submits to a stored procedure or pl/sql generated form to gather the attributes and then programmatically create the item using the APIs. Takes a bit of work, but gets you exactly what you described above.
    Rgds/Mark M.

  • To create a Material using BAPI with out passing the material number

    Hello Experts,
    I am using BAPI_MATERIAL_SAVEDATA to create a material of some Ztype. I am successfully creating a material if I am passing Material Number as input. I want the material number to generated internally.
    When I am doing material creation with same input data with out material number using BDC, it is working fine. It is generating the material number.
    But, not with the BAPI.
    Do, I need to specify this some where in the BAPI to generate the Material number internally? Please let me know.
    Please help me in this regard.
    Thanks & Regards,
    Naresh.

    Hi,
    Read the BAPI documentation regarding Internal Number range for materials.
    When you create material master data, the following fields must always
    contain a value in the structure:
    o   MATERIAL
        Only external number assignment is supported for the material number
        (MATERIAL). If you want the material number to be assigned
        internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
        called. This method determines an internal number for the material
        to be created. You must enter this internal number in field
        HEADDATA-MATERIAL.
    Regards
    Vinod

  • Use of 'Run macro' in the form field dialog

    Hi Tim,
    Can you please explain the use of the 'Run macro on' on the form field dialog box in the XMLP template.
    One can see the following on the 'Text Form Field Options' dialog box:
    Run macro on
    Entry Exit
    runRTFtoRTF runRTFtoRTF
    runRTFtoXLIFF runRTFtoXLIFF
    runRTFtoXLS runRTFtoXLS
    The above are option values in it. Please explain their usage. I couldnot find anything about it in the XMLP Guide. I am currently using XMLP 5.5 with EBS 11.5.10
    Thanks,
    Nitin

    Form fields are not an XMLP feature. They are part of MS word. Look at the MS doco for information on it. I doubt there is a way that can be used in conjunction with XMLP however.

Maybe you are looking for