All Answers

0 votes

Hi Luca,

Hidden upload control now works with your modified code. However, still no luck if I insert “this.uploadButton.__upload.value = “”;” for duplicate upload. I get “Invalid or unexpected token” message”.

Thanks.

  • Cris answered Aug 23, 2016 - 4:26 pm
0 votes

Found the issue. It is fixed in the current dev build.

The upload widget hooks the inner upload element when the widget is rendered (the dom element is created) the first time. When it’s not visible, even if created as a widget, the dom is not created and there is no upload element to use.

You can workaround this in your build by setting upload1.Visible = true add this.uploadButons.setOpacity(0) to make it invisible.

this.button1.Eval(
 String.Format(@"
     this.uploadButton = Wisej.Core.getComponent(""id_{0}"");
     this.uploadButton.setOpacity(0);

     this.addListener(""execute"", function(e)
     {{
        this.uploadButton.upload();
     }});", this.upload1.Handle));

 

It should work like this – except the duplicate upload. If you want to workaround the duplicate upload issue, change the handler like this:

 

this.addListener(""execute"", function(e)
     {{
        this.uploadButton.__upload.value = "";
        this.uploadButton.upload();

 }});", this.upload1.Handle));

Both issues are fixed in the current build coming up.

  • Luca answered Aug 22, 2016 - 9:01 pm
  • last active Aug 22, 2016 - 9:01 pm
0 votes

Hi Luca,

Thanks but it doesn’t work either.

Your test project uses the second option you posted here but mine uses the javascript in a button. Also, my code explicitly specify the location where the uploaded file should be saved in. In your code, what is the default location of the uploaded file?

  • Cris answered Aug 22, 2016 - 8:37 pm
0 votes

Attached. Let me know if it doesn’t work for you and I will send you a link to the latest wisej dlls in case there is something new that fixed something else…

  • Luca answered Aug 22, 2016 - 8:16 pm
  • last active Aug 22, 2016 - 8:16 pm
0 votes

Hi Luca,

I don’t get any error message even in IE 11 now. But in Chrome, after the form showed up, there is an error in Developer Tool like:

“Failed to load resource: net::ERR_CONNECTION_REFUSED”. I don’t know what that is.

Would you mind sending me or post your test project so I have something to compare with.

Thanks.

  • Cris answered Aug 22, 2016 - 8:08 pm
0 votes

Should be. Same error? When I tried here it worked – except for the duplicated upload.

  • Luca answered Aug 22, 2016 - 7:37 pm
0 votes
In reply to: ASP.NET Wrapper

We have the Wisej.Web.AspNetPanel control. However it’s not fully completed – at the moment it needs the URL of the user control or page. It will be enhanced to cover all the VWG functionality.

  • Luca answered Aug 22, 2016 - 7:33 pm
0 votes
In reply to: HtmlBox

You can use the Wisej.Web.LinkLabel (non scrollable) control or the Wisej.Web.HtmlPanel control (scrollable).

The HtmlPanel can display a file or html text. However at the moment it doesn’t wire clicks back to the server. I have logged enhancement WJ-7500.

 

  • Luca answered Aug 22, 2016 - 7:32 pm
0 votes

Hi Luca,

Thanks for immediate response. I put the code in Load event but still nothing happens. It is supposed to display the Open dialog window to select the file to be uploaded. Here is the code:

protected override void OnLoad(EventArgs e)
{
this.upload1.Visible = false;
this.upload1.CreateControl();
base.OnLoad(e);
}

Am I on the right spot?

Regards.

 

  • Cris answered Aug 22, 2016 - 7:23 pm
0 votes

Hi Cris,

This is probably caused by the latest optimization: controls are sent to the client only after they are shown the first time. This optimization has increased the rendering speed a lot especially when a form has multiple complex tab pages or panels that are shown at different times. You need to ensure that the invisible control is created using this.upload.CreateControl();

The other issue about not sending the same file twice is WJ-7499. It’s the upload element that needs to be reset to “”.

Best,

Luca

 

  • Luca answered Aug 22, 2016 - 6:58 pm
0 votes

Tonight or tomorrow.

  • Luca answered Aug 22, 2016 - 4:49 pm
0 votes

Thanks Luca!  The solution is much appreciated and making it even simpler is always a bonus. 🙂

Any idea on ETA for that update? I can always work with Context and then remove it later if it’s not in the immediate future.

  • Chris answered Aug 22, 2016 - 4:43 pm
0 votes

Thank you. WJ-7498. Looks like a regression. Will most likely be fixed in the upcoming update.

  • Luca answered Aug 22, 2016 - 4:24 pm
0 votes

Chris, I’m following up on this to tell you that the all Application.Context, Using, etc. will be removed in the next update and Application.Update() will work without all that. It’s a lot simpler…

Best,

Luca

  • Luca answered Aug 22, 2016 - 3:29 pm
0 votes
In reply to: Dont work Buble

It’s a regression. I have attached the precompiled Wisej.Web.Ext.Bubble. Also the source code for the extension has been updated.

HTH

Best,

Luca

 

 

  • Luca answered Aug 22, 2016 - 2:26 pm
1 vote

Hi Chris,

I attached the modified ChatWindow.vb. Look for ‘ Wisej: comments.

In short, you simply need to restore the context when you want to update the client from an out-of-bound event. That is a thread that was not started by a client event therefore not knowing anything about the session and websocket connection. Once the context is restored you can update anything on the client.

We use the “using” pattern to ensure that the thread is “cleared” when the context is not needed. It’s not necessary, but it’s good practice since Wisej internally uses [ThreadStatic] context field in order to minimize lookups.

Best,

Luca

 

  • Luca answered Aug 21, 2016 - 5:49 pm
  • last active Aug 21, 2016 - 5:49 pm
0 votes
In reply to: Open a page in panel

Hi Birol,

Sorry for the delay. I tried the sample and I see what you mean. The Wisej.Web.Page is a top level control and cannot be used a child of another control. The reason is that when you make a page visible using page1.Show() it automatically becomes the main page: Application.MainPage. That’s how you can navigate different pages in Wisej.

We have three types of top level controls: Page, Desktop and Form. The Page is always top level and always only one active at any given time. Forms are always on top of the active Page, if any. The Desktop can be top level, like a page, or it can be embedded in a page. Forms appear inside the active Desktop, if any. Forms can float or can be children, like a panel, if you set the TopLevel property to false.

In y our case, I tried your sample and it’s easy to make it work. I just changed the base class to UserControl:

public partial class Page2 : UserControl

Once you do that the sample works well.

I attached the modified file.

I also noticed that you just add the page to the panel without setting the location and size and it overflows to the right. You can dock it, anchor it, set the size within the parent panel.

Best,

Luca

 

 

  • Luca answered Aug 19, 2016 - 3:19 am
  • last active Aug 19, 2016 - 3:20 am
0 votes

Thanks Luca, a sample would be great.

Have a good weekend
Regards Rudy

  • Rudy answered Aug 18, 2016 - 11:19 pm
0 votes

Hey Luca,

A static instance firing events. Attached is a zip of the WiseJ test app in VB I’ve been working on.  It’s basically just a Window with an HTML box on it to display messages at this point.

On Form Load, it creates an instance of IrcDotNet client connection, which connects to the specified server (in the test app it’s Ustream’s IRC server.) On ClientRegistered, handlers are added for the user-specific events (mode/away/channel join/etc.), and it joins the user to the channel specified in the web.config. The channel join creates a ChatChannel object and attaches handlers for various channel-specific events such as receiving nick list changes.

Normally these would update the nick list grid, add labels for different channels, etc. but thus far I’ve kept it just to seeing if I can get the client to update with the any new messages in the HTML box so most of that is commented out.  I was hoping it would be as simple as tossing Application.Update in the AddMsgtoChannel sub, but that doesn’t seem to do anything. (Edit: I also tried just using a regular label to make sure it didn’t have to do with the HTML box itself.)

Thanks,
Chris

  • Chris answered Aug 18, 2016 - 10:55 pm
  • last active Aug 18, 2016 - 10:56 pm
0 votes

Hi Chris,

Is the irc service a static instance firing events, or does it take a list of subscriptions?

Can you send a sample app, wisej or vwg.

Best,

Luca

  • Luca answered Aug 18, 2016 - 9:27 pm
Showing 10761 - 10780 of 11k results