How to : customize messages on an advanced combo box (GXT 3)? - gxt

I am using an advanced comboBox like this one : http://www.sencha.com/examples/#ExamplePlace:advancedcombobox.
I would like to change the label displayed at the bottom of the result list : Displaying 1 - 10 of 274.
How is it possible? I saw that PagingToolBar exposes its Messages via getters/setters but I don't know how to get it from the ComboBox.
Any idea?

I finally found it :
ComboBox.getCell().getPagingToolBar()

Related

Python 3 / QT Designer - Radio Buttons showing duplicate values in console

I'm using QT designer to try and make a couple of radio buttons with a label that shows which button I've selected in a variable called URL.
I've got the following code so far :
self.radioButton.toggled.connect(self.myradioButton1_function)
self.radioButton_2.toggled.connect(self.myradioButton1_function)
def myradioButton1_function(self):
staging = 'https://staging/URL'
live= 'https://live/URL'
if self.radioButton.isChecked()==True:
URL=staging
if self.radioButton_2.isChecked()==True:
URL=live
self.label.setText("URL is : " +str(URL))
print(URL)
The label display works fine and switches perfectly between live and staging but the problem is with the variable in Python console, when switching between the two buttons - this prints the variable multiple times e.g.
https://staging/URL
https://live/URL
https://live/URL
https://staging/URL
https://staging/URL
https://live/URL
https://live/URL
I want to use the URL variable in another function so need this to store 1 value on selection of a radio button, can you please advise? Many Thanks.
I fixed this by changing the toggled to clicked e.g.
self.radioButton.clicked.connect(self.myradioButton1_function)
self.radioButton_2.clicked.connect(self.myradioButton1_function)

How to display search results in groups like whatsapp does

I have a viewpager with some tabs. I always use the same fragment with a listview to load some String data into the listview. So far, so good. I now want to implement a searchview. And, I want to group the search results like whatsapp does. So the found listview items should be grouped by the tabs they were found in.
My question is: Which view does whatsapp use and how can I do so ?
Can I keep my simple listview or do I need some other stuff ? I thought about an expandable Listview, could this be a solution ?
Unfortunately, SO doesn't allow me to post an WA screenshot at this moment. But I think you know what I mean.
At the end of this day, I can say that my desired Grouping of Searchresults is definitely possible with an Expandable Listview.
You can hide the Group indicator and disable collapse so it looks like in whatsapp.

How to create a NotesRichtext item that is computed for display?

I know this is a common problem, and I tried a few solutions already, but the problem I have right now with my current code is that even though the attachments show in the computed for display field, I get the error "Note Item not Found" when I try to open them.
The form is built with two fields, in a programmable table that displays the editable one or the computed for display one.
The trick I found with Google's help was to delete the computed for display item in the queryopen event, so Notes regenerates the cfd item when opening the document. Visually, this works, as I see the text and attachments, but the attachments can't be opened.
Here is the code that removes the item in the QueryOpen of the form:
...
Set item = doc.GetFirstItem("dspDescription")
If Not item Is Nothing Then Call item.Remove()
...
Has anyone successfully achieved that functionality? Is there another way of doing this? I already tried with subforms, and because of the way the application is built, I need to be able to switch from editable to read only on the flick of a radio button, so subforms are out of the question as they can't be displayed dynamically.
Why don't you simple put the richtext item in a controlled access section and make that section editable / not editable with a computed for display formula. Select "always expand" and hide the section title, so that nobody can collapse it, et voila.
Regarding your comment: With this properties:
for this section in designer:
You get this result:
You see: No twisty, no "visible" section

"Visible" property on XPages edit boxes based on checkbox selection(s)

I am new to XPages, and I have a Check Box Group ('checkBoxGroup1') as one of my design elements that contains three choices ("CBChoice1", "CBChoice1", "CBChoice1"). Underneath that Check Box Group, I have three edit box fields which correspond to the three checkbox choices. Each time one of the checkbox choices is chosen, I want the corresponding edit box to become visible.
Whenever one of the checkboxes is chosen, I have it partially refreshing the panel that the edit boxes are in, but I cannot figure out the code in each of the edit box's visible property. I started with
getComponent('checkBoxGroup1').getValue() == "CBChoice1"
which kind of works, but isn't the answer. I also tried
var valueArray = getComponent('checkBoxGroup1').getSelectedValues();
valueArray[0] == "CBChoice1";
which seems more on target, but I was getting the following browser error:
Error 500 HTTP Web Server: Command Not Handled Exception
I notice that in the computed code for the visibility property, it is SSJS. I feel like I am close, but have been banging my head for too long. Any help would be greatly appreciated.
A better method might be to bind the checkbox group to either a document data source or a scope variable.
Then, your visible property might look something like:
#Contains(myDoc.getItemValueArray("checkBoxFieldName"),"CBChoice1");
or
#Contains(viewScope.get("checkBoxScopeVar"),"CBChoice1");

Cucumber with Extjs4 choose radio step not working

I'm Working on Ruby on rail 3.1 with Netzke 0.7.4 and Cucumber.
I use Cucumber with Netzke it work great but I have found some problem on choose radio step.
I use this step.
When /^(?:|I )choose "([^"]*)"$/ do |field|
choose(field)
end
It show this error message.
And choose 'Yes' for GST field
cannot choose field, no radio button with id, name, or label 'Yes' found (Capybara::ElementNotFound)
(eval):2:in `choose'
It's look like choose(locator) method can't find any radio button on my page.
That very strange because it have only 2 radio on page.
Question is how can I do with this radio?
Thanks.
Finally I have found answer I search check box instead of combo box and it work.
Is ExtJs 4 transform check box to radio?

Resources