Extending Screens for Multi-Select in the LightSwitch HTML Client

Hi i
read Mike Droney's article of 
Extending Screens for Multi-Select in the LightSwitch HTML Client
But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
why does the contentItem.value.details have an ‘__isSelected’ property?
is the value of the contentItem not the screen?
and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
Thanks  

But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
why does the contentItem.value.details have an ‘__isSelected’ property?
is the value of the contentItem not the screen?
and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
The '__isSelected' property is a private member of the class msls.ContentItem related to the backing data for the selected item.  That is to say, it would be a private member if JavaScript actually had encapsulation and information hiding like a typical
object-oriented language. I like to reference David Herman's description from his book
Effective JavaScript:
Often, JavaScript programmers resort to coding conventions rather than any absolute enforcement mechanism for private properties. For example, some programmers use naming conventions such as prefixing or suffixing private property names with an underscore
character (_). This does nothing to enforce information hiding, but it suggests to well-behaved users of an object that they should not inspect or modify the property so that the object can remain free to change its implementation.
...which means that it's generally not recommended to directly get or set backing data properties like __isSelected, instead working with the public property 'selectedItem', although it may work fine in certain cases like this one.
To make _canExecute fire only when an item in the list is selected to enable a button method, try:
return (screen.Contacts.selectedItem !== null);

Similar Messages

  • Sapshcut.exe - Parameter for multi selection

    Hello,
    with sapshcut.exe we can start a new GUI session and start a transaction.
    For the parameters to start a transaction we use the "command" parameter of sapshcut.exe
    For example - command "SE09 TRDYSE01CM-USERNAME=WULFF"
    My question is if it is possible to fill parameters for multi selection.
    The syntax <field>-low=.... and <field>-high=... is working but <field(1)>=..... is not working.
    We want to start transaction ME2o using sapshcut.exe.
    Thanks
    Arnfried

    Dear Arnfried,
    have you checked sap note 103019?
    It describes how to provide parameters to sapshcut and shows the limitations.
    Best regards,
    Thomas

  • In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    Nic, for me the iTunes window looks like this, when I connect my iPad 3:
    I select the iPad in the "devices" section of the Sidebar (use: "View > Show Sidebar" if the sidebar is hidden).
    Click the "Apps" tab in the "Devices" pane.
    Scroll all the way down in the Devices pane to "File Sharing" "Apps" section.
    Then do I click "GarageBand" to select the documents in the right panel.
    Which part is different for you? Perhaps you could post a screenshot?
    Regards
    Léonie

  • For Multi Selection of Whare used list

    Dear Friends,
    I have Used T-code CS-15 for whare used list of material. if any other T-code for multi selection of materials for where used list.
    Please write.
    Thanks & Regards
    Ajit Sharma

    Hi Ajit,
    As mentioned in the previous posts, it is not adviced to have a multiple selection where-used, as the runtime is very long for this report.
    But if there is a specific need, you can build a Z report by using the FM -> CS_WHERE_USED_MAT
    But do ensure that your abaper puts in some restriction criteria. In the z report which i had done in one of the projects, i had put a restriction of 10 materials as the runtime was long.
    If helpful award points
    Regards,
    Vivek

  • Request for multi selection in XTree component

    Dear Donald,
    i need a small help in XTree component.Currently its supporting only single selection but i need to do multiple selection in that.Can you please enhance that for multi selection.This would be of great help to me.
    Appreciate your help...
    Thanks,
    Sreelekha

    Hi Sreelekha
    You need to contact Donald to ask for this enhancement so I will mark this as answered.
    Regards
    Matt

  • I smashed the screen of my iphone 5 earlier and it was bought just before christmas, i was wondering will apple repair the screen for free or swap the phone?

    i smashed the screen of my iphone 5 earlier and it was bought just before christmas, i was wondering will apple repair the screen for free or swap the phone? the phone is still working fine, just the screen needs changing by the looks of it.

    Why would Apple replace or repair the phone for free? Will a car manufacturer replace or repair the car you drove into a wall for free? If you sit on your spectacles, will the optician give you another pair for free?
    You can get an out of warranty replacement phone for $199 in the US, similar price in your local currency.

  • Lightswitch HTML Client - Detail picker for each related List Item

    I have a doubt in Lightswitch Html Client application.
    Scenario:
    Suppose i have two tables  "Property" and "PropertyVaues".
    A Property can have many PropertyValues is the relationship between them.
    I want to show the data on screen like below:
    Property List:
    XYZ            [___10____(+)]
    MNO          [___abc____(+)]
    PQR           [___30.5___(+)]
    Xyz  is the list item
    assume [___10____(+)]  is the detail picker of
    PropertyValues which allow to select one value related to
    XYZ Property item, and same for other list items.
    Only Related "PropertyValues" for each list item must be available in the detail picker.
    Please help me out if any one has the solution to solve it.
    Or you can give me any other way to accomplish the above scenario.
    Thanks

    Hello Josh,
    I am implementing it on AddEdit screen.
                      (1)                                              
    (2)                           
    Screen description:
    [Note: Some Images are in my next post]
    1. Image(1) shows the list of properties (GSM, Mill Name, CMS). These Properties have its respective property values in drop down.
    2. When i select any value from the dropdown list (eg. 10 from GSM). the value is assigned to all other drop down.
    [shown in image(3) next post]
    (4) Again when suppose i select value for "Mill Name" Property as "Abc", it is assigned to all other drop down.
    [shown in image(4) next post]
    I want that a property value must be assigned to its respective Property only.
    Please help me on this. Or suggest me another way out to accomplish such scenario.
    Thanks
    Ravi Patel

  • SSRS reports from Lightswitch Html Client

    I have created a Lightswitch desktop application that list the available reports that are stored in a table and also provides a button that when clicked launches the web browser to the URL for the report on the SQL server. My problem is now I'm trying to
    create the HTML client for the application and have no experience with Java Script. Does anyone know how to accomplish the something that I did on the desktop application on the HTML client?
    Below is the code that I used to open the URL in the browser in the desktop application.
    Imports Microsoft.LightSwitch.Threading
    Imports System.Runtime.InteropServices.Automation
    Namespace LightSwitchApplication
    Public Class ListReports
    Private Sub RunReport_Execute()
    ' Write your code here.
    Dim uri As New Uri(ReportsSet.SelectedItem.ReportAddress) 'website stored in the ReportsSet.ReportAddress field
    If (AutomationFactory.IsAvailable) Then
    Dim shell = AutomationFactory.CreateObject("Shell.Application")
    shell.ShellExecute(uri.ToString)
    ElseIf (Not System.Windows.Application.Current.IsRunningOutOfBrowser) Then
    System.Windows.Browser.HtmlPage.Window.Navigate(uri, "_blank")
    End If
    End Sub
    End Class
    End Namespace

    This may help:
    Creating Reports in LightSwitch HTML Client
    // Show Loading message
    var LoadingDiv = $("<div></div>");
    var Loading = $("<h1>&nbsp;&nbsp;&nbsp;&nbsp;Loading Report...</h1>");
    Loading.appendTo(LoadingDiv);
    LoadingDiv.appendTo($(element));
    // Get Report
    var HTMLContent = $("<div></div>").html(
    "<object width='650px' height='650px' data='../reports/ReportViewer.aspx?SurveyId="
    + contentItem.screen.SurveyId + "'/>"
    // Make report appear on top of the Loading message
    HTMLContent.css({
    "margin-top": "-50px"
    HTMLContent.appendTo($(element));
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • How  to get the value of multi-select in the   Dashboard Prompt

    I have a multi-select prompt in the Dashboard Prompt,  what I want is,   how do I know that user has choose one value,
    for examle,  for some reasons,  if user didn't choose any value,  then I will set one column in answer as "customer office" , if user choose one value, then the column in answer will be "customer name". 
    any comments, thanks.

    Hi,
    first define the presentation variable for the required column prompt. ex: PV
    Then in report level set the filter for that column = @{PV}{customer office}. here u have to give default value as "customer office", so by default the report in dashboard will show customer office even though the user does not select any value from dashboard prompt.
    Mark If Helpful/correct.
    Thanks.

  • Prerequisites for multi selection value help

    Hi everyone,
    a couple of blogs and forum entries show multi selection value helps in VC. I, on the other hand, have so far been unable to do this. The only option I get in the first step of the value help wizard is the "single selection" type. Even if I start off with a blank form view and add a text input field I cannot choose anything apart from a single selection value help. Is there something I am completely missing? I stumbled upon a note bringing this into connection with OLAP source systems, but I can't quite see why this should change anything since the source system is not selected until step 2 of the wizard.
    Any idea on this? Thanks a lot,
    Tilman

    Hi Mario,
    thanks for the hints, I got it working now, regardless of whether you use an OLAP source system, variables or the respective input port, though. It seems to suffice to connect the query directly to a form view to get the additional options. My problem was then that I had a form view connected to a nested iview. I should be able to connect it to both a query and the iview, though.
    Thanks for your help,
    Tilman

  • Values from a Multi-Select in the where clause of a Select statement

    I have a web page that solicits query parameters from the user.
    The selections that the user makes will populate the WHERE clause of a Select statement.
    One of the controls on the page is a multi-select control.
    When this page posts, I would like to execute a Select statement wherein the selected values from this control appear in the .. Column IN ( <list here> ) portion of the WHERE clause.
    This is an extremely common scenario, but I cannot seem to locate a how-to or message thread that addresses this specific case.
    I have an idea that it may involve dynamic SQL or Execute Immediate, but cannot seem to pin down the answer.
    Any help would be greatly appreciated!

    anonymous - As illustrated here: Re: Search on a typed in list of values
    Scott

  • I would like to create chapters within my footage for Scene selection on the DVD menu

    I have edited footage using FCPX and exported it to allow me to use it in IDVD. I now would like to set chapter markers so that the DVD menues allow for scene selection. I believe that I may have to do this in FCPX before exporting it
    Can you tell me how to do it.
    Thank you

    This is one of the most embarrassing omissions in FCP X. There is no proper facility to add chapter markers and export them with your movie.
    The way I get around it is to make each chapter a separate project in its own right. I then export each of the chapters and when I bring them into my DVD Authoring application, it's a synch to add the chapter markers (between each file on the timeline) with precision.
    As you've already created your project (presumably in one hit) create a new project for each chapter then copy and paste the relevant clips into each 'chapter' project, then export.
    Alternatively, you can add chapter markers from within the preview window in Compressor if you have it - but it's quite fiddley and not very precise.
    Andy

  • How to access the C# file in server from Lightswitch HTML Client

    Hi,
    In that LightSwitch HTML Application i have some c# file in the server project.How can i access those C# file in the screens (HTML Client project )
    thanks,
    goblalakrishnan s
    gobalakrishnan S

    Hi,
    with implementing Generic File Handlers (.ashx)
    See follow link:
    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/174/Full-Control-LightSwitch-ServerApplicationContext-And-Generic-File-Handlers-And-Ajax-Calls.aspx
    regards
    j.nord

  • Runtime Error in VS2012 (Update4) LightSwitch HTML Client

    I have a desktop (Silverlight) application, I upgraded the project to add the HTML Client. Now when I run the HTML Client, it shows this message box on the browser:
    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    I started my desktop application in VS2012 Update 2, and now it is in the Update 4. The interesting thing is that when I make new Project and then add HTML Client, I will not receive this error and it works fine.
    It shows this error only on that specific project (Which I started on VS2012 Update2, later Update3 and now Update4) and that project is very big (more than 100 tables and screens), therefore I can not make that from scratch again.
    I have to add HTML Client to my project. I really appreciate if someone can help me.

    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    Hi Keysen,
    First you need install Microsoft.LightSwitch.Client.JavaScript.Runtime 2.5.2. This update can be downloaded from the NuGet Gallery, see:
    http://www.nuget.org/packages/Microsoft.LightSwitch.Client.JavaScript.Runtime/
    Because this issue is project specific, you can also turn the build output, in the
    Options window, find Projects and Solutions >> 
    Build and Run. Find Diagnostic in the drop-down for MSBuild project build output verbosity. It will give detailed information why this happens.
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 'Days Elapsed' computed field in lightswitch HTML client

    I am developing a simple lightswitch HTML application to keep track of research experiments. I have a table called 'Experiments' and one of the fields is 'ExperimentDate'. I want to display the number of days that have passed since the date of experiment.
    Is there any way to do this?

    Use a custom control to display 'ExperimentDate' and display the calculation. Use in-built JavaScript datetime functions or add a JavaScript library such as moment.js. Similar to this MSDN article sections:
    Format a Date
    Moment.js
    You can see the use in this
    stackoverflow post.
    var date1 = new Date("02/Feb/2015 00:00:00"),
    date2 = new Date("25/Feb/2015 10:09:00"),
    diff = date2.getTime() - date1.getTime(),
    days = Math.floor(diff / (1000 * 60 * 60 * 24));
    Cheers
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

Maybe you are looking for

  • Attachments in Outlook Integration

    Hello experts, I have troubles enclosing attachments using Outlook Integration. A customer wants to add more attachments to a mail, for example a Purchase Order (PDF) and a logo (PNG, GIF etc.). When a new purchase order is saved and I click the mail

  • Aironet 1260 as bridges

    Is it possible to create a wireless site to site link using 1260 access points as bridges (like the 1300 series)? Also if so, can you use 11n channel bonding on the bridge link? I need to link 2 buildings together wirelessly approximately 70 metres a

  • SRM service procurement config

    Hi srm team, please give the details of configuration settings for service procurement in srm. arun Edited by: arun kumar on Oct 13, 2008 5:37 AM

  • Object ID in BAPI_RECORD_DELETE

    Hi all, In the bapi BAP_RECORD_DELETE what does the field OBJECT ID refers to? How can i get this number for a particular record? I have tried getting it from Record->XML representation and Record->Key in ORGANIZER transaction. But i am getting an er

  • WRT54G reboots every 20 minutes

    I recently just switched from astound to comcast and astound worked fine 100% uptime no d/cs or anything...When we switched to comcast the router reboots every 20 minutes. I called comcast and they said everything is fine on their end. I tried power