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)
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
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/
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.
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
You can do both:
HTH
Best,
Luca
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://.
Actually the themes definition docs are there:
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
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
Hi Mitch,
It’s EnableNativeContextMenu: https://docs.wisej.com/api/wisej.web/general/control#enablenativecontextmenu
Best,
Luca
See answers below:
HTH
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:
HTH
Best,
Luca
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
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
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.
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
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
Hi Alex,
See answers below:
HTH
Best,
Luca
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.
