Problem with sortable js when sorting litelement - server-side-rendering

I'm new to litelement. I use sortablejs to sort my litelements. My litelements is dynamically render based on the array and the preview of sorting is so wrong. Can any one help me please. You can check it here https://jsbin.com/cepoqiw/1/edit?html,output
I tried to empty the uls but still have a bug. I'm new to this lit element please help.

Related

Is there a way to get a list of hidden column

I want to save the list of hidden columns so that next time when the table is loaded I show the table with the same set of column which the user chose to see in the past. Is there a way to get a list of all hidden columns in bootstrap-table library.
You can use the cookie extension to solve your problem, here is an example: http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/cookie.html.
The plugin saves:
Sort order
Page number
Page number from the list
Visible columns
Search text
Docs here: http://bootstrap-table.wenzhixin.net.cn/extensions/#table-cookie
you can use the jquery datatables plugin to easily handle this problem, this plugin auto generate the table columns and show that.
you will get more information from link below,
https://www.datatables.net/
hope it helps.
try this below
var tab = $('#table').bootstrapTable('getHiddenColumns');
$.each(tab, function(index, value) {
alert(value.title);
})

Peoplecode to hide column from a grid

I am trying to hide a Column from a grid using Peoplecode, but the column comes from a subpage. I tried using the following code.
GetGrid(Page.PAGE_NAME, "GRID_NAME").GetColumn("COLUMN_FIELDNAME").Visible = False;
This didnt work. Can anyone help me with this.?
Use the name of the parent page and not the subpage in the GetGrid call. The code should be on the Activate event of the parent page.

How to display changing data in XUL

I'm trying to build a firefox extension which can get rss feeds and display them in a popup panel. But I'm not aware about how to display feeds in a panel(I know how to display static text).Because the feed is varying all the time.
Any help regarding this matter will be appreciated.
Thanks in advance.
How about using setInterval to call a function that redraws the panel at the time interval you specify?
You can create DOM elements inside a XUL popup panel using JavaScript, but you have to remember that the panel requires the XHTML namespace:
<panel id="your-id" noautohide="true" xmlns:html="http://www.w3.org/1999/xhtml">
and instead of using:
document.createElement("p"); //for example
you would need to use:
document.createElementNS("http://www.w3.org/1999/xhtml","html:p");
You can get the popup reference by id and just create and append elements as you need them. Then the following might help:
https://developer.mozilla.org/en/XUL/PopupGuide/OpenClose:

AdvancedDataGrid problem with programmatically adding a column

I have a Problem with adding columns programmatically to a AdvancedDataGrid. The code:
var cols:Array = thisDataGrid.columns;
cols.push(dgc);
thisDataGrid.columns = cols;
does create a column, adds it to the cols array, bot the last code line has no effect. The cols wont be found in the thisDataGrid.columns property...
What could be the problem? I'm working with a test license, and on the advanceddatagrid the watermark shows up. Could this be a problem?
Thanks for help!
Markus
I had the same issue and resolved it by making sure that I add my ADG object into an active visual component. In my case, I just made a call to this.addElement( adg ) (or this.addChild() ) after updating the adg.column property.
It seems like the adg properties will only update when the adg is "attached" to an active visual component. I havn't taken the time to really look into the cause of this behaviour though.
try doing invalidateProperties() and invalidateDisplayList() on grid

How to change the state in Adobe Flex, using ActionScript?

I`m really new to Flex and ActionScript so please be patient with me.
I want to implement this script: tinyurl.com/yafqrqb
...that is doing this "magic" : tinyurl.com/y9qg32r
...but I want to tweak it a little on InfoWindowTabbedComponent. To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.
You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.
What I`m trying to do is to change this:
var adobeURL:URLRequest = new URLRequest("http://www.microsoft.com" );
navigateToURL(adobeURL, "_self");
Into something that change the current state.
Can you please help me?
Here`s my custom InfoWindowTabbedComponent: http://pastebin.com/f387bc3b9
I'm not sure I understand what you want to do. If you just want to set the selected Tab, instead of calling navigateToURL() set myTabNavigator.selectedIndex (or selectedChild)
If you really want to change the state, each component has a currentState property, but then you would have to define the states first (via the tag)
And if you really want to navigateToURL() you could navigate to javascript:somefunction() and then set the application state via ExternalInterface, but that would be horribly circumstantial.
Cheers,
Jörg

Resources