All Answers

0 votes

I suppose you could create a custom user control where you can set the colors and text of a label set to autosize and dynamically add them to a flowlayout panel. If you don’t need custom control – you may just be able to just add standard labels to the FlowLayoutPanel.

0 votes

Hi Bernhard,

thanks we logged this issue as WJ-8664, fixed it and are currently testing it.
It will be included in the next Wisej release and we´ll inform you when it´s available.

Best regards
Frank

0 votes

Hi Eric, I’m not sure I fully understand. See below in case it helps:

  • getBody(), etc. on a ckeditor cannot work. Those methods are exposed by the iFrame widget in wisej.
  • iframe.getWindow().TextField1 works only if the input field has an ID (I had modified the html in the zip attached to my previous reply).
  • I tried the TEST_IFramePanel (modified) with FireFox and it works fine, you have to make sure to use the modified html with the id in the <input> field.
  • My FF shows the getBody(), etc. methods in intellisense too. Sometimes the browsers overrides what it “deducted” according to what you type.
  • “this” in Eval is the widget calling the Eval or Call methods.
  • You can call any method available to the CKEditor using “this.editor.{methods}”. Some functionality is wrapped in the widget so “this.getText()” is the same as “this.editor.getData()”. When “this” is the CKEditor instance.
  • The function getFieldValues() was added to the html document in my zip.
  • The CKEditor object (not the wisej widget) exposes “window” and “document” as objects. See https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.editor
  • You can access the inner iframe document managed by the CKEditor using this.editor.document.$;
  • Looks weird by the CKEditor adds the $ as the native element. So to get a field you need to do this: this.editor.document.$.getElementById(“field2”).value. You can’t address the field using the ID (as I did in my previous modification) because the content in the editable iframe is “editable” so it’s not handled by the browser as normal content (which is why you can check the checkbox). The elements have the “contenteditable” attribute on.

That’s  the way CKEditor works. Once you reach the inner deep iframe then you can use “normal” javascript on the elements, but the elements in the editor are editable and different from rendered elements.

Are you trying to create a form in a CKEditor and read the content of the fields in the form while it’s being edited in the CKEditor?

Can you send me a specific sample that shows exactly what you need to achieve?

HTH

 

  • Luca answered Jan 18, 2018 - 9:27 pm
0 votes

Hi Orel,

thanks we could reproduce. Will be fixed in the next release.

Best regards
Frank

0 votes

Hi Orel,

I could not reproduce with the latest Blue-3 theme. Does it happen for you with all themes ?
Can you please try after updating the Blue-3 theme from here:

https://wisej.com/themes/

Thanks in advance.

Best regards
Frank

0 votes

Hi,

I have tried to reproduce but failed so far. Can you please share some more details or test code that could help us to track it down ?
You´re talking about nested forms, each opened with ShowDialog(), right ?

Thanks in advance !

Best regards
Frank

0 votes

Hi Orel,

ListView colors can be changed with a theme mixin. The mixin in the support thread you linked was missing

“inherit”: “listview”,

I have attached a working mixin that you can use to set the row colors.

For Header Colors we will add ColumnHeader.BackColor and ColumnHeader.ForeColor to ListViews.
Logged as enhancement WJ-8663, will be included in next Wisej release.

Best regards
Frank

0 votes

BTW, marking a static variable as ThreadStatic isn’t an option. I did the test and although different browsers on different computers were showing different session IDs, sometimes the ThreadStatic static variable was showing the same value.

As Scott Hanselman puts it, in ASP.NET you don’t control the thread life…you inherit a worker thread.

0 votes

Hi Luca,

It doesn’t work as expected.

The only case of returned Data is when using “this.myIFrame1.getBody().innerHTML“, but it doesn’t contain the user modified data. only the initially loaded  text.(See TEST_IFramePanel2.png).

Your proposed solutions to not use the callback is far easier to understand and implement 🙂 Because it wasn’t working for the IFrame, I did the same changes with Franck’s code. For the ckEditor it works when using Eval(“this.Save2Disk(App.Window1.ckEditor1.getText())”);

Using Eval(“this.Save2Disk(this.editor.getData())”); generates error “this.editor is undefined”. Neither this.ckeditor1, this.myckeditor1 is recognized.

With the working sample, I discovered that in the ckeditor, changing the inputbox needs a double-click + filling presented form, and also that comobox and checkbox can’t be changed, but that’s another story than what we track here.

Running through IIS express doesn’t behave the same as IIS deployment -> all test done by deploying.

What I can’t understand is the fact that when debugging in firefox(F12), the intellisense isn’t showing getBody as an option for this.myIFrame1, but “this.myIFrame1.getBody().innerHTML” is working through the code ??? (See TEST_IFramePanel4.png)

The same with Franck’s code, using the callback method, “this.__GetPlainTextCallback(this.editor.getData(),…. is accepted but without callback “this.editor is undefined”.

To me it means that “this.” isn’t the same object, but which one is which and how to differentiate ?

Sorry to come back with this, I was really trusting you had the solution.

0 votes

I’m aware that nobody can control the client.

 

“what we can do is stop the server side from accepting the change from the client when the control is disabled or read-only.”

Perfect. Thats what I was looking for.

0 votes

Thanks Marian.

We logged that issue as WJ-8662 and this fix will be included in the next Wisej build.

Best regards
Frank

0 votes

See attached changes. You don’t need the callback system. We use it for async calls on the client when the javascript cannot callback the server with WebMethods.

All you need it this:

Eval(“this.Save2Disk(this.myIFrame1.getBody().innerHTML)”);
Eval(“this.Save2Disk(this.myIFrame1.getWindow().TextField1.value)”);
Eval(“this.SaveArray2Disk(this.myIFrame1.getWindow().getFormValues())”);

I added 3 options:

1: gets the HTML of the entire body.

2: gets the value of TextField1

3: calls a js function in Form_Document.html that returns an array of strings.

The iframe widgets exposes getBody(), getDocument() and getWindow(). The body is the body element in the iframe. The document is the document object and window is the navigator window where all the global functions reside.

HTH

 

 

  • Luca answered Jan 17, 2018 - 10:48 pm
0 votes

Hi Luca,

After having hacked Franck’s Sample (https://wisej.com/support/question/ckeditor-control-how-to-get-plain-text-from-control), but I’m still stucked.

Franck’s code is implementing your proposal for a CKEditor, and I can get the FORM (using Input fields) modified content, but in my IFrame version neither this.getBody() or App.Window1.myIFrame1.getBody() does work.

Also tried to keep the working ckeditor project and added a javascript CSS component to hide the cke_top element. (Prohibit the end user to modify the Form layout).

By the way in Franck’s code (for the ckEditor), to get also the Form input fields, I had to change from :

Eval(“this.__GetPlainTextCallback(this.editor.document.getBody().getText(), ” + callback.GetHashCode() + “)”);

to be :

Eval(“this.__GetPlainTextCallback(this.editor.getData(), ” + callback.GetHashCode() + “)”);
//Or this one does the same
//Eval(“this.__GetPlainTextCallback(App.Window1.ckEditor1.getText(), ” + callback.GetHashCode() + “)”);

I have attached an Iframe Zipped version and a screenshot of the CSS

Can you help ?

Thanks.

0 votes

For example an ID 0,1,2,3 in the Value Member while the list just contains descriptions. I guess I can manually load a datatable and bind it to the combo ?

0 votes

Since it’s impossible to stop a tech user to change anything he likes on the browser (and console can’t be blocked – go to facebook, open console and type alert(1) ) what we can do is stop the server side from accepting the change from the client when the control is disabled or read-only.

  • Tiago (ITG) answered Jan 16, 2018 - 4:59 pm
  • last active Jan 17, 2018 - 1:03 pm
0 votes

Hi Edmond,

not sure I understand your question. Are you referring to the ValueMember property ?
What would you want to assign it to, when the ComboBox is not bound ?

If you just want to edit the Items in the Combobox, they are available via the Items property.

Hope that helps.

Best regards
Frank

1 vote

Hi Edmond,

there is a property ShowInVisibilityMenu that you can set to false to exclude columns from the column selector.

Best regards
Frank

0 votes

The pictureBox in the sample is set to Dock.Fill and to PictureBoxSizeMode.AutoSize. AutoSize means that the control will change its size to fit the image. Dock.Fill means that the control will resize to fill the parent. The two settings obviously clash and cause the repeated resizing.

You can set SizeMode to anything other than AutoSize. The fix will simply ignore the AutoSize value when docked or anchored.

  • Luca answered Jan 16, 2018 - 10:54 pm
0 votes

I can reproduce with IE. With Chrome for me it takes about 2-3 seconds. The problem is that it’s many nodes, each node has a child too so it’s over 3,000 widgets. We use the regular Tree widget because it’s the most flexible for rendering.

There is an alternative options for the client widget for the TreeView, the ComboBox and the ListBox to use the virtual renderers in qooxdoo. They work in a way similar to the DataGridView and create the html elements only for the visible view so instead of 15,000 dom elements (3,000 x 5 elements each) they create few hundreds. The grid is able to display unlimited rows.

I can send you a sample next week.

 

  • Luca answered Jan 16, 2018 - 10:46 pm
0 votes

You can unregister the native (which is the browser’s console) logger altogether in Wisej.onLoad() in your main html page.

<script>

Wisej.onLoad = function() {

qx.log.Logger.unregister(qx.log.appender.Native);

}

</script>

This will disable all logging to the native console. You may also register a custom logger in the same way.

http://www.qooxdoo.org/current/api/#qx.log.appender

 

 

  • Luca answered Jan 16, 2018 - 10:38 pm
Showing 7921 - 7940 of 11k results