TableViewer, defining an initial sorting order has no effect on data - eclipse

pratically I build up a tableviewer as usual, but initially it does not sort all the rows according the column defined for sorting.
The code I am using:
viewer.getTable().setSortColumn(viewer.getTable().getColumn(4));
viewer.getTable().setSortDirection(SWT.UP);
Only after clicking manually the column #4 I obtain the correct order, otherwise it follows exactly the "insert order" of the object list linked to the ViewContentProvider. Please can you help me? Tnx

You just need to refresh the table.

Just had the same problem.
When using ...
tableViewer.setComparator(comparator)
... the above code is ignored.
You have to set manually the initial sort column index in the extended ViewerComparator.

Building off Devalex's answer, the following worked for me:
viewer.setContentProvider(...);
viewer.setInput(...);
viewer.setComparator(myComparator);
myComparator.setColumn(colIndex);
viewer.refresh();

Related

Prestashop 1.7 - filtering not working, showing empty results

I have got a problem on my store (still under development) - http://condesign.pl/officina . It's all about filtering products, for example here: http://condesign.pl/officina/pl/521-akcesoria-ze-skory . All the attributes on the left are being displayed correctly, with numbers of products in brackets, but when You click on any filter (like size or color), the list of results is empty.
Help please!
Try yo do the exact same thing with the default theme of Prestahsop. Because this looks like a theme issue.
This is very large bug in ps_facetedsearch module... You can't do anything with this. You must wait for fix. https://github.com/PrestaShop/PrestaShop/issues/9684 here is list of bugs in module.
It was my mistake - this module uses table ps_stock_available. I was migrating data from previous store to this one (only in phpmyadmin, not panel, because of very different structures), and I didn't know about this table. So it was about my missing data.

Create absolute link with specific value of cell in table view

I want to render a absolute link in table from value of cell but I got a relative link instead.
Here is my configuration:
What I got when click on cell:
http://10.93.9.209:3000/http%3A%2F%2F10.131.227.253%2Fjob%2FPerformance%20Testing%20Pipeline%2Fjob%2Fstable%2F21%2F
In Grafana 7 (new table panel) it's ${__data.fields[2]} where number is column index.
This is a change introduced in one of the new Grafana versions. If you want an absolute URL, you must use ${__cell:raw} instead of ${__cell}. Reference
If you want to reference another column when clicking:
This is possible, I am using 9.1.7 and originally used the old table; however, after migrating noticed the same issue. That said, I found a way to make this work:
Add the ID column that you want to hide; example simID
If the column is the first column, say 0; then use:
var-whatever=${__data.fields[0]}
Now, override the column, field with name: simID Add option ‘Hide in Table’ and turn on
I also had to format the number, e.g. remove decimals & set unit to standard
Hope that helps someone… took me a good 2 hours to figure.
Btw, it also works on graphs and you do not have to hide; aka reference your original query in the datasource and add a data link with the same options.
What result do you get if you try $__cell_2?
The syntax above no longer works. The value is now ${__value:raw}
$__cell_2 above solution worked for me.
With the new table panel introduced in Grafana either ${__cell} or ${__cell:raw} do not work for this now.
You must use ${__value:raw}

RDLC Crystal Report Set Column Group Result Vertical

I can't find any help online with my problem maybe due to that I don't know the exact keywords to use but hear me out.
Here is the screen shot of my report format...
The actual report result appears like this...
The next item appears beside (right side) the first result. I want it to appear below instead like this...
How do I achieve this? Just comment any additional information that is needed.
BTW, I am using visual studio 2013 (Seems like it matters).
UPDATE:
This is the report format that I want to copy. The headers are not important just the body of the report. Thanks!
Try to use grouping go to this link hope this gives you a clue thanks
Finally found out what's wrong. I removed the column groupings and added only a parent row group. Then I added all needed rows and columns inside the group. It was fairly easy once I found out the problem.
Here's the output of my report.
Thanks guys!

How do I display a default value when no suggestion found in suggestbox

I would like to display a default value (that I already set using setDefaultSuggestionsFromText()) when there is no suggestion displayed for the user entered value. Thanks for your help!
You need a SuggestOracle that always returns a suggestion. You could easily build one that wraps your current SuggestOracle and returns your canned suggestion when the wrapped oracle returns none.

cakephp empty option for select fields

I am stumped beyond belief.
I have a select box being generated by the cakephp form helper. I am feeding it an array of options, and passing an empty value... pretty standard stuff.
However, my "empty" field is showing up at the very bottom of the list.. not the top. So when the field loads, it just defaults to the first option... which is not the "empty" option.
Not a whole lot of room for error on the code here..
echo $this->Form->input('whatever',array('empty'=>'Choose One','options'=>$categories));
The only small item that might be important, is that $categories is a multi-array, so the select box has optgroups & options.
Is there some quirk/bug out there that I do not know of that is trying to force me to sneak into my scotch supply a few hours ahead of schedule?
edit: using the latest release of cakephp 1.3.x
I think that I once had the same problem.
It turned out to be the data (options array).
Is there an option with an empty key? probably the last one then.
this lead to the scenario I remember and seems to be the exact same thing.
the form helper will override this empty key value pair then and not create a second one.
without more infos from your end this will be difficult to solve.