Can't access object created in the view from controller

Hi
In the view, I create a simple HTML control with a DIV tag.I need to access the DIV tag from the view.  The function this.getView().byId() returns nothing.
view
createContent : function(oController) {
                        var aControls = [];
                        var html = new sap.ui.core.HTML(
                                    content : "<div id='obj1' style='width: 300px; height: 200px;'></div>"
                        aControls.push(html);
                        return aControls;
controller
onInit: function() {
this.getView().byId("obj1");
Thanks.

Hi Chen,
The reason for this is the at
this.getView().byId("obj1") would only work for XML views
but for JS views
sap.ui.getCore().byId('obj1') would work
The difference between JS views and XML views is that the id's on DOM are different for JS view each control would get the same id as used in the definition but for XML views the id would get generated.
Hope this helps.
Thanks and Regards, Venkatesh

Similar Messages

  • Can new PWA views be created whereby a filter can be set and associate to the view by default? (Project Server 2013 ONLINE)

    My main question is: Can new PWA views be created whereby a filter for that view can be set, and associate to the view by default? (Project Server 2013 ONLINE)? and can I have a filter set to filter on person logged on to...
    In previous versions of Project Server, when CREATING a PWA view, we were able to apply/ define a filter for that view.  Does not seem like it is the case in Project Server 2013 Online.  And if I remember, we could also use the URL Guid_view_id. 
    Please confirm; and / or tell me how-to.
    What I was hoping to do is the following... Given that our standard that we have adopted for reporting time is 'My Timesheets' (fyi, Single Mode Entry=ON), we have some resources who have others who do it on their behalf via 'My Tasks' (ie., accomplished
    by using the 'Assignment Owner' field, accordingly).  Therefore, when entering time on someone else's behalf within 'My Tasks', we like to present the user that is logged in only the tasks that they are are assigned to update on others' behlaf.
    I know that there is another more elegant approach to doing this which may be to use the Delegation feature. But since we are trying to stick to Sharepoint Security mode for now, this is not an option for the time being.
    Any help appreciated would be greatly appreciated.
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

    Hi Spiro,
    1- You still can define in Project Online a filter in the view settings, it is located just above the category setting. Here is a screenshot of the summary project center view:
    2- The view GUID is not anymore in the URL, since the URL triggers an action only on the webpart and not on the whole page. I agree this is annoying since it was great to send a URL with a specific view.
    3- Concerning the access to my timesheet versus my task, I'm not sure to get a full understanding but on a general way, it is much more easy to deal with those situation using categories which you cannot do with the SP permission mode.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • On iTunes 11, how can I access home sharing if the music is from a CD? Is there any way I can download these songs if (A) I no longer have the CD, or (B) I do not want to pay $25 a year for iTunes Match?

    On iTunes 11, how can I access home sharing if the music is from a CD on a different computer using Home Sharing? Is there any way I can download these songs if (A) I no longer have the CD, or (B) I do not want to pay $25 a year for iTunes Match?

    Yes, you can copy songs that you ripped from a CD to your Home Sharing computer.
    Turn on Home Sharing first on both computers.  To do that, go to File > Home Sharing > Turn on Home Sharing.  Enter your Apple ID and password.
    Now go to your computer that you want to copy the songs to and connect to your Home Share.  You can do that by clicking on the popover button located at the left top corner right below the play control buttons.  Click on it and scroll to the bottom until you see your Home Share and select it.
    Go to Music in your Home Share.  Select the songs that you want to copy in your Home Share and click Import at the bottom right corner.

  • HT202157 How can I access my computer through the Apple TV unit?

    How can I access my computer through the Apple TV

    Welcome to the Apple community Nopasswords.
    Apple TV > computers.
    The following article(s) may help you.
    Understanding Home Sharing
    Setting Up Home Sharing On A Computer

  • I keep getting an error pop-up when I try to access my email. The pop-up says Cannot Get Mail  The connection to the server failed.  I get this pop-up on both my iPhone 5 and my iPad. I can still access my email, but the pop-up is real annoying.

    I keep getting an error pop-up when I try to access my email. The pop-up says Cannot Get Mail  The connection to the server failed.  I get this pop-up on both my iPhone 5 and my iPad. I can still access my email, but the pop-up is real annoying. Can someone please help me with this?  -Stu

    Hi StuNYC,
    Welcome to Apple Support Communities.
    It sounds like you're seeing an alert message when opening Mail on your iOS devices. Do you have multiple email accounts setup on the devices? Take a look at the article below, it provides suggestions that will resolve most issues that  cause an alert like that to appear in when starting the Mail app.
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    I hope this helps.
    -Jason

  • Can't access my gmail using the gmail app. States your browser's cookie functionality is turned off. please turn on. How do i do that???

    Can't access my gmail using the gmail app. States your browser's cookie functionality is turned off. please turn on. How do i do that???

    what if I don't want to accept cookies? I didn't have to before I upgraded

  • My garageband can't be used because when I open a project (new or old) the program extends beyond the bottom of the display screen and I can't access what is below the bottom of the screen (like the record button).  I know there's a simple fix, but what?

    My garageband can't be used because when I open a project (new or old) the program extends beyond the bottom of the display screen and I can't access what is below the bottom of the screen (like the record button).  I know there's a simple fix, but what?

    two things to try: either click the green "zoom" bottom at the topLeft of the window in the title bar, or go to your System Prefs and then Displays, and increase the resolution that is used

  • When I open an event I can only see one photo. The view option for dispaying thumbnails is greyed.

    When I open an event I can only see one photo. The view option for dispaying thumbnails is greyed. Iphoto '08 has worked perfectly for years. Suddenly it's balky~

    Have you tried moving the thumbnail size slider at the botton on the screen?
    LN

  • Download ios 7, and the location function is off, I can not access because I forgot the key constraints, I can not restore the iphone because I can not find iphone app access

    download ios 7, and the location function is off, I can not access because I forgot the key constraints, I can not restore the iphone because I can not find iphone app access

    If you have a passcode to the screen lock that you've forgotten, restore the device from the computer to which the device is synced. For information and instructions, see:
    http://support.apple.com/kb/ht1212
    If that will not work, you'll need to put the device into Recovery Mode and then try the Restore again:
    http://support.apple.com/kb/ht1808
    If that still doesn't work, as a last resort try DFU mode:
    http://www.iclarified.com/entry/index.php?enid=1034
    If your device is running iOS 7 and you set up Find My iPhone (iPad/iPod),  however, then it has the Activation Lock on it and you'll need to enter in your Apple ID and password to activate the device after restoring:
    http://support.apple.com/kb/HT5818
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

  • Can't access any shares on the network

    Hi,
    As the topic says, I can't access any shares on the network. I've tried connecting to a Iomega NAS, Windows 7 laptop, and a macMini. In the "Shared" list in finder im able to see all the shares, I'm able to click them and see the folders they share, but when I try to open one of the folders I get an error, no matter which share it is:
    +"The operation can’t be completed because the original item for “<folder name>” can’t be found."+
    The shares can all access each other, and they can access my folders. I just can't access any folder on the network.
    I got a mac pro with osx 10.6.2 and have all the latest updates.
    How can I solve this problem?
    Thanks.

    Well, try this (I was able to fix my with these steps):
    Go Utilities > Disk Utility
    Select your Startup Disk, e.g. Macintosh HD
    Then, under the First Aid Tab, click Verify Disk Permissions.
    If there are errors, then click repair Disk Permissions.
    After it is done, restart the computer and see if your problem is resolved.
    I hope this help.
    Zeke
    www.ZekeYuen.com/blog/

  • I can't change the view from player view to grid view in youtube

    i have a problem with youtube, i can't change the view from player view to grid view on channels that i visit, and that just happen with firefox, it dosent happen with explorer, so what can i do please?
    == This happened ==
    Not sure how often

    it didn't unfortunately, and i think that the problem in the JavaScript , Because when I click on the grid view icon i see on the bottom of the page "JavaScript" see the image:

  • How we can disable access to BOM via the Display Master Recipe (C203)?

    Hi Gurus,
    How we can disable access to BOM via the Display Master Recipe (C203)?
    Thanks!

    Hi Mae Baraquio  
    Have you tried screen variant to make it as display mode.
    please refer below document for your reference.
    Learning SHD0 with Example
    if you find any query kindly revert back.
    Thanks & Regards
    Sandeep Kumar Praharaj

  • I can't access "control panel" on my 4s from the lock screen. My settings are active

    I can't access "control panel" on my 4s from the lock screen or home screen. My settings are active.

    You can try resetting  Settings>General>Reset>Reset All Settings 
    if not
    Basics from the manual are restart, reset, restore
    Follow the 3R's- if a restart does not solve your problem proceed
    User troubleshooting is:
    1.restart, ie power off/on,
    2. reset  http://support.apple.com/kb/HT1430,
    3. restore from backup, restore as new device. http://support.apple.com/kb/HT1414

  • Can't access mail - getting message the connection to the server has timed out

    can't access mail - getting message the connection to the server has timed out

    Hi mtc,
    Has it worked before?
    Are you running any anti virus apps?
    If using a browser to login via WebMail, does that work?

  • I can't access my camera with the camera button.  Only able to make videos.

    I can't access my camera with the camera button.  Only able to make videos.

    Could you have accidentally toggled the photo to video? In the lower right (usually) corner there's a little icon that has both film and video camera and a tiny slider between them. That's how you switch from one to the other.

Maybe you are looking for

  • Error in Follow up transaction for quote created in r/3 in CRM

    Hi CRM Gurus, I need an information on a requirement ... I have maintained the middleware settings for transferring the quotation from r/3 to CRM . Now I want to create a contract as follow up document based on this quotation... is it possible? if ye

  • Regarding email attachement while running a background job

    Dear Experts, When i am running a background job for any ALV report (standard or custom report) <b>automatically</b> the output is going to an e-mail address as a HTML file attachment. I want to change it to EXCEL file attachment. Please help me on t

  • How to develop Asynchronous Document Based WebServices?

    Hi gurus, The scenario is, We are developing an architecture where Asynchronous Document Based WebServices are desired. As per my knowledge, This architecture includes some work at JMS side. Meaning, Client - > Calling [WebService] - > Deletgate -- >

  • Crashing and freezing with Simnetonline and Win8 with chrome and opera24

    Hi Problem with incompatibility with http://simnetonline.com and Opera 24 We use it for school and did a lesson where we were learning Windows 8.1 and office 2013 Onedrive and there was a question on how to change the background on the lock screen Op

  • Reading CLOBS with ODBC

    We are using Oracle 8.0.5 server on NT4.0 SP5, accessing it from our webserver, a Windows 2000 Server SP1, with the Oracle 8.00.510.00 ODBC driver. We are having problems with CLOBs using ADO and vbScript in ASP pages. We can write to a clob field fi