JavaScript

kentj's picture

Execute Service Call When Window Unloads

How do I ensure a service call executes when a user closes the browser window or navigates to another page?

I am using the BIRT Reporting Engine and have started up an instance of the report Platform object that I need to clean up. I execute a service call to the Reporting Java Service to trigger the destruction of my instance to the garbage collector will delete it.

passing variable to object reference

Hi,

I am getting annoying error when attempting to pass a variable to dot notation object reference

contractorsDojoGridSelect: function(inSender) {

wm.forEach(this.LiveForm1.widgets, function(editor) {
var editorname = (editor.name);
if (editor.datePattern !== undefined) {
this[editorname].domNode.style.backgroundColor = "#ff2121";
this[editorname].domNode.style.fontWeight = "bold";
this[editorname].domNode.style.color = "#ffffff";
}}}

ERROR
Error in [Main:main].contractorsDojoGridSelect: Cannot read property 'domNode' of undefined

Dramia's picture

DojoGrid how setData

Hi everyone !

Actually, I have a ServiceVariable bind to a Java function which return a complex list.
With that, in JavaScript, I fill 2 var, each contains a list.

How bind these 2 lists of a empty DojoGrid ?

Thank you for any tips !

Dramia

Dramia's picture

DojoGrid click and event

Hi !

I have 2 questions :

Is it possible to click on a dojo grid and set modifications directly on this grid, without use panel/text under this dojo ?

And is it possible to launch a JavaScript code when an user click on a spécific column on a specific row ? (And not just when he clicks on a spécific row)

Thank you for your answers !

Dramia

Dramia's picture

Export CSV with selectedRow on dojoGrid

Hi everyone,

I want to export, in a csv, a selection when I made.
So I have 2 grids :

Grid1 = all my data

I use this.dojoGrid1.setQuery(row : "myRow");

But the result of this query doesn't appaer (I got empty grid). I have to quit the layer, then come back at the layer to see my query. May be the issue is the dojogrid is not update.. but how can I update it in JavaScript?

After, I want to select automatically all row(s). But that doesn't work..

Translating the invalid widget warning message "Invalid value for WIDGET"

We are in the middle of translating our application into French, and have hit a snag.

I have some widgets (just 2 wm.Text widgets) inside of a wm.LiveForm, and they have a regex attached to them for validation.

I have already found ways to translate the widget, the userPrompt, even the regex is customised for the different languages. But there's a Warning toast message that pops up on these particular inputs, that I can neither find a way to translate, customise, or even turn off.

The Warning message simply states:
Warning
Invalid value for Date

Searching Word documents stored in database

Hi All

I really need help with the following. I am currently developing a recruitment database application for my company internally. I want to know what I need to do in order to perform searches on Word docs stored within the application i.e. to search through the candidates resumes.I have seen other applications that uses boolean searches.

I want to know what I must do to use this type of feature within Wavemaker.

Any advise will be greatly appreciated.

Piramidale's picture

HQL - Filtering inside Relationships (ex. CASE Inside SELECT)

Hi,
please, consider this situation:

DATABASE 1

Tables:
-------------------
TABLE_A
- id_a
- col_a1
- col_a2
- col_a3

TABLE_B
- id_b
- col_b1
- col_b2
- col_b3
- col_b4

Relationship:
-------------------
name: MyRelation
type: One-to-many (from "TABLE A" to "TABLE B")

Then, there is an "wm.List" widget (binded to a ServiceVariable that is binded to an HQL query) that need to show:

• Need 1 -> "TABLE A" rows, filtered by "col_a1" value.

Dramia's picture

Export CSV limit 500

Hi everybody!

I currently use "this.DojoGrid.showCSVData();" in JavaScript to export my list of name.
However, my created file.csv contain only the 500 name of my selection.
How can I increase this limit for my file.csv contain all of my selection?

Thank you for any help.

Dramia

DraggableTree Bug

Dear WaveMaker Team,
I found the following bug in the actual release version 6.6.0.

In the code of widget file DraggableTree.js at line 58 there is:

var moveNodes = !this.multiSelect || this.selected.length === 0 ? this.draggedItem : this.selected;

but in case of multiselection not active the instance variable this.draggedItem will be not an array. Going ahead in the code the array moveNodes is looped to execute the drop for every items. In this case will not work. I fixed the code replacing the mentioned line with the following. Hope this could help you:

Dramia's picture

IPad : no keyboard

Hi,

I created a web site which works fine on Pc, but not on IPad.
In fact, when I touch text bar, the keyboard doesn't appear..

Someone know why ?

Thanks for any help,

Dramia

Dramia's picture

Get data from SelectMenu

Hi!

I don't manage to get the value from my SelectMenu.
In fact, my SelectMenu allow people to choose a line in the drop-down list or to write the answer.
If this person choose an answer in the list, it's OK, but if the person write the answer, I can't to get the value. And I don't understand why..

In my code (JavaScript):
console.log("Answer = " + this.myDropDownList.getValue("dataValue").c0);

In my debug:

If the person choose an answer in the list > "Answer = Anwer1"

If the person write an answer > TypeError: Cannot read property 'c0' of null

Application start hook?

Is there no way that I can run some setup code when the application first loads up in a user's browser?

I've edited my Foo.js file, and added a start function guessing that this might work:

Foo.extend({

    start: function() {
        alert("Application start!");
    },

    ...

And actually to my mild surprise, it does execute and alert, however it does that on every page change, instead of once when the application starts up for the first time.

Re-rendering a Calendar

Does anybody know how I can re-render a dijit calendar after changing the specialdates data?

Setting a column value based on the value of another column

Hi,

I am trying to set a value for column B based on what a user enters in Column A.

If a user selects "Completed" from a drop down list in column A I want column B to have the current date and time entered, if the user selects anything else then i want column B to take the value of null.

Syndicate content