I am working on lexing and want to fulfill the intent when all slot values are filled. But the intent is not fulfilling after the confirmation prompt. it is asking, again and again, a Confirmation prompt but not fulfilling the intent. I have code in python So please check if there is anything wrong in my code. Thanks.
see screenshot.
I am also attaching the code please check.
import json
def flightDecision(currName, currSlots, Departure_city, Arrival_city, ReturnDate, Departing, Date, Flight_schedule):
if Departing == "roundtrip" and Date == None:
return{
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "Date",
"intentName": 'Bookaflight',
"slots": {
"Departure_city": Departure_city,
"Arrival_city": Arrival_city,
"Departing": Departing,
"Date": Date,
},
},
}
if Departing == 'roundtrip' and Date != None and ReturnDate == None:
return{
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "ReturnDate",
"intentName": 'Bookaflight',
"slots": {
"Departure_city": Departure_city,
"Arrival_city": Arrival_city,
"Departing": Departing,
"Date": Date,
"ReturnDate": ReturnDate,
},
},
}
if Departing == 'roundtrip' and ReturnDate != None and Flight_schedule == None:
return{
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "Flight_schedule",
"intentName": 'Bookaflight',
"slots": {
"Departure_city": Departure_city,
"Arrival_city": Arrival_city,
"Departing": Departing,
"Date": Date,
"ReturnDate": ReturnDate,
"Flight_schedule": Flight_schedule
},
},
}
if Departing == "oneway" and Date == None:
return{
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "Date",
"intentName": 'Bookaflight',
"slots": {
"Departure_city": Departure_city,
"Arrival_city": Arrival_city,
"Departing": Departing,
"Date": Date,
},
},
}
if Departing == 'oneway' and Date != None and Flight_schedule == None:
return{
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "Flight_schedule",
"intentName": 'Bookaflight',
"slots": {
"Departure_city": Departure_city,
"Arrival_city": Arrival_city,
"Departing": Departing,
"Date": Date,
"Flight_schedule": Flight_schedule,
},
},
}
return{
"dialogAction":{
"type": "ConfirmIntent",
"intentName": "Bookaflight",
"slots":{
"Departure_city": Departure_city,
"Arrival_city": Arrival_city,
"Departing": Departing,
"Date": Date,
"ReturnDate": ReturnDate,
"Flight_schedule": Flight_schedule,
# "message":{
# "contentType": "PlainText",
# "message": "you want to book a ticket"
# }
}
}
}
def delegate(currSlots, currName, Departure_city, Arrival_city, Departing, Date, Flight_schedule):
return{
'dialogAction': {
'type': 'Delegate',
'slots': currSlots
}
}
def lambda_handler(event, context):
currName = event['currentIntent']['name']
currSlots = event['currentIntent']['slots']
Departing = event['currentIntent']['slots']['Departing']
ReturnDate = event['currentIntent']['slots']['ReturnDate']
Arrival_city = event['currentIntent']['slots']['Arrival_city']
Departure_city = event['currentIntent']['slots']['Departure_city']
Date = event['currentIntent']['slots']['Date']
Flight_schedule = event['currentIntent']['slots']['Flight_schedule']
while not Departing:
return delegate(currSlots, currName, Departure_city, Arrival_city,Departing,Date, Flight_schedule)
else:
return flightDecision(currSlots, currName, Departure_city, Arrival_city, ReturnDate, Departing, Date, Flight_schedule)
If you're using the same Lambda function for both validation and fulfillment, you would need to check the invocationSource and decide how to proceed accordingly. Since intent confirmation is also enabled, also use the confirmationStatus parameter to know whether the user confirmed or denied the prompt.
Check the input event format for the JSON structure passed by Lex to the codehook Lambda: https://docs.aws.amazon.com/lex/latest/dg/lambda-input-response-format.html#using-lambda-input-event-format
Related
I Was able to create an event on a not delegated calendar but failed on the delegated calendar when using this endpoint:
https://graph.microsoft.com/v1.0/me/calendars/{calendarId}/events
I also tried to put a wrong access token and calendarId on the request just to make sure if I can encounter the same error message but It didn't trigger the issue.
This is the object we're passing.
CalendarRequest
{
start = new MicrosoftDateTimeZoneRequest() {
dateTime = dateTimeOffset.ToString(dateTimeFormat),
timeZone = "Pacific Standard Time"
},
end = new MicrosoftDateTimeZoneRequest() {
dateTime = dateTimeOffsetEnd.ToString(dateTimeFormat),
timeZone = "Pacific Standard Time"
},
subject = $"{activity.CustomerName} {activity.ActivityName} {activity.ActivityType}".Trim(),
body = new MicrosoftItemBodyRequest() { content = activity.Details + (activity.CustomerId > 0 ? ("|" + clientURL) : ""), contentType = "HTML" },
location = new MicrosoftLocationRequest() {
displayName = "Home"
},
attendees = new List<MicrosofAttendeeRequest>() {
new MicrosofAttendeeRequest() {
emailAddress = new MicrosoftEmailAddressRequest(){address = "karlo#tapnztest.onmicrosoft.com", name = "X TAP" },
type = "resource"
}
},
allowNewTimeProposals = false,
isOrganizer = true
}
And this is how I call the endpoint
var calendarResponse = GetCalendarEvent(accessToken);
var calendarID = calendarResponse.value.Where(a => a.owner.address == "test#tapteam.co.nz").FirstOrDefault()?.id;
var addCalendarEventRequest = new RestClient($"https://graph.microsoft.com/v1.0/me/calendars/{calendarID}/events");
var request = new RestRequest();
request.AddHeader("Authorization", "Bearer " + accessToken);
request.AddJsonBody(calendarRequest);
var response = addCalendarEventRequest.ExecuteAsync(request, Method.POST);
Payload
{
"subject": "CC - 1st Meeting Confirmed CC - 1st Meeting Confirmed",
"body": {
"content": "test",
"contentType": "HTML"
},
"start": {
"dateTime": "2021-02-25T15:30:00.000+13:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2021-02-25T16:00:00.000+13:00",
"timeZone": "Pacific Standard Time"
},
"location": {
"address": null,
"coordinates": null,
"displayName": "Home",
"locationEmailAddress": null,
"locationUri": null,
"locationType": null
},
"attendees": [
{
"emailAddress": {
"address": "karlo#tapnztest.onmicrosoft.com",
"name": "Karlo TAP"
},
"proposedNewTime": null,
"status": null,
"type": "resource"
}
],
"allowNewTimeProposals": false,
"transactionId": null,
"isOrganizer": true
}
New to this TS scripting so a little help is requested,
I'm trying to create an extension that created a url from 4 work item fields.
example contribution:
{
"manifestVersion": 1,
"id": "tritech-tfsurl-control",
"version": "0.1.18",
"name": "tritech-tfsurl-control",
"scopes": [ "vso.work", "vso.work_write" ],
"description": "4 fields to a url",
"publisher": "TriTech-Software-Systems",
"icons": {
"default": "img/logo.png"
},
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"tags": [
"Work Item",
"Work Item control",
"Url",
"Url tfs server"
],
"content": {
"details": {
"path": "details.md"
}
},
"links": {
"home": {
"uri": "http://www.Tritech.com"
}
},
"branding": {
"color": "rgb(220, 235, 252)",
"theme": "light"
},
"files": [
{
"path": "img",
"addressable": true
},
{
"path": "index.html",
"addressable": true
}
],
"categories": [
"Plan and track"
],
"contributions": [
{
"id": "tfsurlcontrol-action",
"type": "ms.vss-work-web.work-item-form-control",
"description": "Work Item fields to create url from",
"targets": [
"ms.vss-work-web.work-item-form"
],
"properties": {
"name": "tfsurl-control",
"uri": "index.html",
"height": 90,
"inputs": [
{
"id": "PreviousTFSServer",
"description": "The TFS server url that has the work item.",
"type": "WorkItemField",
"properties": {
"workItemFieldTypes": [ "String" ]
},
"validation": {
"dataType": "String",
"isRequired": true
}
},
{
"id": "TFSCollection",
"description": "The original tfs collection name",
"type": "WorkItemField",
"properties": {
"workItemFieldTypes": [ "String" ]
},
"validation": {
"dataType": "String",
"isRequired": true
}
},
{
"id": "TfsTeamProject",
"description": "Original TFS project name",
"type": "WorkItemField",
"properties": {
"workItemFieldTypes": [ "String" ]
},
"validation": {
"dataType": "String",
"isRequired": true
}
},
{
"id": "TfsWorkItemId",
"description": "Original work item id",
"type": "WorkItemField" ,
"properties": {
"workItemFieldTypes": [ "Integer" ]
}
}
]
}
}
]
}
then in my App.ts file is this,
///<reference types="vss-web-extension-sdk" />
import { Controller } from "./control";
import * as ExtensionContracts from "TFS/WorkItemTracking/ExtensionContracts";
import { WorkItemFormService } from "TFS/WorkItemTracking/Services";
var control: Controller;
var provider = () => {
return {
onLoaded: (workItemLoadedArgs: ExtensionContracts.IWorkItemLoadedArgs) => {
control = new Controller();
}
}
};
VSS.register(VSS.getContribution().id, provider);
this is my Control.ts file,
`
private _initialize(): void {
this._inputs = VSS.getConfiguration().witInputs;
this._ServerFieldName = this._inputs["PreviousTFSServer"];
this._CollectionFieldName = this._inputs["TFSCollection"];
this._ProjectFieldName = this._inputs["TFSTeamProject"];
this._WorkItemIdFieldName = this._inputs["TfsWorkItemId"];
WitService.WorkItemFormService.getService().then(
(service) => {
Q.spread<any, any>(
[ service.getFieldValue(this._ServerFieldName),service.getFieldValue(this._CollectionFieldName),
service.getFieldValue(this._ProjectFieldName),service.getFieldValue(this._WorkItemIdFieldName)],
(server: string, collection: string, project:string, id: number) => {
this._view = new View(server,collection,project,id);
}, this._handleError
).then(null, this._handleError);
},
this._handleError);
}
private _handleError(error: string): void {
let errorView = new ErrorView(error);
}
}
`
Then I added a view.ts
export class View {
constructor(server: string, collection: string, project: string, id: number) {
// container div
if(server)
{
var Container = $("<div />");
var workItemUrl = $("<span></span>").text("Original work item");
var a = $("<a> </a>");
var url = 'server + "/" + collection + "/" + project + "/_workitemId?=" + String(id)'
a.attr("href", url );
a.attr("target", "_blank");
a.text("here.");
workItemUrl.append(a);
//$('body').empty().append(Container);
$(".events").append(workItemUrl);
}
}
}
<Input Id="PreviousTFSServer" Value="TriTech.Source.Server" />
<Input Id="TFSCollection" Value="TriTech.Source.Collection" />
<Input Id="TFSTeamProject" Value="TriTech.Source.Project" />
<Input Id="TfsWorkItemId" Value="TriTech.Source.Id" />
</Inputs>
</ControlContribution>
</Group>`
I started with the latest edition of the vsts-extension-ts-seed-simple-master package. Compiles and creates the extension but I'm not seeing any url or link.
What am I missing?
The WIT has been edited to use the extension.
Web debug shows it is being loaded,
{"id":"TriTech-Software-Systems.tritech-tfsurl-control.tritech-tfsurlcontrol-action","description":"Work Item fields to create url from","type":"ms.vss-work-web.work-item-form-control-group","targets":["ms.vss-work-web.work-item-form"],"properties":{"name":"tritech-tfsurl-control","uri":"index.html","height":90,"inputs":[{"id":"PreviousTFSServer","description":"The TFS server url that has the work item.","type":"WorkItemField","properties":{"workItemFieldTypes":["String"]},"validation":{"dataType":"String","isRequired":true}},{"id":"TFSCollection","description":"The original tfs collection name","type":"WorkItemField","properties":{"workItemFieldTypes":["String"]},"validation":{"dataType":"String","isRequired":true}},{"id":"TfsTeamProject","description":"Original TFS project name","type":"WorkItemField","properties":{"workItemFieldTypes":["String"]},"validation":{"dataType":"String","isRequired":true}},{"id":"TfsWorkItemId","description":"Original work item id","type":"WorkItemField","properties":{"workItemFieldTypes":["Integer"]}}],"::Attributes":16,"::Version":"0.1.20"}}
Thanks in advance.
I ended up using static values and got it working.
var Provider = () => {
this.ServerfieldName = "Source.Server";
this.CollectionfieldName = "Source.Collection";
this.ProjectfieldName = "Source.Project";
this.WorkItemIdfieldName = "Source.Id";
this._view = View;
return{
onLoaded: (WorkItemLoadedArgs: ExtensionContracts.IWorkItemLoadedArgs) => {
var deferred = Q.defer();
WorkItemFormService.getService().then(
(service) => {
Q.spread<any, any>(
[service.getFieldValue(this.ServerfieldName),service.getFieldValue(this.CollectionfieldName),
service.getFieldValue(this.ProjectfieldName),service.getFieldValue(this.WorkItemIdfieldName)],
(server: string, collection: string, project: string, workitemId: number) => {
var data =(`${server}/${collection}/${project}/_workitems#_a=edit&id=${workitemId}`);
if(server){
this._view = new View(data);
}
else{
$('body').empty().append("This is the original Work Item");
}
})
.catch(function (e) {deferred.reject(e)}
);
return deferred.promise; //.then(null);
}
)}
}
};
and used a view,
/// <reference path="../typings/index.d.ts" />
export class View {
constructor(public value:string) {
var Container = $("<div role='link'> </div>");
Container.addClass("Container");
Container.attr('tabindex', '0');
var rdiv = $("<div/>").addClass("rightDiv");
var ldiv = $("<div/>");
var help = $("<span></span>").text("Original Tfs work item ");
var a = $("<a> </a>");
a.attr("href", value);
a.attr("target", "_blank");
a.text("here.");
help.append(a);
ldiv.append(help);
Container.append(rdiv);
Container.append(ldiv);
$('body').empty().append(Container);
}
}
I have this javascript code to draw an amchart stock, just the PeriodSelector part:
var periodSelectorAjax = new AmCharts.PeriodSelector();
periodSelectorAjax.periods = [
{period: "F1", label: "Phase 1"},
{period: "F2", label: "Phase 2"},
{period: "F3", label: "Phase 3"},
{period: "MAX", selected: true, label: "MAX"}
];
I need to intercept when user click on period to reload the graph, I see that I can do it with this, from here:
var chart = AmCharts.makeChart( "chartdiv", {
"type": "stock",
// ...
"periodSelector": {
"position": "left",
"periods": [ {
"period": "MM",
"selected": true,
"count": 1,
"label": "1 month"
}, {
"period": "YYYY",
"count": 1,
"label": "1 year"
}, {
"period": "YTD",
"label": "YTD"
}, {
"period": "MAX",
"label": "MAX"
} ],
"listeners": [ {
"event": "changed",
"method": function( event ) {
if ( event.predefinedPeriod !== undefined ) {
console.log( event.predefinedPeriod, event.count );
}
}
} ]
},
// ...
} );
But I don't know how to put the last listeners part and use it with my code.
thanks
You can either use the addListener method or just set the listeners array directly on your periodSelectorAjax variable.
addListener example:
periodSelectorAjax.addListener("changed", function(event) {
// your code here
});
listeners property example:
periodSelectorAjax.listeners = [{
"event": "changed",
"method": function(event) {
// ...
}
}]
I used automatical OData connection with SAP Web IDE. Unfortunately, Data don't connect and Layout Editor says that Data Set "not defined". I have tried to connect by coding, for example <Table items={/Stats}>, but it doesn't work either. When I use project template (Master-Detail or Worklist), there are no problems with connection and Data is automatically connecting, but when I want to make my project and make a connection, there are always some problems.
Component.js
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"Statusverwaltung/model/models"
], function(UIComponent, Device, models) {
"use strict";
return UIComponent.extend("Statusverwaltung.Component", {
metadata: {
manifest: "json"
},
config : {
"resourceBundle" : "i18n/i18n.properties",
"titleResource" : "SHELL_TITLE",
"serviceConfig" : {
name: "UI5STAT1_SRV",
serviceUrl: "/sap/opu/odata/kernc/UI5STAT1_SRV/"
}
},
/**
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
* #public
* #override
*/
init: function() {
// call the base component's init function
UIComponent.prototype.init.apply(this, arguments);
// set the device model
this.setModel(models.createDeviceModel(), "device");
}
});
});
Manifest.json
{
"_version": "1.1.0",
"sap.app": {
"_version": "1.1.0",
"id": "Statusverwaltung",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "1.0.0"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"sourceTemplate": {
"id": "servicecatalog.connectivityComponent",
"version": "0.0.0"
},
"dataSources": {
"UI5STAT1_SRV": {
"uri": "/sap/opu/odata/kernc/UI5STAT1_SRV/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "webapp/localService/UI5STAT1_SRV/metadata.xml"
}
}
}
},
"sap.ui": {
"_version": "1.1.0",
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone#2": "",
"tablet": "",
"tablet#2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
},
"supportedThemes": ["sap_hcb", "sap_bluecrystal"]
},
"sap.ui5": {
"_version": "1.1.0",
"rootView": {
"viewName": "Statusverwaltung.view.View",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.layout": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Statusverwaltung.i18n.i18n"
}
}
},
"resources": {
"css": [{
"uri": "css/style.css"
}]
},
"routing": {
"targets": {
"View": {
"viewType": "XML",
"transition": "slide",
"clearAggregation": true,
"viewName": "View",
"viewId": "View"
}
}
}
}
}
neo-app.json
{
"welcomeFile": "/webapp/index.html",
"routes": [
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
},
{
"path": "/test-resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/test-resources"
},
"description": "SAPUI5 Test Resources"
},
{
"path": "/sap/opu/odata",
"target": {
"type": "destination",
"name": "v01",
"entryPath": "/sap/opu/odata"
},
"description": "V01 description"
}
],
"sendWelcomeFileRedirect": true
}
.project.json
{
"projectType": [
"sap.watt.uitools.ide.fiori",
"sap.watt.uitools.ide.web",
"sap.watt.saptoolsets.fiori.project.ui5template.smartProject",
"sap.watt.saptoolsets.fiori.project.uiadaptation"
],
"build": {
"targetFolder": "dist",
"sourceFolder": "webapp"
},
"generation": [
{
"templateId": "ui5template.basicSAPUI5ApplicationProject",
"templateVersion": "1.32.0",
"dateTimeStamp": "Mon, 17 Oct 2016 08:28:52 GMT"
},
{
"templateId": "servicecatalog.connectivityComponent",
"templateVersion": "0.0.0",
"dateTimeStamp": "Mon, 17 Oct 2016 10:10:52 GMT"
},
{
"templateId": "uiadaptation.changespreviewjs",
"templateVersion": "0.0.0",
"dateTimeStamp": "Tue, 18 Oct 2016 08:08:06 GMT"
}
],
"translation": {
"translationDomain": "",
"supportedLanguages": "en,fr,de",
"defaultLanguage": "en",
"defaultI18NPropertyFile": "i18n.properties",
"resourceModelName": "i18n"
},
"basevalidator": {
"services": {
"xml": "fioriXmlAnalysis",
"js": "fioriJsValidator"
}
},
"codeCheckingTriggers": {
"notifyBeforePush": true,
"notifyBeforePushLevel": "Error",
"blockPush": false,
"blockPushLevel": "Error"
},
"mockpreview": {
"mockUri": "/sap/opu/odata/kernc/UI5STAT1_SRV/",
"metadataFilePath": "webapp/localService/UI5STAT1_SRV/metadata.xml",
"loadJSONFiles": false,
"loadCustomRequests": false,
"mockRequestsFilePath": ""
}
}
It seems like you are never instantiating a model.
You can do that in the manifest.json
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Statusverwaltung.i18n.i18n"
}
},
"": {
"dataSource":"UI5STAT1_SRV"
}
},
"" defines the default model so you can use Bindingpaths like {/Stats}.
I follow this answer for creating collapsible set. now I want to create nested collapsible set. I have a json like:
[
{
"sid": "26",
"tour_name": "4",
"day": "2",
"time": "16:00",
"main_location": "Madurai",
"sub_location": "Mahal",
"site_link": "www.maduraimahal.com",
"description": "test"
},
{
"sid": "25",
"tour_name": "4",
"day": "2",
"time": "13:00",
"main_location": "Trichy",
"sub_location": "Rockport",
"site_link": "www.rockport.com",
"description": "Test"
},
{
"sid": "24",
"tour_name": "4",
"day": "2",
"time": "12:00",
"main_location": "Madurai",
"sub_location": "Temple",
"site_link": "www.madurai.com",
"description": "Test "
},
{
"sid": "17",
"tour_name": "4",
"day": "1",
"time": "09:00",
"main_location": "Chennai",
"sub_location": "City Centre",
"site_link": "www.wikipedia.com",
"description": "test"
},
{
"sid": "16",
"tour_name": "4",
"day": "1",
"time": "08:00",
"main_location": "Chennai",
"sub_location": "Spencer Plaza",
"site_link": "www.spencer.com",
"description": "test"
},
{
"sid": "15",
"tour_name": "4",
"day": "1",
"time": "07:00",
"main_location": "Chennai",
"sub_location": "Express Avenue",
"site_link": "www.wikipedia.com",
"description": "test"
}]
From this json I want to create collapsible set like following type
day-->First collapsiple
---main_location-- >second collapsiple
---sublocation-->listview
Exmaple
day 1
--Chennai
---expressavenue
---Spencer Plaza
---City Centre
day 2
--Trichy
---Rockfort
-- Madurai
---Mahal
---Temple
I am trying following method but can't group like this
$(document).on('pageshow', '#itienary', function (event, ui) {
$.getJSON('url', function (data) {
var collapsible = [];
var days = [];
var collapsible1 = [];
var mainlocation = [];
$.each(data, function (i, v) {
collapsible.push(v.day);
$.each(collapsible, function (i, v) {
if ($.inArray(v, days) === -1) {
days.push(v);
days.sort();
}
});
});
$.each(days, function (j, main) {
var day = main;
var locations = '';
$.each(data, function (k, val) {
var mainloc = val.main_location;
if (val.day == day) {
collapsible1.push(mainloc);
}
$.each(collapsible1, function (i, v) {
if ($.inArray(v, mainlocation) === -1) {
mainlocation.push(v);
mainlocation.sort();
}
});
});
$.each(mainlocation, function (i, loc) {
var parent = loc;
var elements = '';
$.each(data, function (x, sub) {
var subLoc = sub.sub_location;
var time = sub.time;
var sitelink = sub.site_link;
if (sub.main_location == parent) {
elements += '<li><h2>' + subLoc + '</h2><p><strong>' + time + '</strong></p><p class="ui-li-aside"><strong>Sitelink: ' + sitelink + '</strong></p></a></li>';
}
});
$("#itinerary-list").append($("<div/>", {
"data-role": "collapsible",
"data-iconpos": "left",
"data-collapsed-icon": "arrow-d",
"data-expanded-icon": "arrow-u",
"class": day
}).append($("<h3/>").text("Day " + day)).appendTo($("<div/>"), {
"data-role": "collapsible",
"data-iconpos": "left",
"class": parent
}).append($("<h3/>").text(parent)).append($("<ul/>", {
"data-role": "listview",
"data-theme": "b"
}).append(elements).listview()));
$('#itinerary-list').collapsibleset('refresh');
});
});
});
});
How can I done this?