Hello,
I’m Lavinia, I’m new to this forum. I came here hoping that maybe you can help me, or give me some ideas that could solve my problem.
I’m working on a project that involves google charts, technologies used for this project: servoy, postgresql, restful, php, javascript.
The browser bean is set to navigate to the page that renders/displays my chart. Everything works nice, with one exception. There is this control provided by google chart api (CategoryFilter) that filters the data that is displayed by the chart after a column of one’s choosing. Maybe you know that in order to create a google chart you need a DataTable (a two-dimensional, mutable table of values where each column as a data type, optional id and optional label).
The data that is used to populate the chart is a json object that looks somehow like this:
example:
{“cols”:[{“id”:“”, “label”:“Year”, “type”:“number”},
{“id”:“”, “label”:“Month”, “type”:“string”},
{“id”:“”, “pattern”:“”, “label”:“Internal Visit”, “type”:“number”},
{“id”:“”, “pattern”:“”, “label”:“External Visit”, “type”:“number”}],
“rows”: [{“c”:[{“v”:“2009”, “Ian”, “1”, “0”}],
{“c”:[{“v”:“2009”, “Feb”, “2”, “1”}],
…
]};
And I am using the column year, the first column (0) as a filter, in order to display data that belongs to a selected year, it’s a really nice filter but it won’t work properly in servoy. I’m not sure if it’s the browser bean or something else, but I’m inclining to think that there’s something with the browser bean.
So here it is what happens:
In Servoy 5.2 you can’t select something from the category filter by mouse only by keyboard (up and down arrows + enter), but sometimes it works to select something by mouse but only for a split of a second, so it’s quite impossible to reproduce that instance for debugging or anything of the sort, plus I noticed some really weird behavior, if by any chance I’m refreshing in the browser (any browser) the page I’m loading in the browser bean, and then select a random option and then I try to select again an option in the client using the mouse it will work but just for a second, then it stops working, I wish I had the chance to make a demo movie of that “phenomenon”, but it’s really difficult to make it happen again.
Then in Servoy 6, it’s the same story, you can’t select anything by mouse only by keyboard as mentioned above, but if I try to refresh the page in the browser and try to get the same phenomenon as I got in Servoy 5.2 by going back to the client and try to select something by mouse the select won’t even open unless I click anywhere inside the widget with the bean or anywhere on the client and then try to select again but still it won’t work by mouse.
At some point I was suggested to try an put all my javascript code in the header of my page, and so I did, but with no results, doing this didn’t influence how things work at all. So I am out of ideas.
I hope I have explained things clear enough. Sorry about the long post.
I have here a short movie of some behaviors in Servoy 6.
http://screencast.com/t/eVQmGCnH7x
And here is how it works in the browser:
http://screencast.com/t/xLDFrP7ME
this is the piece of javascript that creates the year picker
var yearPicker = new google.visualization.ControlWrapper({
‘controlType’: ‘CategoryFilter’,
‘containerId’: ‘control1’,
‘options’: {
‘filterColumnIndex’: 0,
‘ui’: {
‘labelStacking’: ‘vertical’,
‘allowTyping’: false,
‘allowMultiple’: false,
‘allowNone’: false,
‘label’: ‘Select year’
}
}
});
and here it is how it’s binded to the chart
dashboard = new google.visualization.Dashboard(document.getElementById(‘dashboard’));
dashboard.bind([yearPicker],[chart]);
dashboard.draw(json);
Does anyone have any idea what could cause this problem of not being able to select an option from this select/picker/filter using the mouse but only by keyboard?
Do you have any suggestions?
Am I missing something about the browser bean maybe an unchecked option?
I’d be really grateful for any information.
Thank you.
PS:
And there’s one other thing I noticed, there was this time when I had a console.log(json) line in my js file, I used that in order to see in the firebug how my json object looks like, and I kind of forgot to delete this line, and it caused some problems in servoy, because of that line nothing would show up in the bean (but a blank page) when it should have loaded the page with the chart, so I started to reopen my browser and see if everything works fine in firefox, and it worked, I opened chrome and it worked, I opened safari and it worked, I opened opera and it worked, I opened IE and it did not work, I got back to my js file and I commented most of the lines until I ran out of ideas and thought about commenting out the console.log line, then it worked both in IE and in the client(I kind of find it weird that a console.log line would cause a trouble like this and have a blank page displayed in my form).
So I thought that maybe the control that creates the select filter is also dependent on the browser so I tried to see if there is the same problem in IE and there was no such problem, I could select by mouse any option I wanted. IE is not my default browser, so then I don’t understand why the browser bean behaved and behaves as if IE was my default browser.