JavaScript

Question about HTML Widget

0

hi, guys i have a Html widget this html object
have a one javascript funcion how i can invoke from wavemaker button?

[SOLVED] Where do application-owned code stubs get generated?

0

If I attach "Javascript" to an event on a Service Variable that is owned by "Page", I can see the code stub generated. However, if I set the owner to "Application" I cannot find the code stub in "Script"

So, is one generated? If so, where?

By contrast, 6.7 had an AppScript tab for such things. I've been unable to find an equivalent in 7.

Help, setting properties in widgets dinamically created in WaveMaker

0

Hi, i need help.

Is there an example where the code have all the properties of Form widgets & Basic widgets ?

Im looking for code like this

parentWidget.createComponent(inName, inType, inProps, inEvents, inChildren, inOwner);

and i found the list of properties but i dont undestand where i need to put the properties or how to use them

this.createComponent("myLabel", "wm.Label");

This code help a little but after "wm.Label" i don't know how to set properties.

I hope you can help me, in return i'm going to share the way to create dinamically widgets in a new post.

Piramidale's picture

wm.List - Copy row displayed content to clipboard with a click (JS-generated contents)

0

Hi all,
my goal is to obtain, on a long press, the copy of the wm.List element text content and let user choose how to share it (ex. email, SMS, ecc.).

I can use "onLongClick" event on wm-List widget to launch a custom function, but i have know how to get the entire row content and copy it to the clipboard.

In the following code i have inserted "?????????" to show the missing code.

share: function(inSender) {
    var Content = this.my_list.selectedItem.?????????;
    window.clipboardData.setData("Text",Content);
},

Thank you!
Jason

kentj's picture

Execute Service Call When Window Unloads

0

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

0

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

0

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

0

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

0

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"

0

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

0

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)

0

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

0

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

0

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

0

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

0

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?

0

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

0

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

0

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.

Camera API

0

I am creating camera API using wavemaker which is working perfectly, but i want to display recently clicked image on the app's interface after clicking that image. The image should come below to the capture button eg; phonegap's capture editable photo button. I want to get recently captured image after clicking on save image or 'OK' option. need help

[SOLVED] Is there an easier way to calculate totals in a column?

0

Hi Guys,

I was wondering is there an easier way to calculate the totals of a column in a dojo grid and populate the result in a label/text field on the page below the dojo grid?

I have looked at and tried the examples in the forums here:

http://dev.wavemaker.com/wiki/bin/PropertyDocumentation/DojoGrid
http://dev.wavemaker.com/forums/?q=node/5522

But they don't work for me and I am not having any luck with any thing Java or JavaScript I have that I link to the add button to update the total.

[SOLVED] Setting one tab field to another tabs field

0

Hey guys,

I come to you with more questions and need some help.

Here is what I have:
I have two tabs in my application. One tab is where the user inputs the data and then clicks save to send all the data to the database to then be processed by a jar file. I also have a second tab where the user can check and edit the data they just entered by inputting the control control sheet number in tab 2s CS Number: field and the tab will gather all data in the database based on the CS Number entered into the application. My question is;
Is there a way I can automate this feature in that

coyote4til7's picture

Display a single record (created automatically) in a LiveForm

0

I need to have one (and only) one record in a table and then have certain users modify that record.

I figured out and coded:
1) Detect that the record doesn't exist
2) Create it

What I haven't figured out is how to display that one record in a form (e.g. the detail portion of a LiveForm) automatically. The standard approach seems to be (in essence) display some representation of the liveVariable behind the form to the user and have them choose.

How do you do the equivalent programmatically?

[SOLVED] Setting Date Field to System date/time with a Button OnClick

0

Hey everyone,

I am sorry I have to come to forum again with what I thought was a simple task but I cant seem to get it to work.

What I need to do is when a user clicks the save button, the last onclick event for that button uses JavaScript to set the date field to the system date. I have tried numerous different code.

set_dateentered: function(inSender)
{
this.date_panel.date_entered = new Date().getTime();
},

I've tried:
this.date_entered.getDate();

var date_entered = new Date();
date_entered.setDate(date_entered.getDate());

manipulate / exchange LiveVariable query

0

Hi there,

I need to somehow edit the query (exchange with a more detailed select statement) of the LiveVariable. I tried out also different ways (JavaServices, HQL), but this options don't give me the necessary features (filtering, updating, performance, ...) of the LiveVariable.

I am trying to code this in the source code of Wavemaker but cannot find a starting point. I also don't understand where and how the query of the LiveVariable is built.

Can somebody point me in the right direction? Thanks anyone for helping!

Is it possible to get the clean open source code of the obfuscated JavaScript libraries?

0

Hi there,

I would like to know if it's possible to get the clean (non-obfuscated, at best with comments) source code of the JavaScript defining Wavemaker front end functionality. I am talking particular about the libaries found in wavemaker\wavemaker-studio\src\main\webapp\lib\wm\compressed. For example the wm_dojo_grid.js.

Or maybe I am looking in the wrong place?

Please somebody help!

[SOLVED] Setting a Field value to be static

0

Hi Guys,

I have a very simple question that I cant seem to get to work and I am not sure what I am doing wrong.
I have one field where the user inputs a number Cs Number. The second field automatically updates to match the first field input and when I click the add button that second fields input gets saved to the database and then the second field is repopulated with the first fields information until the save button at the bottom of the page is clicked and all information is saved to the database.

shekoufa's picture

Is it possible to change the way wm.Lookup filters its values (Matchmode) to 'Anywhere'?

0

Hey guyz,
The problem I have is, the users of my application sometimes need to search through a look up which contains lets say a first name and last name and a national id. Now I want this look up to let the users search from "Anywhere" they want in the String! Let's say I want them to be able to search via First Name or Last Name or even National Id! The current matchmode which apparently is "Start" won't let this functionality! I know that this happens in the client side and it has nothing to do with binding it to a liveVariable or something! Any suggestion would be so much appreciated!

TitlePane dijit

0

I would like to implement the dojo.TitlePane in my app and after looking through the available examples I am still a little fuzzy on the mechanics.

- Placed the dojo.require in the start function of my page

- Placed a dijit.TitlePane in my page, and pointed the dijit.class to dijit.TitlePane and a number of Properties showed up, however no 'title' or 'content' option, so it just looks like an empty panel

- In the function displaying that part of the page insterted the following:
var tp;
dojo.addOnLoad(function() {
tp = new dijit.TitlePane({

Select Menu - show dropdown list

0

Is there a way to show the drop down list of a select menu ondemand using java script? I do not want to use auto-complete.

Syndicate content