I am using ExtJS 3.2.1 with Rails 3.x.
I have a Panel on which I want to add ExtJS Buttons "dynamically" depending upon the number of records in the db. I tried googling but no luck.
Any Suggestions?
Thanks in advance !
It not clear in your question where you are adding the button. Are you adding it into a toolbar or into buttons section of a panel. Either way, you should be able to use the addButton method available for Toolbar and Panel.
panel.addButton({your button config});
Now, to create buttons you will have to wrap it in a loop. Before that you will have to get the necessary data from DB. For getting data, you can use the Ext.Ajax class and according to the response, iterate and create the buttons.
Related
I am trying to remove update cancel buttons.
but no any config's are available for this.
I have tried to override but i cant remove this.
please if you have done task like this or know how to do this help me.
You're absolutely right that there is no built-in way to hide the update and cancel buttons with the row editing plugin.
You could try to hide the button bar via CSS. The normal CSS class name is x-grid-row-editor-buttons. But this may cause other problems.
Or, you could try a different editor, such as the CellEditing plugin - this lets you edit one cell at a time, as opposed to showing the editors for the entire row, and doesn't use buttons.
You might be able to remove the button by overriding the Ext.grid.plugin.RowEditing. A quick look at the source shows me an array with in the initEditiorFunction() which looks like this.
btns = ['saveBtnText', 'cancelBtnText', 'errorsText', 'dirtyText'],
Try removing the cancelBtnText button, and perhaps it won't show on there? I haven't tested this but this might be something in the right direction.
How to achieve the UI as shown in the image below?
I wanted to create a form with steps, by clicking next button it will swipe and open next form and will update the number of stacked pages as shown.
For making this type of UI you need to use Background image and UIPageControl. And you have to make other UI elements like text fields and button with code. You should be careful about frames.
Finally I got the answer, and created the same UI using Koloda library in objective-c
https://github.com/wang9262/Koloda-ObjC
This would save loads of time when testing a specfic section which is far down the form and the form is configured in a Wizard View.
I just wondered whether there is a querystring parameter or xpath setting to put in xforms-inspector which will save us endless clicks on the Next button! So far the best way I have found is to disable the Wizard View so that the form shows vertically.
This isn't currently supported, but it sounds like a worthwhile feature to have, and I've created an RFE for this feature.
I don't understand why you have to click next all the time, you should be able to just click on the section name in the table of contents.
I have created a form with 6 sections and configured Cancel, Next, Prev and Submit buttons in properties-local.xml.
It is usually not advisable to allow the end-user to submit the form until they have at least reached the final section. The only way I can see that this may be possible is to use buttons within the form and by checking which section is currently in focus.
I notice that this has been fixed for Orbeon 2016.1 (see Is it possible in orben to hide or disable the "send" button until a form is finished?), but just wondered whether there is a workaround for Orbeon v4.10?
With 2016.1, this requires the following conditions:
Use of the oxf.fr.detail.buttons.inner property.
Use the wizard's validated mode.
The documentation on this was missing. I have just added it. I hope this helps!
I have multiple accordion-set's nested in side of each other, they make a types of multi-category sorted list. Anywhere from 3 to 5 steps into the accordion nests I can start having actual items (buttons), they are in reality stylized 'A' elements.
I'm able to get the nested accordion-sets to refresh on successful AJAX return, but can not seem to figure out how to get the buttons to refresh and take on the jQ mobile styling.
$('#main-market-list').find('div[data-role="collapsible-set"]').collapsibleset({refresh:true}); is what Im using for the accordion-sets, whats the button version of the same logic?
You could try $(".ui-page-active").trigger("create") to force JQM to restyle the entire page.So your buttons too will get styled along with accordion sets.
edit: you could try $('.button-class').button('refresh'); where button-class is the class name for the links which you would like to style.