Height of an open dropdownlist

hi
I need to increase the height of open dropdownlist. Please give idea for that

Hi,
Please go through following link :
http://stackoverflow.com/questions/2291957/flex-how-to-change-open-dropdownlist-height
Thanks and Regards,
Vibhuti Gosavi | [email protected] | www.infocepts.com

Similar Messages

  • Textbox height changes after opening report

    Hi
    I have a textbox in which I set the height to .01. When I preview it looks fine. I then save the report and then reopen it, I find that all my textbox height has been changed to 0.042. Does anyone know why this happens and how to stop crystal reports from changing the height. I have can grow disabled and I have tried locking position and size, both haven't helped.
    Thanks in advance,
    Daniel

    Hi Daniel,
    Thank you. I've verified it does get reset, not sure why though. I'll have to check with the developers what the reasoning is.
    I should ask why do you need the object that small? They will ask.
    Thank you
    Don
    Edited by: Don Williams on Apr 26, 2010 10:46 AM

  • Openoffice 3.2 calc doesn't save row height in xls

    Hi All,
    I have upgraded to ooo 3.2 recently. I work with excels spreadsheets so  I have to save files into xls. Suddenly I realized that Calc doesn't save custom row height, when I open the file all rows are displayed with default height. It worked in the previous version, pacman log: upgraded go-openoffice (3.1.1.5-1 -> 3.2.0.4-1)
    I searched ooo forums, but didn't find anything.
    update:
    in case someone is interested, I have found a kind of work-around. Select sheet, Format / Rows / Optimal height -> increase value at least one step, in my case from 0.0 mm to 0.1 mm, then save. Reopen xls, rows will be displayed with the custom heights. Unfortunately one has to apply this workaround on every singe sheet in the workbook. :-/ No way I would do this with all my workbooks.
    Last edited by siriusb (2010-02-03 09:52:39)

    Workaround with downgrade: If someone successfully downgraded to 3.1.1 it wont start because depends on libjpeg.so.7.
    1. Create a script somewhere in your PATH and make it executable:
    #!/bin/bash
    LD_PRELOAD=/var/tmp/libjpeg.so.7.0.0 soffice -calc "$1"
    2. copy libjpeg.so.7.0.0 to the directory mentioned in the script (in this case /var/tmp)
    3. in your file manager e.g. nautilus right click on the xls, choose properties / Open with / custom command, and use the script's name.

  • Javascript Popup - height

    Good morning,
    Hopefully one of you experts will be able to help me.
    I have added some javascript in my page header to do the following:
    I want to open a popup page, centre page, no scrollbars, no resize etc. This all works fine as does the width of the popup page. Somehow the height of the popup doesn't stick and it appears to be about 800 in height??? I am baffled by it and would welcome any help. Thanks in advance.
    Sue
    Here is my code:
    <script type="text/javascript">
    function PopupPage()
    popUp2('f?p=&APP_ID.:75:&SESSION.::NO:::',"toolbar=no,scrollbars=no,,statusbar=no,,resizable=no,height=300,width=300,left=362,top=234");
    </script>

    I haven't solved this problem, I'm still baffled by it but my colleague has given me another solution and it works. Just incase anyone else ever has a similar problem, here's his solution:
    Page Header:
    <script type="text/javascript">
    function PopUpNamedViewDetails(url, name, top, left, width, height)
    settings=
    "toolbar=no,location=no,directories=no,"+
    "status=no,menubar=no,scrollbars=no,"+
    "left="+left+",top="+top+
    "resizable=yes,width="+width+",height="+height;
    MyNewWindow=window.open(url,name,settings);
    </script>
    javascript call
    javascript:PopUpNamedViewDetails('f?p=&APP_ID.:83:&APP_SESSION.','Individuals',134,362,300,300);

  • Detect other open windows ?

    Can AIR at this point detect other open windows and interact with them ? I mean can AIR have get methods for x,y,width,height of other open windows exepct of the AIR app ?

    An AIR application can get windows it has opened, using the NativeApplication.openedWindows property. It cannot detect the windows opened by other applications.

  • Expand select dropdownlist

    I am trying to expand a open dropdownlist upon clicking on a statictext.
    var w = new Window ("dialog");
    var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
    var g0 = w.add("group {orientation: 'row', alignChildren: ['fill', 'fill'], margins: 0}");
    var lbCategoryCodes1 = g0.add("dropdownlist", undefined, ["test 1", "testerterg"]);
    b = w.add('button', undefined, "OK");
    ss1.addEventListener('mousedown', function(kev)
        var event = ScriptUI.events.createEvent('MouseEvent');
        event.initMouseEvent('mousedown', true, true, w);
        lbCategoryCodes1.dispatchEvent(event);
      },false/*==bubble*/);
    w.show();
    Does not work.
    How do I?

    withoutdix,
    I hope, I understood you right.
    Do you want to do something like this?
    var w = new Window ("dialog");
    var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
    var lbCategoryCodes1 = w.add("dropdownlist", undefined, ["test 1", "testerterg"]);
    lbCategoryCodes1.selection = 0;
    var item = lbCategoryCodes1.selection;
    b = w.add('button', undefined, "OK");
    lbCategoryCodes1.onChange = function () {
        item = lbCategoryCodes1.selection;
        return item;
    w.show();
    try {
        alert(item);
    catch (e) {}
    Have fun
    Otherwise see Peter Kahrels Script-ui.pdf for more details.

  • Dynamic CRM 2013 Online how to execute Report, generate PDF and email

    Dear All,
    I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
    Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
    quote form.
    I am using the attached code, but facing various issues.
    1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
    Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script type="text/javascript">
    var Xrm;
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    function getReportingSession() {
    var reportName = "Quotation_Report"; //set this to the report you are trying to download
    var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var recordid = Xrm.Page.data.entity.getId();
    // recordid = recordid.substring(1, 37); //getting rid of curly brackets
    alert(recordid);
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
    var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
    var ret = new Array();
    ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
    x = retrieveEntityReq.responseText.indexOf("ControlID=");
    ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
    return ret;
    function createEntity(ent, entName, upd) {
    var jsonEntity = JSON.stringify(ent);
    var createEntityReq = new XMLHttpRequest();
    var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
    createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
    createEntityReq.setRequestHeader("Accept", "application/json");
    createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    createEntityReq.send(jsonEntity);
    var newEntity = JSON.parse(createEntityReq.responseText).d;
    alert("new entity" + newEntity);
    return newEntity;
    function createAttachment() {
    var params = getReportingSession();
    var recordid = Xrm.Page.data.entity.getId();
    alert("recordid " + recordid);
    var orgName = Xrm.Page.context.getOrgUniqueName();
    var userID = Xrm.Page.context.getUserId();
    //create email record
    // Prepare the SOAP message.
    var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
    " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
    " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
    "<soap:Header>" +
    "</soap:Header>" +
    "<soap:Body>" +
    "<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
    "<entity xsi:type='email'>" +
    "<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
    "<subject>" + "Email with Attachment4" + "</subject>" +
    "</entity>" +
    "</Create>" +
    "</soap:Body>" +
    "</soap:Envelope>";
    // Prepare the xmlHttpObject and send the request.
    var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
    xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xHReq.setRequestHeader("Content-Length", xml.length);
    xHReq.send(xml);
    // Capture the result
    var resultXml = xHReq.responseXML;
    // alert("resultXml " + resultXml);
    // Check for errors.
    var errorCount = resultXml.selectNodes('//error').length;
    if (errorCount != 0) {
    alert("ERROR");
    var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
    alert(msg);
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    //var emailid = userID;
    var post = Object();
    post.Body = encodePdf(params);
    var email = new Array();
    email[0] =new Object();
    email[0].id = emailid;
    email[0].entityType ='email';
    post.Subject ="File Attachment";
    post.AttachmentNumber = 1;
    post.FileName ="Report.pdf";
    post.MimeType ="application/pdf";
    post.ObjectId = Object();
    post.ObjectId.LogicalName ="email";
    post.ObjectId.Id = email[0].id;
    post.ObjectTypeCode ="email";
    alert(post.ObjectId.Id);
    createEntity(post,"ActivityMimeAttachment", "");
    alert("created successfully");
    email.Subject = "Your Order";
    //Set The current order as the Regarding object
    email.RegardingObjectId = {
    Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
    //Create Email Activity
    SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
    // Email Call Back function
    function EmailCallBack(result) {
    email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
    var activityPartyFrom = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyFrom.PartyId = {
    Id: customerId, // id of entity you want to associate this activity with.
    LogicalName: "contact"
    // Set the "activity" of the ActivityParty
    activityPartyFrom.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
    // Create the from ActivityParty for the email
    SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
    var activityPartyTo = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyTo.PartyId = {
    Id: ownerId, // id of entity you want to associate this activity with.
    LogicalName: "systemuser"
    // Set the "activity" of the ActivityParty
    activityPartyTo.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity). activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
    // Create the from ActivityParty
    SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
    //ActivityParty From Callback
    function ActivityPartyFromCallBack(result) {
    //ActivityParty To Callback
    function ActivityPartyToCallBack(result) {
    var StringMaker = function () {
    this.parts = [];
    this.length = 0;
    this.append = function (s) {
    this.parts.push(s);
    this.length += s.length;
    this.prepend = function (s) {
    this.parts.unshift(s);
    this.length += s.length;
    this.toString = function () {
    return this.parts.join('');
    var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    function encode64(input) {
    var output = new StringMaker();
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    while (i < input.length) {
    chr1 = input[i++];
    chr2 = input[i++];
    chr3 = input[i++];
    enc1 = chr1 >> 2;
    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    enc4 = chr3 & 63;
    if (isNaN(chr2)) {
    enc3 = enc4 = 64;
    else if (isNaN(chr3)) {
    enc4 = 64;
    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
    return output.toString();
    var bdy = new Array();
    var bdyLen = 0;
    function concat2Bdy(x) {
    bdy[bdyLen] = x;
    bdyLen++;
    function encodePdf(params) {
    bdy = new Array();
    bdyLen = 0;
    var retrieveEntityReq = new XMLHttpRequest();
    var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
    retrieveEntityReq.open("GET", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.send();
    BinaryToArray(retrieveEntityReq.responseBody);
    return encode64(bdy);
    </SCRIPT>
    <SCRIPT type=text/vbscript>
    Function BinaryToArray(Binary)
    Dim i
    ReDim byteArray(LenB(Binary))
    For i = 1 To LenB(Binary)
    byteArray(i-1) = AscB(MidB(Binary, i, 1))
    concat2Bdy(AscB(MidB(Binary, i, 1)))
    Next
    BinaryToArray = byteArray
    End Function
    </SCRIPT>
    </head>
    <body>
    <input type="button" onclick="createAttachment();" value="Attach Report" />
    </body>
    </html>
    Thanks. and waiting for your valuable comments.
    - Mittal

    Hello,
    Yes, I was able to make my code working as below. Tested on CRM online 2013.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    <script type="text/javascript">
    if (typeof (SDK) == "undefined")
    { SDK = { __namespace: true }; }
    SDK.JScriptRESTDataOperations = {
    _context: function () {
    if (typeof GetGlobalContext != "undefined")
    { return GetGlobalContext(); }
    else {
    if (typeof Xrm != "undefined") {
    return Xrm.Page.context;
    else { return new Error("Context is not available."); }
    _getServerUrl: function () {
    var serverUrl = this._context().getServerUrl()
    if (serverUrl.match(/\/$/)) {
    serverUrl = serverUrl.substring(0, serverUrl.length - 1);
    return serverUrl;
    _ODataPath: function () {
    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
    _errorHandler: function (req) {
    return new Error("Error : " +
    req.status + ": " +
    req.statusText + ": " +
    JSON.parse(req.responseText).error.message.value);
    _dateReviver: function (key, value) {
    var a;
    if (typeof value === 'string') {
    a = /Date\(([-+]?\d+)\)/.exec(value);
    if (a) {
    return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
    return value;
    Create: function (object, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 201) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send(JSON.stringify(object));
    Retrieve: function (id, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 200) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    Update: function (id, object, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("X-HTTP-Method", "MERGE");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 204 || this.status == 1223) {
    successCallback();
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send(JSON.stringify(object));
    Delete: function (id, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("X-HTTP-Method", "DELETE");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 204 || this.status == 1223) {
    successCallback();
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
    if (filter != null) {
    filter = "?" + filter;
    else { filter = ""; }
    var req = new XMLHttpRequest();
    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 200) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    __namespace: true
    </script>
    <script type="text/javascript">
    //Create Email and link it with Order as Regarding field
    var Xrm;
    var email = new Object();
    var ownerID = "";
    var CustomerId = "";
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    //Get ownerid who send email of quotation to customer
    function GetOwnerID() {
    var owner = Xrm.Page.getAttribute("ownerid").getValue();
    ownerID = owner[0].id;
    var ownerName = owner[0].name;
    var entityType = owner[0].entityType;
    GetToEmailGUID();
    //Get customerid who receive email of quotation from owner
    function GetToEmailGUID() {
    var Customer = Xrm.Page.getAttribute('customerid').getValue();
    CustomerId = Customer[0].id;
    var CustomerName = Customer[0].name;
    var entityType = Customer[0].entityType;
    //if CustomerId is type of "Account" then get Primary Contact id of that account
    if (entityType == "account") {
    var contact = Xrm.Page.getAttribute("customerid").getValue();
    if (contact === null) return;
    var serverUrl = Xrm.Page.context.getClientUrl();
    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
    var req = new XMLHttpRequest();
    req.open("GET", oDataSelect, false);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
    req.onreadystatechange = function () {
    if (req.readyState === 4) {
    if (req.status === 200) {
    var retrieved = JSON.parse(req.responseText).d;
    CustomerId = retrieved.PrimaryContactId.Id;
    else {
    alert(this.statusText);
    req.send();
    function CreateEmail() {
    GetOwnerID();
    email.Subject = "Email with Report Attachment";
    //Set The current order as the Regarding object
    email.RegardingObjectId = {
    Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
    //Create Email Activity
    SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
    // Email Call Back function
    function EmailCallBack(result) {
    email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
    var activityPartyFrom = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyFrom.PartyId = {
    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
    LogicalName: "contact"
    // Set the "activity" of the ActivityParty
    activityPartyFrom.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
    // Create the from ActivityParty for the email
    SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
    var activityPartyTo = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyTo.PartyId = {
    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
    LogicalName: "systemuser"
    // Set the "activity" of the ActivityParty
    activityPartyTo.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
    // Create the from ActivityParty
    SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
    //ActivityParty From Callback
    function ActivityPartyFromCallBack(result) {
    //ActivityParty To Callback
    function ActivityPartyToCallBack(result) {
    GetReportId('Quotation');
    //Create attachment for the created email
    function CreateEmailAttachment() {
    //get reporting session and use the params to convert a report in PDF
    var params = getReportingSession();
    //Email attachment parameters
    var activitymimeattachment = Object();
    activitymimeattachment.ObjectId = Object();
    activitymimeattachment.ObjectId.LogicalName = "email";
    activitymimeattachment.ObjectId.Id = email.ActivityId;
    activitymimeattachment.ObjectTypeCode = "email",
    activitymimeattachment.Subject = "File Attachment";
    activitymimeattachment.Body = encodePdf(params);
    activitymimeattachment.FileName = "Report.pdf";
    activitymimeattachment.MimeType = "application/pdf";
    //Attachment call
    SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
    //ActivityMimeAttachment CallBack function
    function ActivityMimeAttachmentCallBack(result) {
    var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
    var width = "800px";
    var height = "600px";
    window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
    // To open window which works in outlook and IE both
    //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width, height, features);
    //This method will get the reportId based on a report name that will be used in getReportingSession() function
    function GetReportId(reportName) {
    var oDataSetName = "ReportSet";
    var columns = "ReportId";
    var filter = "Name eq '" + reportName + "'";
    retrieveMultiple(oDataSetName, columns, filter, onSuccess);
    function retrieveMultiple(odataSetName, select, filter, successCallback) {
    var serverUrl = Xrm.Page.context.getServerUrl();
    var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
    var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
    if (select) {
    odataUri += "$select=" + select + "&";
    if (filter) {
    odataUri += "$filter=" + filter;
    $.ajax({
    type: "GET",
    contentType: "application/json; charset=utf-8",
    datatype: "json",
    url: odataUri,
    beforeSend: function (XMLHttpRequest) {
    XMLHttpRequest.setRequestHeader("Accept", "application/json");
    success: function (data) {
    if (successCallback) {
    if (data && data.d && data.d.results) {
    successCallback(data.d.results);
    else if (data && data.d) {
    successCallback(data.d);
    else {
    successCallback(data);
    error: function (XmlHttpRequest, errorThrown) {
    if (XmlHttpRequest && XmlHttpRequest.responseText) {
    alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
    function onSuccess(data) {
    reportId = data[0].ReportId.replace('{', ").replace('}', ");
    CreateEmailAttachment(); // Create Email Attachment
    //Gets the report contents
    function getReportingSession() {
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    var Id = Xrm.Page.data.entity.getId();
    var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
    quotationGUID = quotationGUID.replace('}', "");
    var reportName = "Quotation"; //set this to the report you are trying to download
    var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var rptPathString = ""; //set this to the CRMF_Filtered parameter
    var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" +
    reportName + "&isScheduledReport=false&p:CRMAF_Filteredquote=" + strParameterXML;
    //remove the part starting from &p:salesorderid if your report has no parameters
    retrieveEntityReq.send(rptPathString);
    var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
    var ret = new Array();
    ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
    x = retrieveEntityReq.responseText.indexOf("ControlID=");
    ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
    return ret;
    var bdy = new Array();
    var bdyLen = 0;
    function concat2Bdy(x) {
    bdy[bdyLen] = x;
    bdyLen++;
    function encodePdf(params) {
    bdy = new Array();
    bdyLen = 0;
    var retrieveEntityReq = new XMLHttpRequest();
    var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
    "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
    "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
    retrieveEntityReq.open("GET", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.send();
    BinaryToArray(retrieveEntityReq.responseBody);
    return encode64(bdy);
    var StringMaker = function () {
    this.parts = [];
    this.length = 0;
    this.append = function (s) {
    this.parts.push(s);
    this.length += s.length;
    this.prepend = function (s) {
    this.parts.unshift(s);
    this.length += s.length;
    this.toString = function () {
    return this.parts.join('');
    var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    function encode64(input) {
    var output = new StringMaker();
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    while (i < input.length) {
    chr1 = input[i++];
    chr2 = input[i++];
    chr3 = input[i++];
    enc1 = chr1 >> 2;
    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    enc4 = chr3 & 63;
    if (isNaN(chr2)) {
    enc3 = enc4 = 64;
    } else if (isNaN(chr3)) {
    enc4 = 64;
    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
    return output.toString();
    </script>
    <script type="text/vbscript">
    Function BinaryToArray(Binary)
    Dim i
    ReDim byteArray(LenB(Binary))
    For i = 1 To LenB(Binary)
    byteArray(i-1) = AscB(MidB(Binary, i, 1))
    concat2Bdy(AscB(MidB(Binary, i, 1)))
    Next
    BinaryToArray = byteArray
    End Function
    </script>
    </head>
    <body>
    <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>
    Thank you,
    Mittal.

  • How can I display "detailStamp" facet selectively for rows in a table ?

    Hi,
    My JDEV version is Studio Edition Version 11.1.1.5.0
    I am trying to display "detailStamp" facet selectively .
    If I read api in link below
    http://docs.oracle.com/cd/E26098_01/apirefs.1112/e17488/oracle/adf/view/rich/component/rich/data/RichTable.html
    Use the "detailStamp" facet on the Table to include a collapsable content area for each table row. Please note that the height of the open detail area will be a set height based on the height of the detailStamp component. Adding a component that changes in height (like showDetail or panelBox) will by default produce strange results when the detailStamp component's height changes.
    Detail Stamp can be selectively displayed for rows in the table by EL binding the "rendered" attribute of the "detailStamp" facet to "true" or "false". The EL binding can contain references to the table "var" attribute since during rendering it will be executed in the context of the row. Disclosure icon is displayed only for rows which have rendered="true".
    I can see that i can achieve it by setting rendered property for that facet. BUT this property is not available in Studio Edition Version 11.1.1.5.0

    Hi Frank.
    Thanks for your quick reply .
    But I am using Studio Edition Version 11.1.1.5.0 . In this version the property RENDERED of f:facet name="detailStamp" is NOT allowed.
    Edited by: user13764942 on Feb 7, 2013 5:48 AM
    Put in another way , I want to render the "detailStamp" facet selectively for rows , so for that I need the RENDERED property of "detailStamp" facet. This property is ONLY available in Jdev version 11.2 . I am using Jdev 11.1.1.5.0 so I need some alternative to RENDERED property as this property is NOT available in Jdev 11.1.1.5.0.
    Please suggest some way to achieve this behaviour of displaying "detailStamp" facet selectively ....
    Thanks!
    Edited by: Mangpal Singh on Feb 7, 2013 11:57 PM

  • Need to stop creation of second popup until first popup is completed

    Hi All,
    I have a popup window in a WD component that display a PDF report. It works perfectly. However, I just received a new requirement to create another popup window immediately prior to the PDF report popup window which will allow the users to answer a Yes/No question which will change the content of the PDF. I thought that this would be a simple request and created another window for this new popup and preceded the call to create the PDF popup window with a call to create and open the new popup window. The problem now is that when I run the WD Application, both popups are created and opened at the same time with the first popup behind the second popup.  I do not want the second popup to be created and opened until the user selects Yes/No on the first popup window.
    Does anyone have an idea how to accomplish this?
    Thanks,
    Gregg

    Following is the code that I am currently using that is causing the issue:
    *-- Data definition
      DATA: lv_title           TYPE string.
    *-- Window Definition
      DATA:
            lr_window_manager TYPE REF TO if_wd_window_manager,
            lr_api_component  TYPE REF TO if_wd_component,
            lr_popup_window   TYPE REF TO if_wd_window,
            lr_pdf_window     TYPE REF TO if_wd_window.
    *--  Update the context before any action processing
      wd_this->update_context(  ).
      lv_title = wd_assist->if_wd_component_assistance~get_text( 'TPP' ).
      lr_api_component  = wd_this->wd_get_api( ).
      lr_window_manager = lr_api_component->get_window_manager( ).
      lr_popup_window  = lr_window_manager->create_window(
                         window_name            = 'ZZ_W_POPUP'
                         title                  = lv_title
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                         button_kind            = if_wd_window=>co_buttons_yesno
                         message_type           = if_wd_window=>co_msg_type_question
                         default_button         = if_wd_window=>co_button_yes ).
      lr_popup_window->open( ).
      lv_title = wd_assist->if_wd_component_assistance~get_text( 'TPP' ).
      lr_pdf_window    = lr_window_manager->create_window(
                         window_name            = 'ZZ_W_PRINT_PDF'
                         title                  = lv_title
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                         button_kind            = if_wd_window=>co_buttons_ok
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok ).
      lr_pdf_window->set_window_size( width  = '98%'
                                      height = '100%' ).
      lr_pdf_window->open( ).

  • CRM ONLINE 2013: On Approval Of Quotation, Run Report, Generate PDF and Send an Email With PDF as attachment

    Hi,
    I am using CRM ONLINE 2013.
    How to automate below process?
    1. On Approval Of Quotation, Run Report.
    2. Generate PDF.
    3. Send an Email With PDF as attachment.
    As i have gone through many forums for this topic, but creating a plugin code for generating Report PDF is not possible in CRM ONLINE.
    So, What is the alternate way to do this..?
    Thanks.

    This is my entire code mentioned below:-
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
        <script type="text/javascript">
            if (typeof (SDK) == "undefined")
            { SDK = { __namespace: true }; }
            SDK.JScriptRESTDataOperations = {
                _context: function () {
                    if (typeof GetGlobalContext != "undefined")
                    { return GetGlobalContext(); }
                    else {
                        if (typeof Xrm != "undefined") {
                            return Xrm.Page.context;
                        else { return new Error("Context is not available."); }
                _getServerUrl: function () {
                    var serverUrl = this._context().getServerUrl()
                    if (serverUrl.match(/\/$/)) {
                        serverUrl = serverUrl.substring(0, serverUrl.length - 1);
                    return serverUrl;
                _ODataPath: function () {
                    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
                _errorHandler: function (req) {
                    return new Error("Error : " +
      req.status + ": " +
      req.statusText + ": " +
      JSON.parse(req.responseText).error.message.value);
                _dateReviver: function (key, value) {
                    var a;
                    if (typeof value === 'string') {
                        a = /Date\(([-+]?\d+)\)/.exec(value);
                        if (a) {
                            return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
                    return value;
                Create: function (object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 201) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Retrieve: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                Update: function (id, object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "MERGE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Delete: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "DELETE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
                    if (filter != null) {
                        filter = "?" + filter;
                    else { filter = ""; }
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                __namespace: true
        </script>
        <script type="text/javascript">
            //Create Email and link it with Order as Regarding field
            var Xrm;
            var email = new Object();
            var ownerID = "";
            var CustomerId = "";
            if (window.opener) { Xrm = window.opener.Xrm; }
            else if (window.parent) { Xrm = window.parent.Xrm; }
            //Get ownerid who send email of quotation to customer
            function GetOwnerID() {
                var owner = Xrm.Page.getAttribute("ownerid").getValue();
                ownerID = owner[0].id;
                var ownerName = owner[0].name;
                var entityType = owner[0].entityType;
                GetToEmailGUID();
            //Get customerid who receive email of quotation from owner
            function GetToEmailGUID() {
                var Customer = Xrm.Page.getAttribute('customerid').getValue();
                CustomerId = Customer[0].id;
                var CustomerName = Customer[0].name;
                var entityType = Customer[0].entityType;
                //if CustomerId is type of "Account" then get Primary Contact id of that account
                if (entityType == "account") {
                    var contact = Xrm.Page.getAttribute("customerid").getValue();
                    if (contact === null) return;
                    var serverUrl = Xrm.Page.context.getClientUrl();
                    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
                    var req = new XMLHttpRequest();
                    req.open("GET", oDataSelect, false);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
                    req.onreadystatechange = function () {
                        if (req.readyState === 4) {
                            if (req.status === 200) {
                                var retrieved = JSON.parse(req.responseText).d;
                                CustomerId = retrieved.PrimaryContactId.Id;
                            else {
                                alert(this.statusText);
                    req.send();
            function CreateEmail() {
                GetOwnerID();
                email.Subject = "Email with Report Attachment";
                //Set The current order as the Regarding object
                email.RegardingObjectId = {
                    Id: Xrm.Page.data.entity.getId(),    //Get the current entity Id , here OrderId
                    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
                //Create Email Activity
                SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
            // Email Call Back function
            function EmailCallBack(result) {
                email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
                var activityPartyFrom = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyFrom.PartyId = {
                    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "contact"
                // Set the "activity" of the ActivityParty
                activityPartyFrom.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).
                activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
                // Create the from ActivityParty for the email
                SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
                var activityPartyTo = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyTo.PartyId = {
                    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "systemuser"
                // Set the "activity" of the ActivityParty  
                activityPartyTo.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).    
                activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
                // Create the from ActivityParty
                SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
            //ActivityParty From Callback
            function ActivityPartyFromCallBack(result) {
            //ActivityParty To Callback
            function ActivityPartyToCallBack(result) {
                GetReportId('ABM_Infotech_SalesQuote');
            //Create attachment for the created email
            function CreateEmailAttachment() {
                //get reporting session and use the params to convert a report in PDF
                var params = getReportingSession();
                //Email attachment parameters
                var activitymimeattachment = Object();
                activitymimeattachment.ObjectId = Object();
                activitymimeattachment.ObjectId.LogicalName = "email";
                activitymimeattachment.ObjectId.Id = email.ActivityId;
                activitymimeattachment.ObjectTypeCode = "email",
                    activitymimeattachment.Subject = "File Attachment";
                activitymimeattachment.Body = encodePdf(params);
                activitymimeattachment.FileName = "Report1.pdf";
                activitymimeattachment.MimeType = "application/pdf";
                //Attachment call
                SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
            //ActivityMimeAttachment CallBack function
            function ActivityMimeAttachmentCallBack(result) {
                var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
                var width = "800px";
                var height = "600px";
                window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
                // To open window which works in outlook and IE both
                //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width,
    height, features);
            //This method will get the reportId based on a report name that will be used in            getReportingSession() function
            function GetReportId(reportName) {
                var oDataSetName = "ReportSet";
                var columns = "ReportId";
                var filter = "Name eq '" + reportName + "'";
                retrieveMultiple(oDataSetName, columns, filter, onSuccess);
            function retrieveMultiple(odataSetName, select, filter, successCallback) {
                var serverUrl = Xrm.Page.context.getServerUrl();
                var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
                var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
                if (select) {
                    odataUri += "$select=" + select + "&";
                if (filter) {
                    odataUri += "$filter=" + filter;
                $.ajax({
                    type: "GET",
                    contentType: "application/json; charset=utf-8",
                    datatype: "json",
                    url: odataUri,
                    beforeSend: function (XMLHttpRequest) {
                        XMLHttpRequest.setRequestHeader("Accept", "application/json");
                    success: function (data) {
                        if (successCallback) {
                            if (data && data.d && data.d.results) {
                                successCallback(data.d.results);
                            else if (data && data.d) {
                                successCallback(data.d);
                            else {
                                successCallback(data);
                    error: function (XmlHttpRequest, errorThrown) {
                        if (XmlHttpRequest && XmlHttpRequest.responseText) {
                            alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
            function onSuccess(data) {
                reportId = data[0].ReportId.replace('{', ").replace('}', ");
                CreateEmailAttachment(); // Create Email Attachment
            //Gets the report contents
            function getReportingSession() {
                var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
                var retrieveEntityReq = new XMLHttpRequest();
                var Id = Xrm.Page.data.entity.getId();
                var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
                quotationGUID = quotationGUID.replace('}', "");
                var reportName = "ABM_Infotech_SalesQuote"; //set this to the report you are trying to download
                var reportID = "751089AA-74B8-E211-B52F-D8D3855B253B"; //set this to the guid of the report you are trying to download
                var rptPathString = ""; //set this to the CRMF_Filtered parameter
                var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition
    attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
                retrieveEntityReq.open("POST", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName="
    +
                                reportName + "&isScheduledReport=false&p:ABMFilteredQuote=" + strParameterXML;
                //remove the part starting from &p:salesorderid if your report has no parameters
                retrieveEntityReq.send(rptPathString);
                var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
                var ret = new Array();
                ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
                x = retrieveEntityReq.responseText.indexOf("ControlID=");
                ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
                return ret;
            var bdy = new Array();
            var bdyLen = 0;
            function concat2Bdy(x) {
                bdy[bdyLen] = x;
                bdyLen++;
            function encodePdf(params) {
                bdy = new Array();
                bdyLen = 0;
                var retrieveEntityReq = new XMLHttpRequest();
                var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
                "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
                "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
                retrieveEntityReq.open("GET", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.send();
                BinaryToArray(retrieveEntityReq.responseBody);
                return encode64(bdy);
            var StringMaker = function () {
                this.parts = [];
                this.length = 0;
                this.append = function (s) {
                    this.parts.push(s);
                    this.length += s.length;
                this.prepend = function (s) {
                    this.parts.unshift(s);
                    this.length += s.length;
                this.toString = function () {
                    return this.parts.join('');
            var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            function encode64(input) {
                var output = new StringMaker();
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i = 0;
                while (i < input.length) {
                    chr1 = input[i++];
                    chr2 = input[i++];
                    chr3 = input[i++];
                    enc1 = chr1 >> 2;
                    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                    enc4 = chr3 & 63;
                    if (isNaN(chr2)) {
                        enc3 = enc4 = 64;
                    } else if (isNaN(chr3)) {
                        enc4 = 64;
                    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
                return output.toString();
        </script>
        <script type="text/vbscript">
        Function BinaryToArray(Binary)
               Dim i
               ReDim byteArray(LenB(Binary))
               For i = 1 To LenB(Binary)
                     byteArray(i-1) = AscB(MidB(Binary, i, 1))
                     concat2Bdy(AscB(MidB(Binary, i, 1)))
             Next
              BinaryToArray = byteArray
       End Function     
        </script>
    </head>
    <body>
        <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>

  • Can't run multiple instances on same page!

    Hi,
    Since I got no response on the shadowbox forums after 2 weeks, I thought it's worth to post it here and hope someone can help me out.
    Note: This is also related on non-joomla pages. I've tested it on plain html as well (by Dreamweaver) and get the same issue.
    The following issue was posted by me on the shadowbox forums:
    I was wondering if the following is possible.
    I've tried almost everything where I can think of, but no luck.
    Searched many forums and googled a lot, but without success.
    I got feeling that I'm so close and missing some simple solution.
    So I'm stuck here, I'm not able to figure it out.
    This is what I want to achieve:
    My website is running on Joomla 1.5. And I'm using a Shadowbox extension.
    In an article I've put multiple SWF movies, like previews acting like buttons.
    So when clicking on a SWF button/movie, Shadowbox opens and plays a related FLV movie.
    To achieve this part I've followed the instructions at this site under FAQ > first paragraph.
    So far so good...
    Now the ugly thing is when putting multiple swf buttons on a single page, after clicking a random button Shadowbox always displays the same flv movie. I did some altering with ID's and such but had no luck.
    Even try to alter with the Shadowbox options and variables, flashVars and such (at this site under Options and Usage) but that worked out for me.
    The strange thing is when placing the buttons, let's say in an article belonging to a section and category and make the articles paginated, after clicking the swf button the related flv plays. Browsing to the next page and clicking the button, the related flv will play also. This is the way it should be. Unfortunately it doesn't work when multiple buttons are displayed on the frontpage or an single article regardless whether they belong to sections and categories or not.
    Even when a single code is placed in a single article and display 2 or more articles containg a different swf and a different related flv link only the last added flv plays with every random swf button/movie.
    This the code I'm using for each swf (actionscript behavior):
    FIRST INSTANCE SWF=====================================
    on (release) {
    getURL("javascript:openShadowbox
    ('http://test.cquence-multimedia.nl/images/cqmm_test.flv','flv','title')");
    SECOND INSTANCE SWF=====================================
    on (release) {
    getURL("javascript:openShadowbox
    ('http://test.cquence-multimedia.nl/images/WizardFinal_1.flv','flv','title')");
    ================================================
    This is the code I'm using in the article (2 instances on a single page):
    =======================================================
    <!-- FIRST INSTANCE -->
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="150" height="50" data="images/default_swf_button.swf">
    <param name="movie" value="images/default_swf_button.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>-->                       
    <object width="150" height="50" data="images/default_swf_button.swf" type="application/x-shockwave-flash">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    </p>
    <script type="text/javascript">
    swfobject.registerObject("FlashID");
    </script>
    <script type="text/javascript">
    function openShadowbox(content, player, title, width, height, options){
    Shadowbox.open({
    content:"http://test.cquence-multimedia.nl/images/cqmm_test.flv",
    player:"flv",
    title:"SHADOWBOX FLASHBUTTON TEST FLV",
    width:"800px",
    height:"600px",
    </script>
    <!-- SECOND INSTANCE -->
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <object id="FlashID1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="150" height="50" data="images/default_swf_button2.swf">
    <param name="movie" value="images/default_swf_button2.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>-->        
    <object width="150" height="50" data="images/default_swf_button2.swf" type="application/x-shockwave-flash">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="9.0.45.0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash player" width="112" height="33" /></a>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>
    <script type="text/javascript">
    swfobject.registerObject("FlashID1");
    </script>
    <script type="text/javascript">
    function openShadowbox (content, player, title, width, height, options){
    Shadowbox.open({
    content:"http://test.cquence-multimedia.nl/images/WizardFinal_1.flv",
    player:"flv",
    title:"SHADOWBOX FLASHBUTTON TEST BRIAN",
    width:"800px",
    height:"600px",
    </script>
    =======================================================
    This is the link to the page in question:
    http://test.cquence-multimedia.nl/index.php?option=com_content&view=article&id=9&Itemid=13
    Please, any suggestions would be great!
    Thanks in advance.
    Best Regards,
    John.

    Sorry...I still don't get it. What is it about Windows FUS that keeps iTunes from running running the process twice? It can run many other non-Apple windows apps in multiple user sessions (commercial apps, open source apps, audio/video apps, networked apps). I can even run two different virtual machines at the same time under two different user sessions.
    Why can iTunesHelper.exe run twice but iTunes.exe cannot? Why can I run Safari at the same time? Quicktime Player runs fine under multiple user sessions.
    Blaming it on Windows and/or FUS sounds like FUD. Can anyone give a valid technical reason? Semaphores? Mutexes? An admission (and explanation) that the Windows version is purposely crippled?

  • Dragging an HTML component

    Hello,
    I'm a bit of a  newbie to Flex ( started Yesterday ) and i'm finding my way quit well. Using some of the examples that the internet provides i managed to create the following applcation:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx"
       width="1024" height="768"
       creationComplete="getData.send()" xmlns:flexui="flexunit.flexui.*">
    <fx:Script>
    <![CDATA[
    import flash.utils.flash_proxy;
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.core.DragSource;
    import mx.effects.easing.*;
    import mx.events.DragEvent;
    import mx.events.FlexEvent;
    import mx.managers.DragManager;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.xml.SimpleXMLDecoder;
    import mx.utils.ArrayUtil;
    [Bindable]
    public var Images:ArrayCollection;
    protected function toggleBtn(event:MouseEvent):void
    if(btn.label== 'Open')
    panelOut.play();
    else
    panelIn.play();
    protected function initiateDrag(event:MouseEvent, value:String):void
    var dragInitiator:HTML = event.currentTarget as HTML;
    var dragSource:DragSource = new DragSource();
    dragSource.addData(value, 'value');
    var dragProxy:HTML = new HTML();
    dragProxy.location = event.currentTarget.location;
    dragProxy.width = 100 ;
    dragProxy.height = 100 ;
    DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);
    private function dragEnterHandler(event:DragEvent):void {
    var dropTarget:VBox =event.currentTarget as VBox;
    if (event.dragSource.hasFormat('value')) {
    DragManager.acceptDragDrop(dropTarget);
    private function dragDropHandler(event:DragEvent):void {
    var value:String = event.dragSource.dataForFormat('value') as String;
    bigImage.location = "assets/Big_Html/"+value;
    ]]>
    </fx:Script>
    <mx:Canvas id="panel" width="1013.95" height="202" y="10.3" backgroundColor="#000000" x="0.05">
    <mx:TabNavigator x="2" y="0" width="994" height="181">
    <s:NavigatorContent label="Eerste" width="100%" height="100%" id="navigatorContent">
    <mx:HBox width="992" height="137">
    <mx:Repeater dataProvider="{getData.lastResult.gallery.image}"
    id="rep" width="991" height="137">
    <mx:HTML x="228" y="10" width="113" height="112" location="assets/Small_Html/{rep.currentItem}"
    mouseMove="initiateDrag(event,event.currentTarget.getRepeaterItem())" >
    </mx:HTML>
    </mx:Repeater>
    </mx:HBox>
    </s:NavigatorContent>
    <s:NavigatorContent label="Tweede" width="100%" height="100%">
    </s:NavigatorContent>
    </mx:TabNavigator>
    <mx:LinkButton id="btn" width="100%"  height="21" 
       label="Open"
       click="toggleBtn(event)" enabled="true" x="-3" y="179"/>
    <!--Add the content of your sliding panel here  -->
    </mx:Canvas>
    <mx:Canvas>
    </mx:Canvas>
    <mx:VBox width="995" height="508" backgroundColor="#000000"
    horizontalAlign="center" verticalAlign="middle"
    dragEnter="dragEnterHandler(event)"
    dragDrop="dragDropHandler(event)" x="19" y="250">
    <mx:HTML x="83" y="44" id="bigImage"/>
    </mx:VBox>
    <fx:Declarations>
    <mx:Move id="panelOut" target="{panel}" yTo="0" effectEnd="btn.label='Close'"
    duration="1500" easingFunction="Bounce.easeOut"/>       
    <mx:Move id="panelIn" target="{panel}" yTo="-180" effectEnd="btn.label='Open'"
    duration="1000"  easingFunction="Bounce.easeIn"/>   
    <mx:HTTPService id="getData"
    url="SWF.xml" />
    </fx:Declarations>
    </s:WindowedApplication>
    The goals of the application are:
    1     Getting a repeater filled with HTML pages get generated from an XML file
    2     Fitting the repeater in a box that can be hidden
    3     Open HTML pages from the repeater by dragging them into a bigger HTML component
    The first two points work great, no problems there. But the third is a bit more more demaning.
    I set off trying to get this to work with images and that worked  just fine. Apart from not being able to see what i'm dragging, minor issue. Now i try this with the HTML component things start to change. I guess this has to do with the fact that the mouse pointer interacts with the page shown in the HTML component rather then with the HTML component itself.
    Can anyone help with this problem. If not i guess i'm going to work with images in the repeater, that should work.
    Thanks in advanced for any input,
    Daniel

    No such component in 2.0.  See http://blogs.adobe.com/aharui/2008/01/html_and_flex_1.html for more info.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Sorting channels on Personalize Page

    Hello,
    I am trying to sort channels on a Personalize page alphabetically. This is the contentedit.jsp in JSPContentContainer. Later functionality is I'd like to be able to sort by another field. The channels are aquired and placed in a java.util.List called missedChannels. I tried the method Collections.sort(missedChannels); and it is working to a certain extent to sort alphabetically, but then it is getting the channels out of order again as if things are getting out of order later in the jsp. All my channels are uncategorized so I thought that my list would not be manipulated in the code preceding the listing of the uncategorized channels, keeping them in order.
    The JSP code for 1st half of jsp is as follows:
    <%--
    Copyright 2003 Sun Microsystems, Inc. All rights reserved
    Use is subject to license terms.
    --%>
    <%-- contentedit.jsp --%>
    <%@ page import="com.sun.portal.providers.containers.jsp.single.JSPSingleContainerProvider,
    com.sun.portal.providers.containers.jsp.table.JSPTableContainerProvider,
    com.sun.portal.providers.Provider,
    com.sun.portal.providers.ProviderWidths,
    com.sun.portal.providers.containers.jsp.tab.UnmodifiableTab,
    java.util.Map,
    java.util.Iterator,
    java.util.Collections,
    java.util.List,
    java.util.ArrayList,
    java.lang.Boolean"
    %>
    <%@ page session="false" %>
    <%@ taglib uri="/tld/desktop.tld" prefix="dt" %>
    <%@ taglib uri="/tld/jx.tld" prefix="jx" %>
    <%@ taglib uri="/tld/desktopProviderContext.tld" prefix="dtpc" %>
    <%@ taglib uri="/tld/desktopContainerProviderContext.tld" prefix="dtcpc" %>
    <%@ taglib uri="/tld/desktopTheme.tld" prefix="dttheme" %>
    <%
    JSPSingleContainerProvider scp = (JSPSingleContainerProvider)pageContext.getAttribute("JSPProvider");
    String container = (String)request.getParameter("container");
         pageContext.setAttribute( "container", container, PageContext.REQUEST_SCOPE );
    String parentContainer = scp.getProviderContext().getDefaultChannelName();
    String parentContainerProvider = scp.getProviderContext().getProviderName(parentContainer);
    String selectedTabName = request.getParameter("selected");
    JSPTableContainerProvider tcp = (JSPTableContainerProvider)scp.getContainerProviderContext().getProvider(request, scp.getName(), container);
    pageContext.setAttribute( "tableProvider", tcp );
    String fontFace1 = (String)pageContext.getAttribute("fontFace1", PageContext.REQUEST_SCOPE);
    %>
    <dt:obtainContainer container="$tableProvider">
    <dtcpc:containerProviderContext>
    <dt:getAvailableChannels id="availableChannels"/>
    <dt:getSelectedChannels id="selectedChannels"/>
    <jx:declare id="selectedChannels" type="List"/>
    <jx:declare id="availableChannels" type="List"/>
    <jsp:include page="personalizeHeader.jsp" flush="true"/>
    <script language="JavaScript" type="text/javascript">
    <%@ include file="close-windows.jsp" %>
    var popup_window;
    function launchPopup(url, name, width, height) {
    popup_window = window.open( url, name, 'width=' + width + ',height=' + height +',resizable=yes,scrollbars=yes');
    </script>
    <%@ include file="contentLayoutBar.jsp" %>
    <FORM ACTION="<dtpc:getDesktopURL/>" TARGET="_parent" METHOD="POST" NAME="contentForm" ENCTYPE="application/x-www-form-urlencoded" >
    <INPUT TYPE=HIDDEN NAME="action" SIZE=-1 VALUE="process">
    <INPUT TYPE=HIDDEN NAME="provider" SIZE=-1 VALUE="JSPContentContainer">
    <INPUT TYPE=HIDDEN NAME="container" SIZE=-1 VALUE="<%=container%>">
    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
    <TR>
    <TD ALIGN="CENTER">
    <CENTER>
    <P>
    <TABLE BORDER="0" CELLPADDING=2 CELLSPACING="0" WIDTH="100%">
    <TR>
    <TD COLSPAN="2">
    <FONT COLOR="<dttheme:getAttribute name="tabFontColor" default="#000000"/>" SIZE="+0" FACE="<dttheme:getAttribute name="contentLayoutText" default="Verdana"/>"><b>
    Select the Channels you would like displayed on this Page.<BR> </b>
    </FONT>
    </TD>
    </TR>
    <TR><TD COLSPAN="2">
    <B><FONT SIZE="-1">Legend: T = thin column, W = wide column, FT = full top column, FB = full bottom column</FONT></B>
    </TD>
    </TR>
    <TR><td bgcolor="#FFFFFF"><img src="<dt:scontent/>/images/spacer.gif" width=
    "100%" height="20" alt="Spacer Image"></td></TR>
         <tr>
              <td>
                   <TABLE BORDER="0" CELLPADDING=2 CELLSPACING="0" WIDTH="420" >
                        <tr bgcolor="#CCCCCC" valign="top">
                                            <td height="3" colspan="3">
                                            <div align="left">                                             
                                                 <b><font size="-1" color="white" face="Arial, Helvetica, sans-serif">
                                                      <a name="AZChannel">A-to-Z Channel List</a>
                                                      </font>
                                                 </b>
                                                 </div>     
                                            </td>
                             </TR>          
                   </TABLE>                                         
              </td>
         </tr>
         <tr valign="top">
         <td>
                        <TABLE BORDER="0" CELLPADDING=2 CELLSPACING="0" WIDTH="420" >
                        <tr>
                        <td>
                             <div align="left">
                             <font face="Arial, Helvetica, sans-serif" size="2">
                             A
                             B C D E
                             F G H I
                             J K L M
                             N O P Q
                             R S T U
                             V W X Y
                             Z  
                             0-9
                             </font>
                             </div>
                        </td>
                        </tr>     
                   </TABLE>
         </td>
                   </br>
         </tr>
         <tr>
         <td>
                   <TABLE BORDER="0" CELLPADDING=2 CELLSPACING="0" WIDTH="420" >
                        <tr>
                             <td width="330" colspan="2">
                                  <img src="/desktop/mqportal/external/images/name.jpg" alt="Sort by Name">
                             </td>
                             <td width="30">
                                  <img src="/desktop/mqportal/external/images/more_info.jpg" alt="More Info">
                             </td>
                             <td width="60">
                                  <img src="/desktop/mqportal/external/images/request_access.jpg" alt="Request for Activation">
                             </td>     
                        </tr>
    <%-- Get the list of categories for this container --%>
    <dtpc:getLocalePropertiesFilters id="localeFilter"/>
    <dtpc:getCollectionProperty key="categories" pfList="$localeFilter" id="categories"/>
    <%-- Declare categories, because it will be used in scriptlets --%>
         <jx:declare id="categories" type="Map"/>
         <jx:declare id="categEntry" type="String"/>
    <%-- Create the arraylist --%>
    <%
         int channelTotal = 0; // Total number of channels in the page
         int channelCount = 0; // Channels in a caegory
         List leftList = null; // Left column categories
         int leftChannelCount = 0; // Total number of channels in the left column
         int categCount = categories.size(); // Category Count
         List rightList = new java.util.ArrayList(); // Right column categories
    List categsWithCount = new java.util.ArrayList(categCount); // List with n:category format - n # of channels
    StringBuffer buf = new StringBuffer();
         String currentChar     = "0"; // Used to decide whether to display the alphabet header
         //Get the iterator to get all the channels for each category
    Iterator itr = categories.keySet().iterator();
         String tempVar = null;
    String leftColumn = "notEmpty";
         String rightColumn = "notEmpty";
         List strayList = null;
         // Get a copy of the available channels and remove the channels with category information
         // from the list, which will be the list of channels with no categories.
         // Shallow copy will do the job here, hence clone.
         List missedList = new ArrayList(availableChannels);
    Collections.sort(missedList); //Added following line to sort list alphabetically
    String [] missedChannels = null;
    // Build up a list with entry of the format n:categoryName where
    // n is the number of channels for the category. This is required to
         // build up a plan to effectively use the real estate on the page.
         // The mapping between the categories and the channel count has to be
         // preserved but we need a sorted list, so build a string list like this.
         while(itr.hasNext()) {
         // Get one category at a time
         categEntry = (String)itr.next();
         // Set the category in the pagecontext to be used by the tags
    pageContext.setAttribute("categEntry",categEntry);
    %>

    Sorry about the code post. I shouldn't have done that but too late. I solved my sort problem. I was just displaying the wrong variable, the title of the channel but it was being sorted by channel name with the Collections.sort(missedList); command, so the channels were not actually out of order at all, the titles don't always match with the channel name.
    It would still be nice if I could find out how to sort the list using various criteria of string values in different fields. If someone can help with that it would be appreciated!

  • Flex application embedded in a PDF performing a LC call

    Hi,
    I have a Flex application that is embedded in a PDF as a navigator which is supposed to invoke LiveCycle application deployed on a weblogic server using SOAP endpoint. The web service call seems to work fine if I run it from Flash Builder but once it’s inside a PDF, it would appear that the web service call is not reaching the application deployed on the Document Service server. The same application, however, does work if the server is deployed on JBoss.
    I was wondering if anyone has suggestions on how I should go about troubleshooting.
    Thanks, Lilliam.

    Hi,
    Creating a new project it's
    - File -> New -> Flex Project
    - Application Type -> Desktop
    Setting this will create the descriptor file and create the WindowedApplication as the root. This application will startup in a native os window.
    Here is an example of creating a simple os child window;
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import spark.components.Window;
                protected function button_clickHandler(event:MouseEvent):void
                    var window:Window = new Window();
                    window.title = "Hello Window";
                    window.width = 200;
                    window.height = 200;
                    window.open();
            ]]>
        </fx:Script>
        <s:Button label="Open Window"
                  click="button_clickHandler(event)"/>
    </s:WindowedApplication>
    The documentation will guide you the rest of the way.
    Mike

  • Quicktime movie in separate window - how?

    Hello:
    2 part question...
    I am wanting to have a quicktime movie open in a separate window - that opens in addition to the homepage AND I want that window to display the movie only at 320 x 240.
    Is this possible and how do you do it?
    thanks!

    Hi James thanks for the recommendation.
    I apologize I haven't updated my site in a while (I've been studying for the Apple Certification Exams)
    This code should acheive the desired feature:
    STEP ONE: Paste this code into the HEAD of your HTML document
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    closetime = 0; // Close window after __ number of seconds?
    // 0 = do not close, anything else = number of seconds
    function Start(URL, WIDTH, HEIGHT) {
    windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
    preview = window.open(URL, "preview", windowprops);
    if (closetime) setTimeout("preview.close();", closetime*1000);
    function doPopup() {
    url = "<b><a class="jive-link-external-small" href="http://YourPop-upURLHere.com">http://YourPop-upURLHere.com</a></b>";
    width = 320; // width of window in pixels
    height = 240; // height of window in pixels
    delay = 0; // time in seconds before popup opens
    timer = setTimeout("Start(url, width, height)", delay*1000);
    // End -->
    </script>
    STEP TWO: Insert the onLoad event handler into your BODY tag
    <BODY OnLoad="doPopup();">
    <!-- Script Size: 1.27 KB -->
    Play around with that code and see what you can come up with!
    theshow
    Apple Certified Pro
    Final Cut Pro 5 Level 1
    DVD Studio Pro 4 Level 1
    http://iWebTricks.com

Maybe you are looking for

  • Hp Aio Remote Beta for Windows Phone 8.1

    Having installed this app on a Lumia 520 to integrate with a 5520,  I find that documents in my phone's 'documents' folder are not apparent to the app, hence they cannot be printed. This applies equally to 'documents' folder both on the phone and sd

  • How do i replace a newer version of itunes with an older version of itunes

    how do I replace a newer version of iTunes with an older version?

  • Ibook monitor hook-up

    Many people here seem to need help using an external screen with their ibook, I however need help the other way around! Is it possible to use my ibook G4's 1024x768 screen as a monitor for a computer that's currently monitor-less?

  • Can't see folders on desktop

    I restored a backup and computer tells me I can't see files on desktop even after I verify disk permissions How do I fix this?

  • Problem importing max configurat​ion

    I would like to import my device configuration file programatically with MAXcopy configuration.vi but when I use it an error appears.  Here are the settings I entered:  source: H:\TEST DEPT LABVIEW FUNCTION TESTER\Labview program\configData.nce desti