Json data is not populated in treeview panel - json

here below is my json formate i need to show in the treeview panel in extjs6
After loading store from server i am not able to see any records in Tree panel.
what should be the Model view and store for this json rendering in to the Tree view panel .
Thanks.
here is my code :
Model :
Ext.define('File', {
extend: 'Ext.data.TreeModel',
fields: [
{number: 'number', type: 'string'},
]
});
Store :
var store = Ext.create('Ext.data.TreeStore', {
model: 'File',
proxy: {
type: 'ajax',
url: 'component-tree.json',
reader: {
type: 'json',
rootProperty: 'components',
leaf: true,
children: 'components',
expanded: true,
},
},
folderSort: true,
});
View :
var tree = Ext.create('Ext.tree.Panel', {
autoLoad: true,
collapsible: true,
useArrows: true,
rootVisible: true,
store: store,
multiSelect: true,
width: 250,
height: 300,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true
}
},
root: {
text: "Components",
expanded: true,
},
renderTo: document.body
});
component-tree.json :
{
"components": {
"state": "RELEASED",
"nodeType": "Component",
"checked": true,
"name": "PLATE - FOR CABINET - ASSEMBLY",
"level": 0,
"url": "http://example.com/Windchill/servlet/nexiles/tools/api/1.0/epmdocuments/OR:wt.epm.EPMDocument:4474031",
"oid": "OR:wt.epm.EPMDocument:4474031",
"modified": "17.04.2015",
"filename": "21378386.asm",
"num_children": 7,
"number": "21378386.ASM",
"details": "http://example.com/Windchill/app/#ptc1/tcomp/infoPage?oid=OR:wt.epm.EPMDocument:4474031&u8=1",
"components": [
{
"nodeType": "Component",
"leaf": true,
"name": "PLATE - FOR CABINET - DETAIL",
"level": 1,
"url": "http://example.com/Windchill/servlet/nexiles/tools/api/1.0/epmdocuments/OR:wt.epm.EPMDocument:4474018",
"oid": "OR:wt.epm.EPMDocument:4474018",
"modified": "17.04.2011",
"filename": "1234.prt",
"state": "RELEASED",
"number": "21378385.PRT",
"details": "http://example.com/Windchill/app/#ptc1/tcomp/infoPage?oid=OR:wt.epm.EPMDocument:4474018&u8=1",
"version": "A",
"checked": true,
"drawings": [
{
"reftype": "DRAWING",
"nodeType": "Drawing",
"leaf": true,
"name": "PLATE - FOR CABINET - DETAIL",
"url": "http://example.com/Windchill/servlet/nexiles/tools/api/1.0/epmdocuments/OR:wt.epm.EPMDocument:4474013",
"oid": "OR:wt.epm.EPMDocument:4474013",
"modified": "17.04.2015",
"filename": "21378385.drw",
"source": "representation",
"state": "RELEASED",
"number": "21378385.DRW",
"details": "http://example.com/Windchill/app/#ptc1/tcomp/infoPage?oid=OR:wt.epm.EPMDocument:4474013&u8=1",
"version": "A",
"checked": true,
"id": "OR:wt.epm.EPMDocument:4474013-DRAWING",
"icon": "/resources/images/drawing.gif"
},
{
"reftype": "INTERNAL",
"nodeType": "Drawing",
"leaf": true,
"name": "PLATE - FOR CABINET - ASSEMBLY",
"url": "http://example.com/Windchill/servlet/nexiles/tools/api/1.0/epmdocuments/OR:wt.epm.EPMDocument:4474041",
"oid": "OR:wt.epm.EPMDocument:4474041",
"modified": "17.04.2015",
"filename": "21378386.drw",
"source": "representation",
"state": "RELEASED",
"number": "21378386.DRW",
"details": "http://example.com/Windchill/app/#ptc1/tcomp/infoPage?oid=OR:wt.epm.EPMDocument:4474041&u8=1",
"version": "A",
"checked": true,
"id": "OR:wt.epm.EPMDocument:4474041-INTERNAL",
"icon": "/resources/images/drawing.gif"
}
],
"icon": "/resources/images/prt_image.gif"
}
}

Your treeModel just defines number but your store actually contains much more fields...
Take a look at the doc in the chapter 'Heterogeneous node types' for more information.
Try with children instead of components in your json file. By the way I could remark that the case is not respected between the configuration root: { text: "Components", ... } and the json content "components": [ ... ].
C and c

Related

I bought the fluxstore program, connects via API to the WordPress site. The program works, but on the emulator it gives such an error

// ignore_for_file: prefer_single_quotes, lines_longer_than_80_chars final
Map<String, dynamic> environment = {
"appConfig": "lib/config/config_en.json",
"serverConfig": {
"url": "https://beno.az",
"type": "dokan",
"consumerKey": "ck_2d0aa8da524a99fee44e48e93b6c27cd278edd0f",
"consumerSecret": "cs_c284c006e0617ddf3b9e9dbabf630a5f1bd0715a"
},
"defaultDarkTheme": false,
"enableRemoteConfigFirebase": false,
"enableFirebaseAnalytics": false,
"loginSMSConstants": {
"nameDefault": "Azərbaycan",
"countryCodeDefault": "AZ",
"dialCodeDefault": "+994"
},
"phoneNumberConfig": {
"useInternationalFormat": true,
"customCountryList": [],
"dialCodeDefault": "+1",
"showCountryFlag": true,
"selectorFlagAsPrefixIcon": true,
"selectorType": "BOTTOM_SHEET",
"countryCodeDefault": "US",
"enablePhoneNumberValidation": false
},
"storeIdentifier": {
"ios": "1469772800",
"disable": true,
"android": "com.inspireui.fluxstore"
},
"advanceConfig": {
"DefaultLanguage": "az",
"DetailedBlogLayout": "halfSizeImageType",
"EnablePointReward": false,
"hideOutOfStock": false,
"HideEmptyTags": true,
"HideEmptyCategories": false,
"EnableRating": true,
"hideEmptyProductListRating": true,
"EnableCart": true,
"ShowBottomCornerCart": true,
"EnableSkuSearch": true,
"showStockStatus": true,
"GridCount": 3,
"isCaching": true,
"kIsResizeImage": true,
"httpCache": true,
"Currencies": [
{
"decimalDigits": 0,
"currency": "AZN",
"currencyCode": "AZN",
"symbolBeforeTheNumber": true,
"symbol": " ₼",
"smallestUnitRate": 1
}
],
"DefaultStoreViewCode": "",
"EnableAttributesConfigurableProduct": ["color", "size"],
"EnableAttributesLabelConfigurableProduct": ["color", "size"],
"isMultiLanguages": true,
"EnableApprovedReview": false,
"EnableSyncCartFromWebsite": false,
"EnableSyncCartToWebsite": false,
"EnableFirebase": false,
"RatioProductImage": 1.2,
"EnableCouponCode": true,
"ShowCouponList": true,
"ShowAllCoupons": true,
"ShowExpiredCoupons": true,
"AlwaysShowTabBar": false,
"PrivacyPoliciesPageId": null,
"PrivacyPoliciesPageUrl": "https://policies.google.com/",
"SupportPageUrl": "https://support.inspireui.com/",
"DownloadPageUrl": "https://mstore.io/#download",
"SocialConnectUrl": [
{
"name": "Facebook",
"url": "https://www.facebook.com/inspireui",
"icon": "assets/icons/logins/facebook.png"
},
{
"url": "https://www.instagram.com/inspireui9/",
"name": "Instagram",
"icon": "assets/icons/logins/instagram.png"
}
],
"AutoDetectLanguage": false,
"QueryRadiusDistance": 10,
"MinQueryRadiusDistance": 1,
"MaxQueryRadiusDistance": 10,
"EnableMembershipUltimate": false,
"EnablePaidMembershipPro": false,
"EnableDeliveryDateOnCheckout": false,
"EnableNewSMSLogin": true,
"EnableBottomAddToCart": false,
"inAppWebView": false,
"EnableWOOCSCurrencySwitcher": false,
"enableProductBackdrop": false,
"categoryImageMenu": true,
"EnableDigitsMobileLogin": false,
"OnBoardOnlyShowFirstTime": true,
"WebViewScript": "",
"EnableVersionCheck": false,
"AjaxSearchURL": "",
"AlwaysClearWebViewCache": false,
"AlwaysRefreshBlog": false,
"OrderNotesWithPrivateNote": true,
"OrderNotesLinkSupport": false,
"inAppUpdateForAndroid": {"typeUpdate": "flexible", "enable": false},
"categoryConfig": {"enableLargeCategories": false, "deepLevel": 3},
"pinnedProductTags": [],
"gdpr": {
"showPrivacyPolicyFirstTime": false,
"showDeleteAccount": true,
"confirmCaptcha": "PERMANENTLY DELETE"
},
"smsLoginAsDefault": false,
"DefaultCurrency": {
"symbolBeforeTheNumber": true,
"currencyCode": "AZN",
"smallestUnitRate": 1,
"decimalDigits": 0,
"symbol": " ₼",
"currency": "AZN"
},
"showRequestNotification": true
},
"defaultDrawer": {
"items": [
{"type": "home", "show": true},
{"show": true, "type": "blog"},
{"show": true, "type": "categories"},
{"type": "cart", "show": true},
{"type": "profile", "show": true},
{"show": true, "type": "login"},
{"show": true, "type": "category"}
],
"logo": "assets/images/logo.png"
},
"defaultSettings": [
"products",
"chat",
"wishlist",
"notifications",
"language",
"currencies",
"darkTheme",
"order",
"point",
"rating",
"privacy",
"about"
],
"loginSetting": {
"showGoogleLogin": true,
"facebookLoginProtocolScheme": "fb430258564493822",
"facebookAppId": "430258564493822",
"smsLoginAsDefault": false,
"showFacebook": false,
"requirePhoneNumberWhenRegister": true,
"showAppleLogin": false,
"showSMSLogin": true,
"facebookClientToken": "",
"isResetPasswordSupported": true,
"showPhoneNumberWhenRegister": true,
"IsRequiredLogin": true
},
"oneSignalKey": {
"appID": "8b45b6db-7421-45e1-85aa-75e597f62714",
"enable": false
},
"onBoardingData": [
{
"image": "https://i.imgur.com/0W12Sg5.png",
"desc": "Allış veriş artıq daha rahat oldu.",
"title": "BEN’O mobil tətbiqinə xoş gəlmisiniz"
},
{
"title": "Çatdırılma",
"image": "https://i.imgur.com/MfOH6LF.png",
"desc": "Siz əziyyət çəkməyin biz çatdırarıq"
},
{
"title": "Yeni dostlar edinin !",
"desc":
"Burada edindiyiniz dostlarınıza sevdiyi hər şeyi rahatlıqla əldə edə bilərsiniz.",
"image": "https://i.imgur.com/xdzO89M.png"
}
],
"vendorOnBoardingData": [
{
"title": "Welcome aboard",
"image": "assets/images/searching.png",
"desc": "Just a few more steps to become our vendor"
},
{
"title": "Let's Get Started",
"image": "assets/images/manage.png",
"desc": "Good Luck for great beginnings."
}
],
"adConfig": {
"ads": [],
"facebookTestingId": "",
"enable": false,
"googleTestingId": [],
"adMobAppIdIos": "ca-app-pub-7432665165146018~2664444130",
"adMobAppIdAndroid": "ca-app-pub-7432665165146018~2664444130"
},
"firebaseDynamicLinkConfig": {
"link": "https://mstore.io/",
"androidPackageName": "com.inspireui.fluxstore",
"uriPrefix": "https://fluxstoreinspireui.page.link",
"iOSAppStoreId": "1469772800",
"androidAppMinimumVersion": 1,
"isEnabled": true,
"iOSBundleId": "com.inspireui.mstore.flutter",
"iOSAppMinimumVersion": "1.0.1",
"shortDynamicLinkEnable": true
},
"languagesInfo": [
{
"icon": "assets/images/country/az.jpg",
"text": "Azərbaycan dili",
"code": "az",
"name": "Azerbaijani",
"storeViewCode": ""
},
{
"text": "English",
"icon": "assets/images/country/gb.png",
"name": "English",
"code": "en",
"storeViewCode": ""
},
{
"storeViewCode": "ru",
"text": "Русский",
"name": "Russian",
"icon": "assets/images/country/ru.png",
"code": "ru"
},
{
"name": "Turkish",
"storeViewCode": "tr",
"text": "Türkçe",
"icon": "assets/images/country/tr.png",
"code": "tr"
}
],
"paymentConfig": {
"excludedPaymentIds": [],
"EnableReview": true,
"EnableAlphanumericZipCode": false,
"EnableOnePageCheckout": true,
"CheckoutPageSlug": {"en": "checkout"},
"EnableRefundCancel": true,
"EnableCustomerNote": true,
"EnableCreditCard": false,
"GuestCheckout": true,
"EnableAddress": true,
"NativeOnePageCheckout": false,
"EnableShipping": true,
"allowSearchingAddress": true,
"SmartCOD": {"amountStop": 200, "enabled": false, "extraFee": 10},
"DefaultStateISOCode": "LA",
"RefundPeriod": 7,
"EnableAddressLocationNote": false,
"ShowOrderNotes": true,
"DefaultCountryISOCode": "AZ",
"UpdateOrderStatus": false
},
"payments": {
"paypal": "assets/icons/payment/paypal.svg",
"stripe_v2_google_pay": "https://i.imgur.com/XAGc92A.jpeg",
"stripe_v2_apple_pay": "https://i.imgur.com/dFQ8FKi.png",
"tap": "assets/icons/payment/tap.png",
"stripe": "assets/icons/payment/stripe.svg",
"razorpay": "assets/icons/payment/razorpay.svg"
},
"stripeConfig": {
"enabled": false,
"paymentMethodIds": ["stripe", "stripe"],
"enableApplePay": true,
"merchantCountryCode": "US",
"paymentMethodId": "stripe",
"serverEndpoint": "https://stripe-server-node.vercel.app",
"merchantDisplayName": "FluxStore",
"merchantIdentifier": "merchant.com.inspireui.mstore.flutter",
"publishableKey":
"pk_test_51HNabPCinksNdU0OwGkZ6uMdZOrLT42NGJkBxmVJwx3oM5mafpJaQRfDHifJMg2iREDZxbPkR1TvDtmBeTyjmgv200mCojR2dG",
"useV1": false,
"enableGooglePay": true,
"returnUrl": "fluxstore://inspireui.com",
"enableManualCapture": false
},
"paypalConfig": {
"secret":
"ECbFREri7NFj64FI_9WzS6A0Az2DqNLrVokBo0ZBu4enHZKMKOvX45v9Y1NBPKFr6QJv2KaSp5vk5A1G",
"nativeMode": false,
"paymentMethodId": "paypal",
"production": false,
"enabled": true,
"clientId":
"ASlpjFreiGp3gggRKo6YzXMyGM6-NwndBAQ707k6z3-WkSSMTPDfEFmNmky6dBX00lik8wKdToWiJj5w"
},
"razorpayConfig": {
"keyId": "rzp_test_SDo2WKBNQXDk5Y",
"enabled": true,
"keySecret": "RrgfT3oxbJdaeHSzvuzaJRZf",
"paymentMethodId": "razorpay"
},
"tapConfig": {
"paymentMethodId": "tap",
"SecretKey": "sk_test_XKokBfNWv6FIYuTMg5sLPjhJ",
"enabled": false
},
"mercadoPagoConfig": {
"production": false,
"enabled": true,
"paymentMethodId": "woo-mercado-pago-basic",
"accessToken":
"TEST-5726912977510261-102413-65873095dc5b0a877969b7f6ffcceee4-613803978"
},
"payTmConfig": {
"production": false,
"enabled": true,
"paymentMethodId": "paytm",
"merchantId": "your-merchant-id"
},
"payStackConfig": {
"enabled": true,
"production": false,
"paymentMethodId": "paystack",
"supportedCurrencies": ["ZAR"],
"publicKey": "pk_test_a1a37615c9ca90dead5dd84dedbb5e476b640a6f"
},
"flutterwaveConfig": {
"publicKey": "FLWPUBK_TEST-72b90e0734da8c9e43916adf63cd711e-X",
"production": false,
"enabled": true,
"paymentMethodId": "rave"
},
"myFatoorahConfig": {
"enabled": false,
"apiToken":
"rLtt6JWvbUHDDhsZnfpAhpYk4dxYDQkbcPTyGaKp2TYqQgG7FGZ5Th_WD53Oq8Ebz6A53njUoo1w3pjU1D4vs_ZMqFiz_j0urb_BH9Oq9VZoKFoJEDAbRZepGcQanImyYrry7Kt6MnMdgfG5jn4HngWoRdKduNNyP4kzcp3mRv7x00ahkm9LAK7ZRieg7k1PDAnBIOG3EyVSJ5kK4WLMvYr7sCwHbHcu4A5WwelxYK0GMJy37bNAarSJDFQsJ2ZvJjvMDmfWwDVFEVe_5tOomfVNt6bOg9mexbGjMrnHBnKnZR1vQbBtQieDlQepzTZMuQrSuKn-t5XZM7V6fCW7oP-uXGX-sMOajeX65JOf6XVpk29DP6ro8WTAflCDANC193yof8-f5_EYY-3hXhJj7RBXmizDpneEQDSaSz5sFk0sV5qPcARJ9zGG73vuGFyenjPPmtDtXtpx35A-BVcOSBYVIWe9kndG3nclfefjKEuZ3m4jL9Gg1h2JBvmXSMYiZtp9MR5I6pvbvylU_PP5xJFSjVTIz7IQSjcVGO41npnwIxRXNRxFOdIUHn0tjQ-7LwvEcTXyPsHXcMD8WtgBh-wxR8aKX7WPSsT1O8d8reb2aR7K3rkV3K82K_0OgawImEpwSvp9MNKynEAJQS6ZHe_J_l77652xwPNxMRTMASk1ZsJL",
"paymentMethodId": "myfatoorah_v2",
"accountCountry": "KW",
"production": false
},
"inAppPurchaseConfig": {
"subscriptionProductIDs": ["com.inspireui.fluxstore.subscription.test"],
"enabled": true,
"consumableProductIDs": ["com.inspireui.fluxstore.test"],
"nonConsumableProductIDs": []
},
"defaultCountryShipping": [],
"afterShip": {
"api": "e2e9bae8-ee39-46a9-a084-781d0139274f",
"tracking_url": "https://fluxstore.aftership.com"
},
"googleApiKey": {
"web": "AIzaSyDSNYVC-8DU9BTcyqkeN9c5pgVhwOBAvGg",
"android": "AIzaSyDSNYVC-8DU9BTcyqkeN9c5pgVhwOBAvGg",
"ios": "AIzaSyDSNYVC-8DU9BTcyqkeN9c5pgVhwOBAvGg"
},
"productDetail": {
"SliderShowGoBackButton": true,
"ForceWhiteBackground": false,
"showQuantityInList": false,
"showProductCategories": true,
"showVideo": true,
"AutoSelectFirstAttribute": true,
"showStockQuantity": true,
"hideInvalidAttributes": false,
"productImageLayout": "page",
"showSku": true,
"SliderIndicatorType": "number",
"autoPlayGallery": false,
"limitDayBooking": 14,
"attributeImagesSize": 50,
"showAddToCartInSearchResult": true,
"productListItemHeight": 125,
"height": 0.6,
"borderRadius": 3,
"showRelatedProduct": true,
"showRelatedProductFromSameStore": true,
"enableReview": true,
"showThumbnailAtLeast": 1,
"marginTop": 0,
"ShowSelectedImageVariant": true,
"ShowImageGallery": true,
"safeArea": false,
"showProductTags": true,
"layout": "simpleType"
},
"blogDetail": {
"showSharing": true,
"showHeart": true,
"enableAudioSupport": false,
"showTextAdjustment": true,
"showComment": true
},
"productVariantLayout": {
"size": "box",
"height": "option",
"color": "color",
"color-image": "image"
},
"productAddons": {
"allowVideoType": true,
"allowCustomType": true,
"fileUploadSizeLimit": 5,
"allowMultiple": false,
"allowImageType": true,
"allowedCustomType": ["png", "pdf", "docx"]
},
"cartDetail": {"minAllowTotalCartValue": 0, "maxAllowQuantity": 20},
"productVariantLanguage": {
"ar": {
"size": "بحجم",
"color-image": "اللون",
"height": "ارتفاع",
"color": "اللون"
},
"vi": {
"color": "Màu",
"height": "Chiều Cao",
"color-image": "Màu",
"size": "Kích thước"
},
"en": {
"height": "Height",
"color-image": "Color",
"size": "Size",
"color": "Color"
}
},
"excludedCategory": 311,
"saleOffProduct": {
"ShowCountDown": true,
"HideEmptySaleOffLayout": false,
"Color": "#C7222B"
},
"notStrictVisibleVariant": true,
"configChat": {
"UseRealtimeChat": false,
"version": "2",
"EnableSmartChat": true,
"showOnScreens": ["profile"],
"hideOnScreens": []
},
"smartChat": [
{
"iconData": "whatsapp",
"imageData": "https://i.imgur.com/tBE2iAn.png",
"app": "https://wa.me/+994506884408",
"description": "WhatsApp"
},
{
"iconData": "phone",
"app": "tel:+994506884408",
"description": "Zəng etmək"
}
],
"adminEmail": "admininspireui#gmail.com",
"adminName": "InspireUI",
"vendorConfig": {
"EnableAutoApplicationApproval": false,
"dokan": "my-account?vendor_admin=true",
"DisableDeliveryManagement": true,
"DisableVendorShipping": false,
"ExpandStoreLocationByDefault": true,
"DefaultStoreImage": "assets/images/default-store-banner.png",
"ShowAllVendorMarkers": true,
"wcfm": "store-manager?vendor_admin=true",
"DisableMultiVendorCheckout": false,
"DisableNativeStoreManagement": true,
"DisablePendingProduct": false,
"BannerFit": "cover",
"NewProductStatus": "draft",
"VendorRegister": true
},
"deliveryConfig": {
"enableSystemNotes": false,
"dashboardName1": "FluxStore",
"dashboardName2": "Delivery",
"appLogo": "assets/images/app_icon_transparent.png",
"appName": "FluxStore Delivery"
},
"managerConfig": {
"enableDeliveryFeature": false,
"appLogo": "assets/images/app_icon_transparent.png",
"appName": "FluxStore Admin"
},
"loadingIcon": {"type": "doubleBounce", "layout": "spinkit"},
"splashScreen": {
"type": "flare",
"paddingBottom": 0,
"animationName": "BEN\"O",
"backgroundColor": "#ffffff",
"duration": 2000,
"paddingTop": 0,
"paddingLeft": 0,
"boxFit": "contain",
"paddingRight": 0,
"enable": true,
"image":
"https://trello.com/1/cards/63d02a96e1774f2f698a187a/attachments/63d038558a12f82d3a6b12d2/download/logo.png"
},
"darkConfig": {
"primaryColorLight": "ff232323",
"MainColor": "ffffffff",
"backgroundColor": "ff232323",
"logo": "https://i.imgur.com/VuUCQJ2.png",
"textColor": "ffffffff"
},
"lightConfig": {
"logo": "https://i.imgur.com/QESdwM5.png",
"MainColor": "ff3fc1be"
},
"enableOnBoarding": true,
"addressFields": [
{
"position": 1,
"required": true,
"editable": true,
"type": "firstName",
"defaultValue": "",
"visible": true
},
{
"visible": true,
"defaultValue": "",
"editable": true,
"type": "lastName",
"position": 2,
"required": true
},
{
"visible": true,
"defaultValue": "",
"position": 3,
"required": true,
"editable": true,
"type": "phoneNumber"
},
{
"position": 4,
"editable": true,
"defaultValue": "",
"type": "email",
"required": true,
"visible": true
},
{"visible": true, "position": 5, "type": "searchAddress"},
{"type": "selectAddress", "visible": true, "position": 6},
{"type": "country", "visible": true, "position": 7},
{"visible": true, "position": 8, "type": "state"},
{
"editable": true,
"visible": true,
"position": 9,
"defaultValue": "",
"required": true,
"type": "city"
},
{
"visible": true,
"type": "apartment",
"editable": true,
"defaultValue": "",
"required": false,
"position": 10
},
{
"defaultValue": "",
"required": false,
"editable": true,
"position": 11,
"visible": true,
"type": "block"
},
{
"type": "street",
"editable": true,
"visible": true,
"position": 12,
"defaultValue": "",
"required": true
},
{
"editable": true,
"position": 13,
"visible": true,
"required": true,
"defaultValue": "",
"type": "zipCode"
}
],
"productCard": {
"showCartButtonWithQuantity": false,
"enableRating": true,
"showCartButton": false,
"hideStore": true,
"hideTitle": false,
"showCartIconColor": false,
"hidePrice": false,
"borderRadius": 3,
"showCartIcon": true,
"boxFit": "cover"
}
};
I bought the fluxstore program, connects via API to the WordPress site. The program works, but on the emulator it gives such an error.
FormatException (FormatException: Unexpected character (at character 1) ‰PNG ^ )
I deleted the entire image on the site but it didn't help. Deleted the Flutter project and reopened it. There are many solutions on the Internet, but I could not change my code in any way, I'm afraid to break the whole application. The program works on the web, but when I open it on the emulator, it gives the above error.

How to make design for pagination like below image in datatable jquery

I want to make pagination like this image using datatable Jquery. Please help me to make like this.
Image
here is my code:
$("#tblComplex").DataTable({
"destroy": true,
"serverSide": true,
"bRetrieve": true,
"searching": false,
"order": [0, "asc"],
"pagingType": "simple",
"dom": '<"wrapper"tilp>',
"language": {
"paginate": {
"next": '<span><img src="images/next.svg" alt="next-arrow" /></span>',
"previous": '<span><img src="images/previous.svg" alt="prev-arrow" /></span>'
}
},
//"pageLength": 5,
//"lengthMenu": [[5, 10, 20, -1], [5, 10, 20, 'Show All']],
"ajax": {
"url": "/Complex/GetComplexList",
"type": "Post",
"datatype": "json",
"dataSrc": "complexListData"
},
"columns": [
{ "title": "Id", "data": "id", "orderable": true, "visible": false },
{
"title": "Name", "data": "name", "orderable": true, "visible": true },
{ "title": "Address", "data": "address", "orderable": true, "visible": true }
]
});
I found a solution.
we have to add just class name of css.
for example:
page 1 from 10
we have to define this in dom
"dom": '<"class1"<"class2"i>>

Extract some value from JSON using JsonPath with != condition in Jmeter

I have the following JSON and I need to get id values for instances which do not have type = Jenkins
{
"data": [
{
"id": "35002399-6fd7-40b7-b0d0-8be64e4ec09c",
"name": "94Jenkins",
"url": "http://127.0.0.1:8084",
"authProvider": false,
"siteId": "cce1b6e2-4b5d-4455-ac96-6b5d4c0d901d",
"status": {
"status": "ONLINE"
},
"instanceStateReady": true,
"instanceState": {
"#type": "InstanceStateDto",
"version": "2.60.3"
},
"adminUser": "admin1",
"hasDRConfig": false,
"managed": true,
"type": "JENKINS",
"siteName": "City",
"lastRefreshTime": "2018-04-24T09:43:01.694Z"
},
{
"id": "5cd3caf6-bac1-4f07-8793-5f124b90eaf5",
"name": "RJO",
"url": "http://test.com",
"authProvider": false,
"status": {
"status": "UNAUTHORIZED"
},
"instanceStateReady": true,
"instanceState": {
"#type": "numberOfArtifacts",
"version": "5.5.2-m002",
"licenses": {
"RJO : artrjo-m": {
"type": "ENTERPRISE",
"validThrough": "Jun 12, 2021",
"licensedTo": "Test",
"licenseHash": "asdadsdb612bda1aae745bd2a3",
"expired": false
},
"RJO : artrjo-s1": {
"type": "ENTERPRISE",
"validThrough": "Jun 12, 2021",
"licensedTo": "JFrog",
"licenseHash": "asaswca236350205a3798c0fa3",
"expired": false
}
}
},
"adminUser": "jfmc",
"hasDRConfig": false,
"managed": false,
"warnings": [
"Site is missing",
"Failed to connect to the service. Please verify that the service information provided is correct."
],
"type": "ARTIFACTORY"
},
{
"id": "0727a49a-6c95-433e-9fc5-7e5c760cc76f",
"name": "NinetyTwo",
"url": "http:127.0.0.1:8081",
"authProvider": true,
"siteId": "cce1b6e2-4b5d-4455-ac96-6b5d4c0d901d",
"status": {
"status": "ONLINE"
},
"instanceStateReady": true,
"instanceState": {
"#type": "numberOfArtifacts",
"version": "5.9.0",
"licenses": {
"NinetyTwo": {
"type": "ENTERPRISE",
"validThrough": "Dec 30, 2018",
"licensedTo": "Test",
"licenseHash": "qweqwed95f712dbabee98184da52443",
"expired": false
}
}
},
"adminUser": "admin",
"hasDRConfig": false,
"managed": true,
"type": "ARTIFACTORY",
"serviceId": "jfrt#01c7g4c7hq0dpd0qa71r8c09sj",
"siteName": "Test",
"lastRefreshTime": "2018-04-24T09:43:01.698Z"
}
]
}
And I use $..[?(#.type!='JENKINS')].id path to receive id-s which relate to the instances with type NOT JENKINS, however JSON Extractor returns me the Jenkins's id too. The question is how can I receive ids for non-jenkins instances only?
Replace your JSON path expression with the below and it should work:
$.data.[*][?(#.type != "JENKINS")].id

Uncaught Error: You're trying to decode an invalid JSON String

I have facing problems with EXT js code to store data using Java.
Below is my code. Can one please help me.
Below is my NewCustomersVerify.js code:
var myHit = Ext.create('Ext.data.Store',{
fields:['Id','Name'],
data:[
{Id:'0',Name:'No'},
{Id:'1',Name:'Yes'}
]
});
var myRisk = Ext.create('Ext.data.Store',{
fields:['Id','Name'],
data:[
{Id:'0',Name:'Low'},
{Id:'1',Name:'High'}
]
});
Ext.define('Test.test.web.test.view.test.NewCustomersVerify', {
"xtype": "newCustomersVerify",
"items": [{
"xtype": "panel",
"items": [{
"xtype": "panel",
"items": [{
"xtype": "displayfield",
"fieldLabel": "Name :",
"margin": 5,
"value": "TEXT",
"name": "customerName",
"title": "Customer Name",
"itemId": "lnajnbi", "bind": "{customerName}"
},{
"xtype": "displayfield",
"fieldLabel": "Nationality :",
"margin": 5,
"value": "TEXT",
"name": "nationality",
"title": "Nationality",
"itemId": "lnbjnbi", "bind": "{nationality}"
},{
"xtype": "displayfield",
"fieldLabel": "UniqueId No :",
"margin": 5,
"value": "TEXT",
"name": "uniqueIdNo",
"title": "UniqueId No",
"itemId": "lncjnbi", "bind": "{uniqueIdNo}"
},{
"xtype": "hiddenfield",
"fieldLabel": "HiddenText",
"bindable": "contactId",
"margin": 5,
"name": "contactId",
"title": "HiddenText",
"itemId": "oidgafi",
"bind": "{contactId}"
},{
"xtype": "hiddenfield",
"fieldLabel": "HiddenText",
"bindable": "screeningId",
"margin": 5,
"name": "screeningId",
"title": "HiddenText",
"itemId": "didgafi",
"bind": "{screeningId}"
}],
"layout": "vbox",
"autoScroll": true,
"margin": 5,
"columnWidth": 0.5,
"itemId": "cieadni",
"dockedItems": []
}, {
"xtype": "panel",
"items": [
{
"xtype": "combo",
"fieldLabel": "Was there a verify hit?",
"name": "screeningHit",
"margin": 5,
"bindable": "screeningHit",
"title": "Was there a verify hit?",
"columnWidth": 0.5,
"width": "100",
"labelAlign": "left",
"itemId": "kbfmjgi",
displayField:'Name',
valueField:'Id',
queryMode:'local',
store: myHit,
}, {
"xtype": "combo",
"fieldLabel": "Country Risk (Nationality)",
"name": "countryRisk",
"margin": 5,
"bindable": "countryRisk",
"title": "Country Risk (Nationality)",
"columnWidth": 0.5,
"width": "100",
"labelAlign": "left",
"itemId": "kbgajgi",
displayField:'Name',
valueField:'Id',
queryMode:'local',
store: myRisk
}, {
"xtype": "combo",
"fieldLabel": "Occupation Risk",
"name": "occupationRisk",
"margin": 5,
"bindable": "occupationRisk",
"title": "Occupation Risk",
"columnWidth": 0.5,
"width": "100",
"labelAlign": "left",
"itemId": "kbaajgi",
displayField:'Name',
valueField:'Id',
queryMode:'local',
store: myRisk
}, {
"xtype" : "filefield",
"fieldLabel": "Upload evidence of verify (Screenshot from the verify portal)",
"msgTarget" : "side",
"allowBlank" : "false",
"buttonOnly" : "true",
"margin" : 5,
"name" : "uploadFile",
buttonConfig : {
"text" : "Upload",
"icon" : "images/cloud/upload.png",
},
listeners : {
change :"uploadFile"
}
}],
"layout": "vbox",
"autoScroll": true,
"margin": 5,
"columnWidth": 0.5,
"itemId": "nehbeki",
"dockedItems": []
}],
"layout": "column",
"autoScroll": true,
"border": true,
"margin": 5,
"itemId": "gjihcpi",
"dockedItems": [{
"xtype": "toolbar",
"dock": "bottom",
"ui": "footer",
"isToolBar": true,
"isDockedItem": true,
"items": [{
"xtype": "tbfill",
"itemId": "hajhegi"
},
/* {
"xtype": "button",
"name": "cancel",
"text": "Cancel",
"margin": 5,
"isResetButton": true,
"itemId": "bbkmkmi",
"listeners": {
"click": "oncancelclick"
}
},*/
{
"xtype": "button",
"name": "Confirm",
"text": "Confirm",
"margin": 5,
"itemId": "celbgji",
"listeners": {
"click": "onConfirmclick"
}
}],
"columnWidth": 0.5,
"itemId": "lfmepni",
"dockedItems": []
}]
}],
"border": true,
"autoScroll": false,
// "title": "New Customer Verify",
"margin": 5,
"itemId": "dinfmki",
"dockedItems": [],
"extend": "Ext.form.Panel",
"listeners": {
"afterrender": "onafterrender",
"scope": "controller"
},
"requires": ["Test.test.web.test.controller.test.NewCustomersVerifyController", "Test.test.shared.test.viewmodel.test.NewCustomersVerifyViewModel", "Test.test.shared.test.model.test.NewCustomersVerifyModel"],
"viewModel": "NewCustomersVerifyViewModel",
"controller": "NewCustomersVerifyController"
});
Below is my button onConfirmclick function call on NewCustomersVerifyContoller.js
onConfirmclick: function(me, e, eOpts) {
var jsonData = {};
jsonData.contactId = this.view.down('#oidgafi').getValue();
jsonData.screeningId = this.view.down('#didgafi').getValue();
jsonData.screeningHit = this.view.down('#kbfmjgi').getValue();
jsonData.countryHit = this.view.down('#kbgajgi').getValue();
jsonData.occupationHit = this.view.down('#kbaajgi').getValue();
var scope = this.getView();
Ext.MessageBox.show({
msg : 'Saving data...',
progressText : 'Saving...',
width : 300,
wait : true,
waitConfig : {
interval : 200
}
});
Ext.Ajax.request({
url: 'secure/NewCustomersVerifyServiceWS/respond',
method: 'POST',
sender: scope,
jsonData: jsonData,
me: me,
success: function(response, scope) {
Ext.MessageBox.hide();
responseData = Ext.JSON.decode(response.responseText);
Ext.Msg.alert('Server Response', responseData.response.message);
win = scope.sender.up();
win.reportViewController.queryCriteria.controller.filterData(win.searchButtonRef);
win.close();
},
failure: function(response, scope) {
Ext.MessageBox.hide();
responseData = Ext.JSON.decode(response.responseText);
Ext.Msg.alert('Server Response', responseData.response.message);
}
}, scope);
}
Below is the error i was getting on the browser console.
[E] Ext.JSON.decode(): You're trying to decode an invalid JSON String:
Apache Tomcat/8.0.21 - Error
reportH1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}.line {height: 1px;
background-color: #525D76; border: none;}
HTTP Status 400 - type Status reportmessage
description The request sent by the client was
syntactically incorrect.Apache
Tomcat/8.0.21
Error is on Ajax success or failure function. You are trying to decode invalid json which is passed from your controller (or middle layer server). You need to console the response before decode any string.
Just add console log before Ext.decode(). and post response here. That will solve your problem.
thank you for your support.
I have declared the variable occupationRisk as **occupationHit **.
That's the problem... Now its solved.

ExtJS4 How to set TreePanels root node from JSON

I want to create TreePanel using ExtJS4. So I'm sending JSON to proxy reader which has following format
{
"text": "en",
"children": {
"text": "/",
"children": [{
"text": "/page",
"children": [{
"text": "/page/new",
"children": [],
"leaf": true,
"expanded": false
},
{
"text": "/page/remove",
"children": [],
"leaf": true,
"expanded": false
}
],
"leaf": false,
"expanded": false
},
{
"text": "/home",
"children": [],
"leaf": true,
"expanded": false
}
],
"leaf": false,
"expanded": true
}
}
How do I have to configure my Store if I want en node to be my root node.
Ext.define('Example.store.WebItems', {
extend: 'Ext.data.TreeStore',
model: 'Example.model.Item',
proxy: {
type: 'ajax',
api: {
read: 'some/url',
},
reader: {
type: 'json',
root: 'children' // Is this correct?
}
},
root: // What should I write here?
});
When I define TreeStore's root as root: 'My Root' it will add new root, but I want to use root defined in JSON.
So my questions are:
How to use root node from JSON instead of defining it manualy?
Do I have to define root node in proxy reader and TreeStore as well?
Response has to have root.
For example:
{
MyRoot: {
"text": "en",
"children": {
"text": "/",
"children": [{
"text": "/page",
"children": [{
"text": "/page/new",
"children": [],
"leaf": true,
"expanded": false
}, {
"text": "/page/remove",
"children": [],
"leaf": true,
"expanded": false
}],
"leaf": false,
"expanded": false
}, {
"text": "/home",
"children": [],
"leaf": true,
"expanded": false
}],
"leaf": false,
"expanded": true
}
}
}
In this example root is MyRoot. Now you have to "tell" reader that your root is MyRoot:
// ...
reader: {
type: 'json',
root: 'MyRoot'
}
},
//root: this config is not needed now
});
As per I know, you need to specify root as following:
root: {
text: 'en',
id: 'src',
expanded: true '
}
Try the above code snippet it will help you.
May be late but for others , wrap the JSON inside array [] just like this :
[{
"text": "en",
"children": {
"text": "/",
"children": [{
"text": "/page",
"children": [{
"text": "/page/new",
"children": [],
"leaf": true,
"expanded": false
}, {
"text": "/page/remove",
"children": [],
"leaf": true,
"expanded": false
}],
"leaf": false,
"expanded": false
}, {
"text": "/home",
"children": [],
"leaf": true,
"expanded": false
}],
"leaf": false,
"expanded": true
}
}]
Remove the reader block
reader: {
type: 'json',
root: 'MyRoot'
}
Add root block :
root: {
text: 'en',
id: 'src',
expanded: true '
}
Add rootVisible: false in treepanel.