Uncaught TypeError when using jQuery.sap.syncStyleClass

Hi, i met uncaught typeerror . Here is the js code
handleConfirm : function(evt) {
  if (!this._oDialog) {
  this._oDialog = sap.ui.xmlfragment(
  "sap.ui.demo.myFiori.view.Dialog", this);
  this.getView().addDependent(this._oDialog);
  // this._oDialog.bindElement("/ProductCollection/0");
  // toggle compact style
  jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(),
  this._oDialog);
  this._oDialog.open();
when i call the method, the error is showed as below.
Thanks for your attention.

Hi Dennis, thanks for ur demo. I updated the code as follow
handleConfirm : function(evt)
  if (!this._oDialog) {
  this._oDialog = sap.ui.xmlfragment(
  "sap.ui.demo.myFiori.view.Dialog", this);
  this.getView().addDependent(this._oDialog);
  if (this.getView().$().closest(".sapUiSizeCompact").length > 0) {
           this._oDialog.addStyleClass('sapUiSizeCompact');
  this.getView().addStyleClass('sapUiSizeCompact');
  jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), this._oDialog);
  this._oDialog.open();

Similar Messages

  • How to handle type safety when using com.sap.typeservices.IProposalList

    Hi,
    I have been testing out the new features in Web Dynpro Java CE EHP1 using a scenario with BPM and SAP MDM. One of the new features I tested is the Ajax feature of using suggestion values. I have an InputField UI element which have bound to a context attribute (CountriesView/Country) which is of type string. The UI element has the "suggestValues" value set to true. I then use the IProposalList to produce a valueset. This will make the InputField UI appear as a combo box and allow the users to type in a few characters and utilize the Ajax framework to automatically search in the list of values.
    The following code works perfectly ok but I don't understand how I should handle the compiler warning "IProposalList is a raw type. References to generic type IProposalList<T> should be parameterized"?
    IProposalList proposalsCountry = wdContext.nodeCountriesView().getNodeInfo().getAttribute(IPrivateComp1.ICountriesViewElement.COUNTRY).getModifiableSimpleType().getSVServices().getProposals();
    for(int i=0;i<bua.length;i++){
        IPrivateComp1.ICountriesViewElement buaelement=wdContext.createCountriesViewElement();
        buaelement.setCountry(bua<i>[0]);
        buaelement.setCode(bua<i>[1]);
        bualist.add(buaelement);
        proposalsCountry.add(bua<i>[0]);
    wdContext.nodeCountriesView().bind(bualist);
    I don't have any issues handling this for other types such as ArrayList. Using the syntax "IProposalList<String> proposalsCountry ...." will handle the "proposalsCountry.add .." part but I still have a warning "Type safety: The expression of type IProposalList needs unchecked conversion to conform to IProposalList<String>"
    Any ideas on how to handle this?
    Thanks,
    Johan

    Hi,
    Eventhough there are no replies to this thread I thought I should update with what I belive is an answer to my question. Excerpt from http://stackoverflow.com/questions/382/what-is-the-meaning-of-the-type-safety-warning-in-certain-java-generics-casts:
    "This warning is there because Java is not actually storing type information at runtime in an object that uses generics. Thus, if 'object' is actually a List<String>, there will be no ClassCastException at runtime except until an item is accessed from the list that doesn't match the generic type defined in the variable. This can cause further complications if items are added to the list with this incorrect generic type information. Any code still holding a reference to the list but with the correct generic type information will now have an inconsistent list. To remove the warning, try:
    List<?> list = (List<?>) object;However, note that you will not be able to use certain methods such as add because the compiler doesn't know if you are trying to add an object of incorrect type. The above will work in a lot of situations, but if you have to use add or some similarly restricted method, you will just have to suffer the yellow underline in Eclipse (or a SuppressWarning annotation)."
    The last line explain the reason for my issue and the lack of a solution when using add method.
    /Johan

  • CS4 Error when using Jquery UI Calender

    Hi - hope this is the correct forum to post on this query -
    I've just upgraded to DW - CS4 and started to play with some of the
    new widgets - I already have a page to which I applied the JQuery
    UI Calender widget which is neater than the datepicker I was using.
    This page has a number of dbase bindings to get data from several
    tables - all these are functional IF i don't modify them. However
    if I attempt to make a change which I did for the DW insert record
    behavior when I select 'connection' to choose the database this
    error message occurs:
    While executing onChange in InsertRecord.htm, the following
    JavaScript error(s) occurred:
    At line 665 of the file "C:\program files\ . . .
    \ServerBehaviors\PHP_MySQL\InsertRecord.js": name has no properties
    As far as I can see this occurs on insert & update DW
    record behaviours (edit - on a page) where I have the JQuery widget
    applied. If I remove the widget it works fine (which is what I have
    done) I was wondering if anyone else has noticed this ??

    AmiBios wrote:
    > David - Many thanks for taking time to reply - I've
    tried that option with no
    > success along with a few other such as recretaing the
    site cache - It certainly
    > does appear to be a conflict between the JQuery
    'calendar widget' and the DW
    > insert behavior. I've tried a few other widgets and all
    works well. I suppose
    > i'll just leave the widget out as the insert is just a
    wee bit more important
    Ah, reading your original post more carefully, I see what's
    happening.
    The type of JavaScript error you mention is normally caused
    by a corrupt
    cache file, but it seems as though it's happening only when
    you try to
    edit an insert record server behavior.
    Without setting up a similar page myself, I can't confirm
    whether this
    is reproducible. My advice would be to apply the widget after
    you have
    finished editing the server behavior. In theory, there
    shouldn't be any
    conflict between a jQuery widget and the server behaviors,
    but that's
    the type of thing that comes out only after thorough testing.
    It might be a good idea to submit a bug report to Adobe:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Apex.submit issue when using jQuery Overlay

    Dear All,
    This is my first post in this forum and I hope I can find a solution for my issue.
    Currently we are developing a new Time Attendance System by Apex.
    I am facing a problem when I use the jQuery Overlay in one of the pages.
    the page it self is working fine and all it button and tabs are also working fine until I click the link for the overlay content
    the content is another page getting loaded in a similer to a popup window (overlay effect) after I close this overlay window
    all the links in the original page that are using the apex.submit are not working and show an error in the browser "Object doesn't support this method or property"
    This only occur when I click the overlay link but if I load the page and I don't open the overlay link all links are working fine.
    And Thank you all inadvance.
    Regards

    It's always easier to debug an issue like this by recreating the problem on apex.oracle.com and providing credentials.
    How did you set up the overlay content? Did you create any additional HTML elements within one of the apex regions? If was just adding some DIV content then try moving that DIV content to after the #FORM_CLOSE# substitution string in the page template.

  • Commenting a Line in ABAP Editor when using SAP GUI for java

    Hi,
    In ABAP editor we can highlight the line which are to be comment and use cmd+< sign to comment those lines. What will be the command to be used to achieve the same functionality when using SAP GUI for JAVA on an iMac.

    Hello Kedar,
    please check with SAP GUI for Java 7.20 rev 5 before submitting a bug report.
    Also please verify, that cmd-< and cmd-> are not assigned as "Keyboard Shortcuts" in the "Keyboard" control panel of "System Preferences".
    Bug reports can be submitted with the [SAP Message Wizard|http://service.sap.com/message], for SAP GUI for Java please use component BC-FES-JAV.
    Best regards
    Rolf-Martin

  • Smartform font spacing Issue when using SAP printer name

    Hi Friends,
    I am facing some spacing issues when printing a form using SAP printer name. If I use LOCL then the output comes perfectly but when I use the SAP printer name the space between characters are getting widened and so the alignment of each column goes wayward. I suspect it could be due to the device type but not sure which seeting controls this. There is a similar problem in the logo as well. When using LOCL the logo comes out good but when using the printer name the quality is not good and becomes pixelised. Have any of you faced similar issues? Can you provide some guidance or pointers for the solution.
    Device type of LOCL : ZSAPWIN
    Device type of SAP printer name :  ZHPLJ5
    CPI is defined in smartform as 10.
    Please let me know if you need more information.
    Thanks,
    Praveen

    Hi,
    This problem occurs because the printer driver for both the printers are different,
    I suggest you use Local printer only or configure any other printer with printer diver in SAP as SAPWIN.
    Regards,
    Bharat.

  • Error when using SAP Exit Variable for Current Fiscal Period (0FPER)

    Hi Friendz,
    My requirement is to execute a query for the current fiscal period. I am using the SAP Exit Variable 0FPER.
    I placed this variable on char. Fiscal year/period 0FISCPER.
    When I execute the Query, it is returning the error: No value could be determined for variable ZVBSYCUR; Variables Contain Invalid Values.
    Please give inputs on how to use this variable.
    Regards...
    Ganesh

    Hello Dipika,
    I am also getting the same error.
    ERROR: Variable 0FPER could not be replaced.
    Yesterday we created one customer exit. But this should not affect the SAP Exit right? Till yesterday the 0FPER variable was working fine. I tried re-installing from BI content, but still getting the same error. If anybody has a clue please let me know.
    Thanks,
    Harshal

  • Catch error in javascript when using SAP script

    All,
    I have a issue when using Javascript to control the SAP GUI in that I get a "syntax Error" raised by Internet Explorer if I attempt to get the SAPGUI runtime object from the runtime object table if SAP is not already running.
    For example:
    I have a javascript function embedded in a web page as follows:
    <script type="text/javascript">
    function displaymessage()
    var sapgui;
    var application;
    var connection;
    if (typeof(application) == "undefined")
       sapgui      = GetObject("SAPGUI");
       application = sapgui.GetScriptingEngine();
    if (typeof(connection) == "undefined")
       connection = application.children(0);
    if (typeof(session) == "undefined")
       session = connection.children(0);
    if (typeof(WScript) != "undefined")
       WScript.connectObject(session, "on");
       WScript.connectObject(application, "on");
    session.findById("wnd[0]/tbar[0]/okcd").text = "fb50";
    session.findById("wnd[0]").sendVKey(0);
    session.findById("wnd[1]/usr/ctxtBKPF-BUKRS").text = "0001";
    session.findById("wnd[1]/usr/ctxtBKPF-BUKRS").caretPosition = 4;
    session.findById("wnd[1]").sendVKey(0);
    </script>
    I have a simple HTML page with a button on it that calls the function.
    If I have already launched SAP GUI and logged in the code works fine and atuomatically navigates me to FB50.
    If SAP is not active and logged in then I get a syntax error!  The error is raised by IE when the GetObject("SAPGUI") is executed.
    Can anyone please help by either:
    a) explaining how I can catch this error in javascript
    b) suggesting a different way to call the GetObject
    c) suggesting a way that I can auto launch SAP to log people in if it is not already active.
    Note - Using VB is not an option as I need to embed the working Javascript code in a Siebel thin client application which only uses Javascript.
    All help welcome. Thanks

    Hey Gunter,
    Thanks much, that did work.
    The other error I spoke of was fixed with the new database, so apparently the two errors I spoke of weren't related.
    You seem to be a good help to this forum, thank you for that.... fixing my problem relieved me from much stress.
    Cheers,
    Derek Miller
    Dreamweaver Enthusiast

  • When using APEX.jQuery() - Syntax...?

    Hi,
    I have migrated to Apex 4.02 and had an old jQuery Version running on 3.2.
    Now I have learned that I can use the build in jQuery Libs which load not all UI functionality but additional UI components can be loaded from the APEX - Lib.
    I have read that APEX renamed its jQuery implementation to APEX.jQuery().
    I have thrown away my old jQuery Libs ( only the standard APEX jQuery Libs are loaded ), but my jQuery invokes are still working with $().
    So when do I have to use the syntax APEX.jQuery() and why is $() still working...?
    Thanks, Juergen

    Hi,
    I also want to add my 2 cents. See it as recommendation from the APEX development team. :-)
    So the question is, when to use jQuery/$ and when to use apex.jQuery? Actually it depends where you use it!
    That might at first hand be confusing, especially because as some of you already know, as long as you don't include your own version of jQuery, the JavaScript variables jQuery, $ and apex.jQuery are all the same. So it looks like that it doesn't matter that much, but actually it's very important if you upgrade your application/plug-in to a newer version of APEX.
    We try to stay up-to-date with the included version of the jQuery library when we release a new version of APEX. So for APEX 4.1 it's very likely that we include jQuery 1.5. As you can see from the change log of the jQuery project they also sometimes make changes which breaks existing functionality. To minimise your risk when you upgrade to a newer version of APEX you should follow the following recommendations.
    JavaScript code in your Application:
    If you want to use jQuery in your own JavaScript code in an application we recommend to use jQuery or the shortcut $.
    Why:
    1) If you upgrade APEX there is the potential that the newer jQuery version breaks your existing code. To avoid intensive testing and rewriting your application to the new jQuery version you can just include the old jQuery library into your page template and you are done. The variables jQuery and $ will point to your own jQuery version and not the one shipped with APEX. No additional code changes necessary. That will help to minimize your risk of upgrading to a newer version of APEX.
    2) You need a newer/older version of jQuery in your application because one of the jQuery plugins which you want to use just works with that version. In that case just include the newer/older jQuery library into your page template and the variables jQuery and $ will point to your own jQuery version. apex.jQuery will still point to the version shipped with APEX.
    JavaScript code in an APEX Plug-In:
    If you want to use jQuery in an APEX plug-in we recommend to use apex.jQuery. You should even go that far to modify the initialization code of an included jQuery plugin to use the apex.jQuery reference.
    What do I mean with that? If you have a look at the JavaScript code of a jQuery plugin you will notice that almost all of them have the following code structure
    (function($) {
    ... plugin code ...
    })(jQuery);Looks wired, right? :-) What this actually does is to declare an anonymous JavaScript function with a parameter $ which is immediately called and as parameter value passes in the current jQuery variable. That will allow the function to use $ as jQuery short cut without having to rely on the fact that $ is still used by jQuery.
    We recommend to copy the jQuery plugin file and prefix it with apex. (example: apex.jquery.maskedinput-1.2.2.js) to make everybody aware that the file has been modified for APEX. Change the jQuery to apex.jQuery in the initialization code.
    (function($) {
    ... plugin code ...
    })(apex.jQuery);Why are we doing all of that?
    As a plug-in developer you want to minimize your testing effort and also want to have an environment where you have full control to give proper support. Let's assume you are not doing the above, what happens if a user of your plug-in is using it's own version of jQuery? He might report strange behavior of you plug-in which you are not able to reproduce because you don't know that your plug-in is actually using a different version of jQuery than in your own environment. Using the apex.jQuery namespace reduces your risk and also the risk of your users, you just have to test your plug-ins with the APEX versions you want to support.
    Hope that has given some more insides when to use what.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • When i rendering large table from Ajax using jquery that table not Displaying and not throwing any error also. why ? in IE 8,9,10

    Hi,
    when i rendering large HTML table from Ajax using jquery , table not displaying in browser why ? but visible in  chrome and mozilla.

    Hi,
    Post questions about html, css and scripting for website developers to the IE Web Development forum.
    http://social.msdn.microsoft.com/Forums/ie/en-US/home?forum=iewebdevelopment
    Include with your question a link to your website or a mashup that shows the issue.
    If you are using the file: protocol.... MSIE browsers have security restriction for running active content from the file system.
    Regards.
    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to
    raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Rob^_^

  • Error when using SAP authentication for Designer

    my error is:
    [repo_proxy 13] SessionFacade::openSessionLogon with user info has failed(The
    secSAPR3 DLL could not be found or does not exist(hr=#0x80042a01)
    can you help me?
    regards

    hi,
    pls refer the link
    Error when using SAP authentication for Designer
    try re-installing BOE and check
    hope it helps,
    sundar

  • SIA restarts when the user logins using his SAP Credentials

    Hi
    I have recently installed BO Enterprise XI 3.1 SP2 (FixPack 2.7) and SAP IK 3.1 SP2 FixPack 2.7.
    and have done the initial configuration for SAP Authentications.
    And when I try to access InfoView using my SAP Credentials.
    it gives this error
    "Account information not recognized: All the servers with CMS AUNSSDCBODV01.production.transfieldservices.com:6400, cluster @AUNSSDCBODV01.production.transfieldservices.com:6400, kind cms which host service null, are down or disabled"
    and I find these errors in the Windows Event Viewer.
    "Server Intelligence Agent: server AUNSSDCBODV01.CentralManagementServer stopped unexpectedly."
    and this error
    Server Intelligence Agent: server AUNSSDCBODV01.CentralManagementServer is considered failed because it has stopped 5 time(s) within 60 minute(s). Please restart this server.
    can somebody help me resolving this issue.
    regards
    Biju Kumar

    KB 1455254 - After installation of SAP integration kit SP2 CMS crashes upon login with secSAPR3 users. I ran into this issue because the customer had not installed the proper SAP client on the BOE server(s) rather just places some dll instead. SP2 requires an SAP client installed and that should resolve the CMS crashing. Grab the newest version from the SMP portal.
    I edited in the KB, contrary to other beliefs the product is tested with the SAP client installed post SP2. If you do not want to install the client and choose to install individual files (like in the KB) this can be considered an unsupported environment and may cause your CMS to crash.
    Regards,
    Tim

  • No connection when using SAP NETWeaver BI connections in Xcelcius

    Hi,
    I'm using Xcelcius Enterprise 2008 SP3 in combination with BOXI R3.1
    When I add SAP NETWeaver BI connections  nothing happens no popup apears And I can't see any system.
    The possibility Query as a webservice is working ok
    Further using Sap GUI  and server NW 7.01 with the latest EHP en SP
    Can any one tell me what I'm doing wrong??
    Edited by: P. Teussink on Jul 1, 2010 3:52 PM

    Hi,
    you have to click on the 'browse' button facing the Query name
    then you will be asked to connect to the SAP system
    Best regards
    Eric

  • SAP BW Security when using Cognos as Frontend Tool for Analysis

    Hi,
    I wonder if anyone knows how to handle security when using Cognos 10 on top of SAP BW 7.3 as analysis tool.
    Is it somehow possible to forward user credentials to SAP BW?
    If someone has experience in this field it would be very helpful to me.
    If you need further infomation to answer my question please let me know.
    Regards,
    Axel

    hi,
    hope u have these links, if not please go through it,
    COGNOS Reporting
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1cf73536-0301-0010-f880-d9e826a330cc
    there is online free demo version available expalining the things
    http://itsolutions.windowsitpro.com/windowsitpro/search/viewabstract/69473/index.jsp
    Accessing a GUI interface to develop Reports just as in Cognos
    BI without BEx
    BW Reporting
    Ramesh

  • Partial page load problem when using Muse in an existing non-Muse Masterpage; how to issue a jquery

    Partial page load problem when using Muse in an existing non-Muse Masterpage; how to issue a jquery args.get_isPartialLoad().
    My page is loaded into a palcehold within the Ajax update panel within the current Masterpage, so page loadload doesn't occur. But if my Muse page can capture  the partial pageload then I can tell jquery to run the Muse formating routine.

    Jackie,  I am having the same issue and agree that it obscures our site analytics.
    I only have the "WebMarketing" subscription - so I cannot see how often people visit my site (unless I just dont know how to view that).  Here is a screen shot of how many different locations I have and how much it affects my site visitor count based on the other locations which seem "legit" because they have more page views than visits.
    I hope there is a way to fix or block this.

Maybe you are looking for

  • Original response not available Error

              Hi,           We are getting this error when we are trying to forward a request using request           dispatcher. Does anyone know what it means? This only happens once in a while           in our production system.           Sushil      

  • Cobol and C Compiler for Sun OS 5.9

    Hi, We need to install the following on our Sun Sparc 9 (5.9) OS 1. Cobol Compiler 2. "C" Compiler Could someone please help us find out where to get these from . If no freeware is available for both these compilrers, then could you please direct us

  • Apple TV is showing a pink screen. It was working fine yesterday! Changed HDMI and this isn't the issue

    My Apple TV is showing a pink screen. It was fine yesterday. Changed the HDMI cable and this was not the issue so need help troubleshooting thx

  • CDN not available

    Hi, As per my information I read in blogs, CDN was disabled for new users. Has it been activated now? Still I can not see it in Azure portal. Sandeep Bhutani

  • Forgive the newbie question; Tiger vs Leopard

    So, am I correct after my research...the current OS is OSX Tiger. This will be replaced by OSX Leopard in October. As my wife and I are about to each get a nice 20" iMac, (thanks for the refresh this week, nice timing for us).. do we wait til October