DatePickerEditor is not working in Eclipse

<oXygen/> general issues.
dmanineelu
Posts: 6
Joined: Fri May 23, 2014 6:18 pm

DatePickerEditor is not working in Eclipse

Post by dmanineelu » Fri May 23, 2014 6:37 pm

Hello,

I am extending OOB ro.sync.ecss.component.editor.DatePickerEditor class to have custom "commitValue" function which splits the date and stores day,month,year seperately. No UI changes are done in the class.

It works smoothly in Standalone Client but in Eclipse it renders properly but datepicker does not popsup on clicking. Am I doing anything wrong ?

my css Looks like following

Code: Select all


content:      
oxy_editor(
rendererClassName, "DatePickerEditorExt",
swingEditorClassName, "DatePickerEditorExt",
swtEditorClassName, "DatePickerEditorExt",
columns, 16,
edit, "@otherprops"
format, "yyyy-MM-dd" )
I tried even with OOB class Names ( see below) instead of my customization class name but still no success

Code: Select all


content:      
oxy_editor(
rendererClassName, "ro.sync.ecss.component.editor.DatePickerEditor",
swingEditorClassName, "ro.sync.ecss.component.editor.DatePickerEditor",
swtEditorClassName, "ro.sync.ecss.component.editor.DatePickerEditor",
columns, 16,
edit, "@otherprops"
format, "yyyy-MM-dd")
Thank you in Advance,
Mani

alex_jitianu
Posts: 781
Joined: Wed Nov 16, 2005 11:11 am

Re: DatePickerEditor is not working in Eclipse

Post by alex_jitianu » Mon May 26, 2014 12:25 pm

Hi Mani,

The same SWING-based implementation is used to render a form control both in Standalone and Eclipse (that's why there is only one property rendererClassName). For the editing part, the implementations are different:
- a SWING-based implementation for Standalone(property swingEditorClassName) and
- a SWT based one (swtEditorClassName) for the Eclipse plugin.

From the CSS rules I'm under the impression that you have only one (SWING-based) extension. That's why the rendering works but the editing doesn't. You should probably extend com.oxygenxml.editor.editors.author.editor.DatePickerEditorSWT and give that implementation as the editor for SWT:

Code: Select all

content:     
oxy_editor(
rendererClassName, "DatePickerEditorExt",
swingEditorClassName, "DatePickerEditorExt",
swtEditorClassName, "DatePickerEditorExtSWT",
columns, 16,
edit, "@otherprops"
format, "yyyy-MM-dd" )
Please let me know if that was indeed the problem or we should look further on for other possible causes.

Best regards,
Alex

dmanineelu
Posts: 6
Joined: Fri May 23, 2014 6:18 pm

Re: DatePickerEditor is not working in Eclipse

Post by dmanineelu » Mon May 26, 2014 4:10 pm

Hello Alex,

Thank you for the Feedback.
Where can I find class ro.sync.ecss.component.editor.DatePickerEditorSWT ?

I could not find it in Version 15.2 and 16.0 distributions.

Thanks,
Regards,
Mani

alex_jitianu
Posts: 781
Joined: Wed Nov 16, 2005 11:11 am

Re: DatePickerEditor is not working in Eclipse

Post by alex_jitianu » Mon May 26, 2014 5:03 pm

Hi,

Apparently the built-in form controls for SWT are not included inside the SDK oxygen.jar. I think we did that to keep the size of the jar as small as possible. I've sent you an email with the source code DatePickerEditorSWT.

Best regards,
Alex

dmanineelu
Posts: 6
Joined: Fri May 23, 2014 6:18 pm

Re: DatePickerEditor is not working in Eclipse

Post by dmanineelu » Tue May 27, 2014 10:34 am

Hi Alex,

Thank you for the code. Unfortunately I could not compile it because following classes are missing.

Code: Select all

import ro.sync.ecss.component.editor.DatePickerEditorUtil;
import ro.sync.exml.EXMLResourceBoundle;
import ro.sync.exml.MessageBundle;
import ro.sync.exml.Tags;
import com.oxygenxml.editor.swtutil.LinkLabel;
We are using Version 15.2 standalone Installation.

Is there any possibility to have Oxygen.jar which includes all classes ?

thanks

alex_jitianu
Posts: 781
Joined: Wed Nov 16, 2005 11:11 am

Re: DatePickerEditor is not working in Eclipse

Post by alex_jitianu » Tue May 27, 2014 11:01 am

Hi,
import ro.sync.exml.EXMLResourceBoundle;
import ro.sync.exml.MessageBundle;
import ro.sync.exml.Tags;
These classes are not public API. They are used for localizations so just use the plain text instead. I'll try and send you the source code again, this time without these dependencies.

Best regards,
Alex

dmanineelu
Posts: 6
Joined: Fri May 23, 2014 6:18 pm

Re: DatePickerEditor is not working in Eclipse

Post by dmanineelu » Tue May 27, 2014 5:01 pm

Hi Alex,

Thank you , it works :D

Post Reply