[jira] Created: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
----------------------------------------------------------------------------

                 Key: OFBIZ-1648
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
            Reporter: Adrian Crum
            Priority: Minor


Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1648:
-------------------------------

    Attachment: widget_improvements.patch

The attached patch might look like a major refactoring, but it's not. I made a few simple changes, but those changes affected a lot of files.

My goal is to make the screen widgets more flexible and more easily extended and enhanced. So, I made the following changes:

Model Widgets
-------------
1. Have the model widget base class (ModelWidget.java) implement a basic interface (WidgetModel.java) so that the interface can be passed around instead of a reference to the concrete class.

2. Added the generic renderWidgetString(Writer writer, Map<String, Object> context, WidgetStringRenderer stringRenderer) method to each model class and mapped their existing render methods to it. The problem with the existing model widgets is they each have their own method name for the rendering function, and those methods threw different exceptions. That makes it impossible to interact with the various model widgets in a generic way. This change fixes that.

The WidgetStringRenderer argument is a generic interface that each widget rendering interface extends from. Model widgets cast the WidgetStringRenderer argument into the appropriate interface for their use.

3. Added get/set methods for model widget subwidgets. This hasn't been fully implemented. The basic idea is to have the capability for container widgets to query subwidgets - even in contained screens, etc.

4. Added a static factory method to ModelWidget for creating rendering class instances. This lays the groundwork for 3rd party rendering libraries. The method looks up the rendering class type in widgetRenderingClasses.properties, and creates an instance of the specified class.

One of the things I hope to avoid in adding support for 3rd party rendering libraries is having us paint ourselves into a corner. Right now the patch is set up to use the existing HtmlXxxRenderer classes. If someone wanted to add Dojo support for instance, they can write the classes for it and update widgetRenderingClasses.properties to use the new classes. If years later the support for Dojo drops off, all we have to do is revert the widgetRenderingClasses.properties file back to the original HtmlXxxxRenderer classes.

5. Cleaned up some compiler warnings.

HTML Rendering Classes
----------------------
Added a generic interface (WidgetStringRenderer.java) that all of the rendering interfaces extend from.

--------------

If you apply this patch and run OFBiz, nothing should happen differently. All functionality has remained the same.

This patch is a rough draft. I'll wait for comments/suggestions, then I'll clean it up and commit it if there are no objections.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569589#action_12569589 ]

Adrian Crum commented on OFBIZ-1648:
------------------------------------

Just so there are no misunderstandings about the intent of this change...

This is something I started working on a long time ago. The work I did adding widget boundary comments was a lot harder than it should have been - due to the existing screen widget architecture. Adding the new screenlet widget was also harder than it should have been. So, the intent of this patch is to open things up so that future enhancements to the screen widget library will be easier.

While I was working on this code, the subject of 3rd party rendering libraries came up, so I added in the factory method while I was at it. That part of the patch is not necessary for the initial intent of the patch. I can remove it if there are objections. I would prefer to commit it though, because I'm sure it will be needed in the future. If I'm proven wrong, it can be easily removed.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569638#action_12569638 ]

David E. Jones commented on OFBIZ-1648:
---------------------------------------

Could we back up a little on this? The main question is: what is the problem you are trying to fix or the improvement you are trying to effect?

You mentioned the stuff you did "was a lot harder than it should have been", but in what way, and how would these or other changes make those easier?

For example, using interfaces doesn't help if you don't want to substitute the classes underneath. Why would we want to do that with ModelWidget? I haven't reviewed this code for a while, but 'm not sure I even like the idea of the ModelWidget class that the ModelForm, ModelScreen, etc extend from... or the way the boundary comment stuff is implemented. It is possible to be too fancy with genericizing things and get in your own way. In other words, object oriented techniques of polymorphism and such can be wonderful, but sometimes a direct approach is better and more flexible.

Whatever the case, the big point of most of the framework code in OFBiz is that it support the higher level artifacts and do so in a stable, predictable way so that the tools can be used with confidence and such. Sometimes too many indirect approaches can actually make things more complex without adding any benefit, thereby making things more error prone.

Please don't get me wrong, it's wonderful to see effort going into this code. For the best experience with all of this I would recommend picking a direction and making sure it's the right one before charting a course to it.

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569724#action_12569724 ]

Adrian Crum commented on OFBIZ-1648:
------------------------------------

David,

Thank you for taking the time to look at this.

The problems I've had in the past all boil down to the fact that the various widgets did not derive from a common class, so it is difficult to add functionality to the widget library as a whole without having to write a lot of redundant code.

Why would I want to write four or five versions of the boundary comment code - one for each widget? It is far simpler to write it once in the base class.

The problem I have with the widgets right now is that the new screenlet widget can't interoperate with any widgets that aren't direct descendants of the screenlet widget. In other words, it can do things with its own subelements, but not subelements contained within its subelements. This patch (once completed) will fix that.

I don't see how a "direct" approach would be better than simple OOP code. I'm not sure I know what a "direct" approach is.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569735#action_12569735 ]

Jacques Le Roux commented on OFBIZ-1648:
----------------------------------------

David, Adrian,

I don't know much about widget code, but it seems rational to me to propose a common class for them. And even common sub-classes, etc.

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570087#action_12570087 ]

Adrian Crum commented on OFBIZ-1648:
------------------------------------

Jacques & David,

I think I understand David's remark about the widget boundary comments. My approach was to put the boundary comments in the base class so that ALL widgets have the potential of generating boundary comments. Each widget enables its own boundary comments by calling a method in the base class. I did things this way because it wasn't clear at the time which widgets the developer community wanted to generate comments. I picked a handful that seemed relevant and waited for feedback. So far no one has complained.

When I created the ModelWidget base class, I was also looking forward to future requirements. Not too long ago, Anil requested that all widgets support the ID attribute (which 3rd party rendering libraries use heavily). Having all widgets extend a base class makes that easy to do.

As far as implementing the interfaces is concerned, it doesn't actually solve a problem. Instead, it gives widget designers more options. One of the things I've learned in two decades of working with application frameworks is you want to give users of the framework plenty of options. With this patch, if a developer wants to create a new screen widget, all they have to do is extend it from the base ModelWidget class. If the developer finds the base ModelWidget class too restricting they can write a class from scratch that implements the WidgetModel interface. The bottom line is, the developer has options and isn't locked into a preconceived way of how things should be done. On this issue, David and I probably have a difference in design philosophy.

I'm going to drop the factory method code. It's too soon for it, and I'd rather get the other aspects of the (forthcoming) patch committed, than have the whole thing stalled because of a minor issue.

I appreciate David's review and remarks. Perhaps I tried to include too much in a single patch, and that caused concern.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570104#action_12570104 ]

David E. Jones commented on OFBIZ-1648:
---------------------------------------

As far as that design philosophy goes, you're right. We disagree there.

Interfaces and base classes (along with many many other things) are easy to add when they are needed. This is the general philosophy behind refactoring. Keep things simple and implement for the clear requirements you have at the time. The nice thing about code is that it is easy to change... well, it is easy to change if one keeps the code as simple as possible in order to avoid the need for excessive refactoring effort later on.

The problem with speculative coding is that it is too easy to go in the wrong direction. Most of the OFBiz framework was written to replace things that were developed with lower level tools dozens of times before the higher level tool was written. The ones that were not created this way show and have generally more issues than others. Certain parts of the Menu Widget are examples of this, but far from the only ones.



> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570133#action_12570133 ]

Jacques Le Roux commented on OFBIZ-1648:
----------------------------------------

Adrian, David,

I must admit that David's argument (and experience here as well) makes sense too. I like much KISS philosophy too... Also : I did not review the patch yet

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571314#action_12571314 ]

WeizhanGuo commented on OFBIZ-1648:
-----------------------------------

Hi Adrian
I'm also seeking the way to integrate the dojo, my solution is not change the ModelWidget, but create the DojoFormRenderer to implements FormStringRenderer, and have a factory class like you to create the FormStringRenderer instance according the properties file, the code when need a FormStringRenderer instance it will like this: formStringRenderer = HtmlFormRendererFactory.getHtmlFormRenderer(request, response); now it can work with the form widget, I will try this to table and athers widget in this way.   We don't need to change the old code too much, but add some render classes.  if you have better way please let me know thanks.  may be we can figure out what we want to do and how to do, and can finish it together.

I also agree with David's argument, we don't create the interface until we have to.

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571319#action_12571319 ]

WeizhanGuo commented on OFBIZ-1648:
-----------------------------------

I check the code, and found your change have been updated to the trunk dose it?

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571444#action_12571444 ]

Adrian Crum commented on OFBIZ-1648:
------------------------------------

WeizhanGuo,

If you apply the patch, you will see that the factory method is already there in the ModelWidget class. All we need is the rendering classes.

No, none of this has been committed. I am working on an improved patch that will be based on the discussions here and I will submit it to this Jira issue for review when it is ready.

We will need new ModelWidget subclasses to add support for Dojo - check the dev mailing list for "Discussion: Screen Widget XML format to support 3rd party rendering libraries".


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1648:
-------------------------------

    Attachment: ofbiz_ajax.patch

ofbiz_ajax.patch is some work I did on the OFBiz-to-Ajax integration. Work had already been started in the screen widgets and the Example component - I expanded it a little.

The problem with the existing Ajax example in the Example component is that the screen is useless if the user has JavaScript disabled. I fixed that by putting JavaScript detection in the login screen, and then passing the setting around the framework. When a user first logs in the setting is stored in the UserPreferences entity, where it is retrieved by each webapp - making the setting span webapp sessions. I also put a "javaScriptEnabled" element in the screen context - it contains "true" or "false".

I modified the widget rendering code to output HTML according to the user's JavaScript setting. Some of it doesn't work. I wanted to get form widget pagination to use Ajax, but it isn't working. I gave up on it, but the code is still there. It would be great if a Prototype guru could take a look at it and figure what's wrong. I'll play with it some more later.

The Example component has been updated. One of the things I learned is that the request Maps for Ajax calls should have the auth attribute set to false, and have the widgets perform permission checking. With auth set to true, the HTML container being updated will have a login screen inside it if the user's session expires, or if they log out in another webapp. Set up the way I have it, the request is successful when the user is logged out, but it returns nothing - so the HTML container being updated goes blank.

This patch is intended for review and comment. It's not finished yet. If there are no objections, I will clean up the code and get it committed.

One thing I'm considering - that is not in this patch - is a JavaScript "connector" to bridge between the widgets and the Prototype library. Instead of widgets outputting code like

<script type="text/javascript">new Ajax.PeriodicalUpdater('ExampleAjaxMessages', '/example/control/ExampleAjaxMessages', {frequency: 10});</script>

it would output something like

<script type="text/javascript">OfbizPeriodicalUpdater('ExampleAjaxMessages', '/example/control/ExampleAjaxMessages', '10');</script>

where the OfbizPeriodicalUpdater JavaScript function is in the "connector" library, and it would create the corresponding Protoype Ajax object.

That way, if we want to switch to another Ajax library, or if the Prototype API changes, we only have to modify the connector JavaScript file, not all of the widget java code.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1648:
-------------------------------

    Attachment: ofbiz_ajax.patch

Updated patch. Slight change of direction in the form widget syntax. Having only one background update target is limiting, so I'm working on specifying multiple update targets.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595903#action_12595903 ]

Jacques Le Roux commented on OFBIZ-1648:
----------------------------------------

Hi Adrian,

I don't know why (I tried to trace but quickly gave up) but when I click on First Previoux Next or Last button I get
org.ofbiz.webapp.control.RequestHandlerException: Unknown request [findExampleAjax]; this request does not exist or cannot be called directly.

From your notes above, seems to be related to security as the view exists in controller

This is true w/ or w/o js activated

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595911#action_12595911 ]

Adrian Crum commented on OFBIZ-1648:
------------------------------------

Jacques,

Thank you for taking the time to look at this. I mentioned in my first comment that parts of it don't work. I was hoping to get comments on the general direction before I put more work in it. I have the navigation working now. I'll post an updated patch soon.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595914#action_12595914 ]

Jacques Le Roux commented on OFBIZ-1648:
----------------------------------------

3rd section of your comment yes sorry, I mixed it up with the 4th section and thought it was related to security as findExampleAjax was existing in the controller.
I began to review the patch and I did not see any problems so far but I will now wait your update to review it completly

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1648:
-------------------------------

    Attachment: ofbiz_ajax.patch

Updated patch. Everything works now. Only one problem left to solve - when creating a new Example, the form doesn't clear in IE7.


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1648:
-------------------------------

    Attachment: ofbiz_ajax.patch

Updated ofbiz_ajax.patch.

I'm stuck and I need help from someone familiar with JavaScript. The code in this patch is ready for committing, but there is one problem I can't solve - multiple Ajax requests work great in Firefox, but not in IE.

In the Ajax Example screen in the Example component, when a user submits the New Example form, the list and the form should get updated. Two Ajax requests are sent out. IE updates the list, but not the form.

I confirmed IE calls the ajaxUpdateAreas function in selectall.js (line 226). The string argument is correct. I thought maybe the multiple Ajax.Updater instances were erasing each other, so I assigned each one to an array element - that didn't fix it.

I'm sure it's some weird quirk in how IE handles variable or function scoping, but I don't know what the problem is.

Any help would be appreciated!


> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1648) Sandbox: Improved Screen Widgets, adding 3rd party rendering library support

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597850#action_12597850 ]

Jacques Le Roux commented on OFBIZ-1648:
----------------------------------------

Adrian,

Yes it works well (apart the IE7 non clearing issue but that's not very annoying) but something is disturbing : when you click on last or next or such you go to the non Ajax page is that wanted ?

> Sandbox: Improved Screen Widgets, adding 3rd party rendering library support
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-1648
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1648
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: ofbiz_ajax.patch, ofbiz_ajax.patch, ofbiz_ajax.patch, ofbiz_ajax.patch, widget_improvements.patch
>
>
> Discuss screen widget modifications and enhancements that will make the screen widgets more robust. Everyone is welcome to review and comment.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

12