icCube : how to show that a Big Widget is loading? - iccube-reporting

Using iccube 5.2, we developped a custom widget that needs quite BIG data download...
Unfortunately, when loading a report containing this widget, nothing is shown on the screen until it is loaded and users may think nothing happens...
How could I advise the user it is working, and he just has to wait ?

There are predefined styles for such case.
<div class="ic3-fixed-layout-box ic3-loading" style="width:200px; height:200px">
<div class="ic3-loading-div-back"></div>
</div>
This html will result in 200x200 px box with loading animation and blur effect.
So, to see loading effect class .ic3-loading should be added to the widget's parent container (with class .ic3-fixed-layout-box) while request is loading.
Check that your widget spawns with these classes before request send, and on request success just remove .ic3-loading class from parent element just like it is done for ic3 widgets.

Related

How insert multiple FormView in View of an SDI application

I searched on the forum and I don't find a solution for my issue. So I hope you can help me :)
I work on a personal project for SFC designing (Sequential functional chart) and I'm working with visual studio in SDI(I'm using MFC library). If you see the "design" of an SFC you can see the different elements needed to compose this. So you can find Step, Transition, and more. If I take a step for explaining my issue, after double click on the step a popup dialog is opened with the elements to define this step (actions on this step, and more). The issue is here, I can't see two or more step elements at the same time. I want to reuse the existing concept on other software, see this.
Step close
Step open
Dialog to add
My question is, how I can implement a dialog with my graphic element in mainframe (In this case, a step)? I don't know how I can insert a dialog with my element, I think I need to use CFormView, but I don't know.
This dialog needs to be resizable and reduce directly by the step graphic.
any idea?
Thank you in advance! Sorry for my English ..
Sorry, I think my request is not clear .. (Thank you for your answer)
The context, it's an SDI application with the Document/View architecture. Actually the view is derived from CScrollView.
So, in the document class, you have the different lists of components for make SFC (Steps, transitions and symbols ..). I'm working today on Step element.
The user inserts a new step, the step is draw on the view like this :
enter image description here
And now the user want change the events on this Step, for this after double click on the step the events editor is opened at right of step draw, like this :
enter image description here
For this, I've created a new dialog resource and create the class by wizard in CForwView derived class. In step attribute, you can find one instance of this derived class (The derived class of dialog).
But this doesn't work correctly, I think my method is bad. At the first try, I have sent the pointer of the current document to the "CFormView::Create" function for having the "Save" button active with the focus on the FormView. But after destroying the step, the instance of FormView is destroyed and the document with the instance of formview ...
No problem, you can use "Create" within CCreateContext a null pointer. But with the document or without I have a lot of problems (graphic design not correct in FormView, regularly (not systematic I have assert fail on Proc exchange (for differents reason)). But the "concept" is good, the editor follows the draw if I scroll, I can open or close the editor at any time and on any elements.
For the old capture, it's my SFC designer "model". My application is a complement to this application, so I want a similar design. I don't know how work my model application ..
On my application all is draw by MFC GDI, I don't use ActiveX or other tools.
So what is the correct way to implement one instance of editor by instance of step ?
For the implementation on this FormView I have :
- Make new dialog in ressource
- Create a derived class of CFormView with the created dialog
- Add one instance in attributes of Step element
- "OnDbClickOnStep" -> Call "Create" with the good position / size, pointer of mainview (in my case the CSrollView derived class)
- Done, FormView inserted in a mainview, I can edit my step events.
? Not done, I lost save button and other function linked to the document with the focus on a control in FormView. The app want a document with this view, how to override this ?
? Error in Proc exchange, for different reason...
You have an idea ?
You normally don't draw anything in the "main frame" (or the "MDI clild frames", in the case of a MDI application), this is done by the library, and imo sufficiently so. You display your data in a CView-derived class.
CView is the base class of all other MFC view classes. It's a simple graphical class - you need to paint it yourself in the OnDraw() member.
CScrollView is a descendant of CView, adding scrolling functionality (scroll-bars are automatically displayed if the scrollable area is bigger than the visible window area).
CFormView is a descendant of CScrollView, displaying a dialog resource-script, containing "controls" (edit-boxes, check-boxes, images, ActiveX etc).
As in your case the "controls" won't be initially known (except maybe for some few special cases) and rather programatically created, the resource script will most likely be empty, so using either CFormView or CScrollView will basically be the same. I would suggest starting with CFormView, and "downgrade" it to CScrollView if CFormView is not necessary or causes you troubles.
What are those "Step" items shown in the pics? ActiveX controls, child dialogs maybe? These work best as child controls on a dialog window. Are they already implemented, or they are just pics of some other software? Btw ActiveX is a way to define controls that can be used in other projects too, without having to include them in the project source.

Custom font in actionbar on launch main activity

I'm looking for a way how I can change the font of the title in the actionbar before starting the main activity.
My current approach to change the font is the following:
int titleId = getResources().getIdentifier("action_bar_title", "id","android");
TextView textView = (TextView) findViewById(titleId);
textView .setTypeface(Typeface.createFromAsset(getAssets(), "my_font.ttf"));
This block of code is executed at the beginning of the onCreate method of the main activity. Actually, this works pretty well.
However, the small imperfection is only that when the application is launched, the title appears for a very short time in the default font before it changes. In my activity I use the DrawerLayout.
How can I change this behavior so that the text is displayed from the start in the right font?
Thank you for your help.
This is probably not possible. At least I have not found a way to accomplish this.
But I found a workaround that provides the same effect: You can design an image with the title and then define it in the styles.xml as the logo, for example:
...
<item name="android:logo">#drawable/ic_logo</item>
...
When the application is started up, the logo with the title can be removed again. As far as I've seen other apps (eg runtastic) use this technique as well.

Making a menu item appear when a certain view is displayed rails

Windows 8.1
Rails 4.1
Ruby 2.0
I have the menus for my application defined in views/layout, and one of those is the header where I have the menu items. There are some additional partials rendered form _header.html.erb as well.
I would like to have an additional menu appear ONLY when I render views/pages/index. How do I go about doing this?
I would look in Javascript. Have you tried listening for the specific body class of that page? Each body gets a dynamically generated attribute of class="controller action". If you listen for body.controller.action, you'll have the event that can trigger you to show (or hide) your menu item.
Pseudo code might look like:
I want a new menu to appear for controller1, action1
when any action fires in any controller
if the class of the body element has both class "controller1" and class "action1"
menu.show()
else
menu.hide()

AngularJS Master Detail example [ASP.NET application with WEBAPI,AngularJS]

The requirements is like master detail grid, on load the master gets displayed as a table, on every detail row edit button click , need to open the detail edit form in a Modal window. There could be different templates based on detail/productTypes . For example productType1 will display few set of fields(template 1) , so on.
Have WEBAPI with REST support and understand how to build the initial Master table But not sure on how the details part.
Any direction would be helpful.
Does your HTML/CSS Framework provide mechanism for a dialog? If so you would have to create a directive to wrap it around the script to open the dialog.
On the master grid row ng-click will set a flag on the controller. When this flag is set to true, the code in directive will open the dialog. Within that dialog div you can use ng-include that will be bound to the url of the template (controller variable will store that url).
The template is bound to a child object in the controller scope and has the fields for the details. Setting the flag to false will close the dialog and you will have changes your main controller.

MFC ListView Cntrl error

I am displaying a ListView cntrl in a modal Dialog box, with ListView properties as "Owner Draw" and "Owner Draw fixed" and using LVN_GETDISPINFO. The dialog along with the list view is getting displayed when there is no data. But strangely, when I am trying to insert data into the list view (by putting data in the array (vector) attached with the list view), my dialog is crashing.
On debugging, the error seems to be coming from the following MFC Library function :
void CListCtrl::DrawItem(LPDRAWITEMSTRUCT)
{
ASSERT(FALSE);
}
In my other applications I have successfully displayed a list control (with Owner draw and Owner data), without subclassing CListCtrl, and overidding DrawItem(). But in my present dialog, I am unable to understand why the list view is failing when I am inserting data into it?
Appreciate your time and help.
Thanks
when you define Owner Draw property, you must implement your own DrawItem function witch draw one item.
You can look for this article