All Answers

0 votes
In reply to: Play Audio from Task

Hi Tom,

Test this (sample) :
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

Application.StartTask(() =>
{

//test URL :-P
audio1.SourceURL = "https://il.ilill.li/force/FZAX5pZ80S/";
audio1.Play();
});
}

For more information with multi-threading, you can go there:  https://docs.wisej.com/docs/concepts/background-tasks

Best,

Kevin(ITG)

 

  • Kevin answered Jun 10, 2021 - 7:49 pm
  • last active Oct 2, 2021 - 11:48 pm
0 votes
In reply to: RadioButton Group

Hi Kizameon,

Thank you for the detailed description.

The RadioButton control is supposed to be part of a visible container (Panel/Groupbox) just like in WinForms.

In Wisej, RadioButton controls have the AutoCheck property which Returns or set a value indicating whether the Checked or Checked values and the RadioButton’s appearance are automatically changed when the RadioButton itself is clicked. RadioButton.AutoCheck Property (wisej.com)

The way to get around your issue is to simply set the AutoCheck property to false and with that you can have total control on which radio button to check/uncheck.

You can set your groups by populating the Tag property of the control, but if you’re already using it for other purposes Wisej has the property UserData that you can use to assign your groups. (something like UserData.RadioGroup).

I have attached a sample and used the Tag property to achieve the desired results.

Hope this helps, let me know if you need anything else.

Best wishes,
Alaa

  • Alaa (ITG) answered Jul 26, 2021 - 8:43 pm
  • last active Oct 2, 2021 - 11:46 pm
0 votes

Launch the theme builder and load the theme file to modify or create a new theme. The theme builder is an exe.

This explains most of the styles and properties:

https://docs.wisej.com/theme-builder/

 

  • Luca answered Aug 21, 2021 - 2:32 pm
  • last active Oct 2, 2021 - 11:44 pm
0 votes

Hi,

The behaviour you describe is “by design” – out-of-bounds events raised just before calling Application.Exit() aren’t executed.

Clearing the local storage is an out-of-bounds event, meaning it’s executed asynchronously, after other actions are done. In this case, other actions means Application.Exit(). So by the time Wisej is supposed to clear the local storage, there is no session any longer, so there is nothing for Wisej to do.

Since clearing the local storage is an out-of-bounds event, we can use Application.Update() on a Page or Form. Plesae give this a try

Application.Update(this, () => {
    Application.Browser.LocalStorage.Clear();
});
Application.Exit();

 

Another approach is to execute code in the browser when Application.Exit() is called on the server. Please refer to this thread.

Nevertheless, using session storage is the best approach for temporary storage of information you don’t want to be persistent after the browser/tab is closed.

 

  • Tiago (ITG) answered Jul 18, 2018 - 9:32 am
  • last active Oct 2, 2021 - 11:36 pm
0 votes

 

Ok, but how can I do the reference to my Listview??

I have a Desktop, the listview is called ListV and i have the items, i know the name of the items..

How can I do the reference?

App.Desktop.ListV.itemName.setText(‘xxx’)

Or how do you suggest can i use WebMethod?

 

Thanks

  • michael answered Nov 16, 2016 - 10:05 pm
  • last active Oct 2, 2021 - 11:34 pm
0 votes

You can do both:

HTH

Best,

Luca

 

  • Luca answered Nov 16, 2016 - 6:56 pm
  • last active Oct 2, 2021 - 11:33 pm
0 votes

Wisej works with any authentication scheme supported by the web server and the browser.

If you want to force a secure connection instead use the “secure” property in default.json. Application.IsSecure will return true if the browser is using SSL. You may also navigate to an https:// url programmatically. When the connection is https:// Wisej will also use a secure WebSocket connection with wss://.

 

  • Luca answered Feb 1, 2017 - 3:01 pm
  • last active Oct 2, 2021 - 11:31 pm
0 votes
In reply to: Classic-2 theme added

Actually the themes definition docs are there:

https://docs.wisej.com/theme-builder/

  • Luca answered Jun 21, 2016 - 8:03 pm
  • last active Oct 2, 2021 - 11:27 pm
0 votes

Hi Ser,

The loader shown automatically by Wisej is related to  the response time. It shows when the response takes longer than loaderTimeout: https://docs.wisej.com/docs/concepts/configuration. Wisej never blocks the client and requests/responses are processed in parallel, there is no serial sequence that blocks. Otherwise you wouldn’t be able to resize a window or scroll or operate the web site since Wisej sends multiple small packets back and forth to fulfill the real time web app approach.

Only multiple button clicks processed in PerformClick() are discarded if a second click comes it while the method is still processing.

When you see the loader appearing and then disappearing it means that the first request took longer than the configuration loaderTimeout and then a second request cleared the loader. It usually shows up when a grid asks for data if the query on the server takes long, etc. Ideally it should almost never show.

If you are running a long task it doesn’t mean that the app should block automatically. But if you need to, you can either set the cursor of the page to Cursors.WaitCursor, or you can show a non-modal dialog with the modal mask on, or you can show a progress bar, or just a message, and close when done.

To block the page when showing a non-modal form set ShowModalMask = true.

Remember to call Application.Update() if your process is not returning right away. Otherwise you can execute background tasks using Application.StartTask().

Having said all that :), here is how to show and hide the ajax loader on any component, you can show it for a whole page, a single window, or a single control:

this.Call("showLoader");
Application.Update(this);
// ... long running stuff...
this.Call("hideLoader");

Or, to show it only a button that you clicked:

this.button1.Call("showLoader");
Application.Update(this);
// ... long running stuff...
this.button1.Call("hideLoader");

HTH

Best,

Luca

  • Luca answered Dec 23, 2016 - 8:57 pm
  • last active Oct 2, 2021 - 11:17 pm
0 votes
In reply to: Translation

Yes, all controls in Wisej are localizable.

Open any top-level control (Page or Form or UserControl) in design mode and set the Localizable property to true, then you can select the locale using the Language property. You can also use this free extension for Visual Studio to manage the different languages in a single place: https://marketplace.visualstudio.com/items?itemName=TomEnglert.ResXManager.

More info here: https://docs.wisej.com/docs/concepts/localization

 

  • Luca answered Jan 6, 2017 - 4:38 pm
  • last active Oct 2, 2021 - 11:16 pm
0 votes

Hi Mitch,

It’s EnableNativeContextMenu: https://docs.wisej.com/api/wisej.web/general/control#enablenativecontextmenu

Best,

Luca

  • Luca answered Jan 9, 2017 - 4:17 pm
  • last active Oct 2, 2021 - 11:15 pm
1 vote
In reply to: Basic samples

See answers below:

  1. The WebBrowser control can show any web site that can be shown in an IFrame. The URL you posted has a problem with the CSS, it hides the element when the width is lower than 978px. If you resize the browser while showing your URL it will disappear. It is not related to Wisej, it’s the wrong css on your site. If you set the WebBrowser control wider than 978 you’ll see the element.
  2. With Wisej you can easily add mixin themes and/or use the full power of CSS3. I have attached the updated sample using the StyleSheet extender and Rotation extender. You can also try it here: http://demo.wisej.com/apps/animation. With Wisej there are virtually no limits.
  3. You can find the themes here https://wisej.com/themes and use the ThemeBuilder which lets you also theme a running application: https://docs.wisej.com/theme-builder/.

HTH

  • Luca answered Jan 18, 2017 - 4:21 pm
  • last active Oct 2, 2021 - 11:10 pm
0 votes

Hi Mark,

Thank you for your interest in Wisej. I will setup a small sample for you to use in order to have multiple end points. Will post it later tonight or tomorrow.

Wisej supports multiple endpoints (or subappliactions). It doesn’t support URL with extensions like wx, wgx, gvw or anythins else. It supports “pretty” URL where you don’t have to write Default.html or MyApp.html or Accounting.html and instead write /MyApp or /Accounting. Each URL corresponds to 1 page only (SPA, as I have already mentioned).

The page can be empty or contain any HTML you like. It doesn’t have anything to do with the application – it’s used as the “canvas” where the widgets are created. This is how all Single Page Application (SPA) systems work.

If you are looking to a system similar to ASP.NET, PHP, MVC, JSP, … where each page can be loaded independently, Wisej is not the right framework.

In general, please keep in mind the following points the using Wisej:

  • Wisej is designed and built for Web Applications (mostly Line of Business apps), not web sites. There are very many frameworks for web sites and hybrids, but virtually nothing for web applications and specifically for Real Time Web Applications.
  • When you use sub-applications, each different URL starts a different session.
  • You can control the content of the SPA using the URL’s hash, a common technique among SPAs. See the deep linking example.

HTH

Best,

Luca

  • Luca answered Jan 23, 2017 - 7:09 pm
  • last active Oct 2, 2021 - 11:08 pm
0 votes

It’s the same as any html app. You can use the viewport meta in Default.html.

See:

https://wisej.com/support/question/custom-http-headers

https://wisej.com/support/question/software-developer

http://www.w3schools.com/css/css_rwd_viewport.asp

You can detect the device (or change of orientation or change of size) at runtime using the ResponsiveProfileChanged notification and the ActiveProfile property:

https://docs.wisej.com/api/wisej.web/general/application#activeprofile

https://docs.wisej.com/api/wisej.core/general/wisej.core.clientprofile

You can define your own profiles putting a custom ClientProfile.json file in your app (see the built-in one firs, linked below in one of the posts):

https://wisej.com/support/question/mobile-project

https://wisej.com/support/question/responsive

 

HTH

Best,

Luca

 

 

  • Luca answered Jan 24, 2017 - 8:11 pm
  • last active Oct 2, 2021 - 11:06 pm
0 votes

Hi Kay,

you usually force browser authentication in your web server.

IsAuthenticated reflects the status of that authentication.

Find more information here: https://docs.wisej.com/docs/concepts/security#authentication

Best regards
Frank

  • Frank (ITG) answered Feb 1, 2017 - 3:02 pm
  • last active Oct 2, 2021 - 11:04 pm
0 votes

I just tried setting Fill to a column and it works well. The FillWeight  property lets you decide the distribution of the remaining space in case there are more than one column with the Fill mode set.

Columns set to Fill fill the remaining space. It’s usually used on the last column to fill the grid.

 

  • Luca answered Feb 3, 2017 - 12:04 am
  • last active Oct 2, 2021 - 10:48 pm
0 votes

With Wisej you don’t have all the limitations of ASP.NET request/response model. You can use anything you like to provide feedback: progress bar, status bar, alert box, labels, text, anything. No need to block the screen (unless you want to) with wait forms.

The little spinning icon you see when a request takes long kicks in only for “in-bound” requests. Those are the requests initiated by the browser using because of a user action: click, resize, close, etc. Wisej expects the server to reply within a certain amount of time before showing the spinning icon and another amount of time before declaring a timeout.

https://docs.wisej.com/docs/concepts/configuration

Look for responseTimeout and loaderTimeout. You can set loaderTimeout high enough so that it doesn’t show. However, a much better approach is to start long running tasks on their own and return immediately from the request. This way the spinning icon will never show for background tasks.

Under samples, try the BackgroundTasks sample. It starts three tasks and you never get the spinning icon while the screen is updated. You can also try the sample I attached to this post https://wisej.com/support/question/adding-controls-at-runtime

It’s simple:

Application.StartTask(() => {

// do whatever

Application.Update(this); // This updates any change to any control in the browser.

});

This way, while your task runs, you can show a progress bar, or nothing, or update some text. There are no limits and certainly your are not forced to use a WaitForm.

HTH

Best,

Luca

  • Luca answered Feb 3, 2017 - 3:34 pm
  • last active Oct 2, 2021 - 10:45 pm
0 votes

Hi Tung,

The session is always null in a new thread unless Wisej has a chance to restore it. See this thread: https://wisej.com/support/question/updating-ui-elements-from-other-threads

You can restore the session on any thread in several ways:

1- Use Application.StartTask(()=>{ …code in context…});

2-Use Application.RunInContext(this, ()=>{… code in context..}); You need “this” to be a component (control, page, window, etc.)

The best way is no. 1. See the BackgroundTasks example in the examples section and see the background tasks help section: https://docs.wisej.com/docs/concepts/background-tasks.

Best,

Luca

  • Luca answered Feb 8, 2017 - 3:58 pm
  • last active Oct 2, 2021 - 10:45 pm
0 votes
In reply to: ReadOnly property

Hi Alex,

See answers below:

  1. Styles are converted to css classes using predefined “decorator” classes in qooxdoo and wisej. https://docs.wisej.com/theme-builder/theme-elements/styles The values in the styles become css properties in css classes built using a combination of appearance key and states. Properties instead map directly to properties in each widget and are unlimited – a widget can define any property as themeable and you can change (override) the value of a property programmatically. For example, we have backgroundColor as a style and as a property.
  2. States are arbitrary names defined by each widget. Some are common, like “disabled”, others may be used only by a specific widget. You can add any state to widget using “this.addState(‘readonly’)” or “this.removeState(‘readonly’)”. As soon as addState or removeState are called, the widget is scheduled for a UI update and will automatically update its rendering based on the values coming from the theme.
  3. TabPage.Visible returns whether the page visible (selected, or active). That’s why we added Hidden. The Enabled property on the TabPage works as it disables the content of the TabPage but it doesn’t change the style of the header (button) and lets you click (select) the page, otherwise the users wouldn’t know what is disabled. You can prevent a tab from being selected using the events on the TabControl.
  4. The tool buttons don’t inherit the Enabled property – I may have a disabled TextBox and an enabled tool button that allows the user to do something that enables the textbox, or similar scenarios.

HTH

Best,

Luca

 

  • Luca answered Feb 8, 2017 - 4:07 pm
  • last active Oct 2, 2021 - 10:44 pm
0 votes

Yes, the designer will show the theme defined in Web.config by default. See https://docs.wisej.com/docs/concepts/configuration

It will also automatically add to the list any additional theme in the /Themes folder.

  • Luca answered Feb 15, 2017 - 4:10 pm
  • last active Oct 2, 2021 - 10:42 pm
Showing 3241 - 3260 of 11k results