You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "james yong (JIRA)" <ji...@apache.org> on 2010/08/23 05:06:18 UTC

[jira] Created: (OFBIZ-3897) Wicket component

Wicket component
----------------

                 Key: OFBIZ-3897
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
             Project: OFBiz
          Issue Type: New Feature
          Components: framework
    Affects Versions: SVN trunk
            Reporter: james yong
            Priority: Minor
             Fix For: SVN trunk


This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901778#action_12901778 ] 

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

For fun: impressive http://wicketstuff.org/wicket14/kitten-captcha/

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902321#action_12902321 ] 

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

One point we need to reemphasize is why it's better to use Widget Form and Minilang rather than Grooy/Freemarker couple and Java: productivity.
For Widget Form vs Grooy/Freemarker couple it's mostly because it allows more reusability and extensiblity, it's more compact and clear, here experience can tell....
For Minilang vs Java it's easy to understand that you don't need to compile and especially reload.

Using OSGI for components would help for the reload part and component compilation is not that long...

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901485#action_12901485 ] 

BJ Freeman commented on OFBIZ-3897:
-----------------------------------

one of the goals of ofbiz is to have reusable code/screens/screenlets.
Except for framework the Goal is to use minilang  instead of java. 
one of the reason that the quote header and items are separate forms is to allow other applications in the future to use just one or the other without  the baggage of both.

the advantage of using the Widgets is they allow to build a larger more complete screen but including many screenlets, that also have there own CSS class to placement and look and feel are defined in the CSS.

so if that functionality is also for Wickets then I see it integrating better.

#2 i am not clear yet how when you have a java application such as wickets on the user desktop how it will securely communication with the ofbiz server.
I am looking at the Guestbook example
http://wicket.apache.org/learn/examples/guestbook.html

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901255#action_12901255 ] 

Ashish Vijaywargiya commented on OFBIZ-3897:
--------------------------------------------

First of all thanks James for the contribution.
Can you please share your thoughts on the following points?

1) What are the things that you have covered in this proof of concept? Brief details could be of great help for the committer(or others) to review your work.

2) Could you please provide few details about the use of WicketCommonDecorator.java file?

3) Can you please provide short tutorial for a beginner in the wiki area so that others could use your notes whenever they wanted to explore something in Apache Wicket? Here is the link for your reference? - https://cwiki.apache.org/confluence/display/OFBIZ/Home
 
Thanks!
--
Ashish Vijaywargiya

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "james yong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903349#action_12903349 ] 

james yong commented on OFBIZ-3897:
-----------------------------------

Hi Jacques,

Thanks. 

Yes OSGi should helps. For the time being, I have tried JRebel successfully in OFbiz.
This means if JRebel is used, any  java code changes will not need to building the jar and reload tomcat, inorder to do testing.
Developers for open source project can apply for free annual licence.

Alternatively, I can explore using groovy to do the wicket pages.

Fyi, I am working on using existing screens for the Wicket Pages, so that existing templates for headers, menus, footers can be reused.

I will report the progress probably a week or 2 later.

Regards,
James



> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "james yong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901340#action_12901340 ] 

james yong commented on OFBIZ-3897:
-----------------------------------

Hi BJ,

Thanks. I agreed that more thought is needed for the theme portion.

1) To give an example:
Currently the quote header and items are separate forms. If I were to create a single creation form for them and have the ability to change certain part of the form based on a dropdown value, I will have to start using javascript. But wicket makes such a task simpler.

2) Wicket pages are just java files. Wicket will bind the values in the html (client )with the fields in the wicket pages (server). To interact with OFBiz, there is an OFBizContext object in the wicket page (like the context in ofbix) that the developer can use it to get delegator. security etc and use them in the various wicket page. This OFBizContext is also used when accessing OFBiz services.

Regards,
James





> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "james yong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901276#action_12901276 ] 

james yong commented on OFBIZ-3897:
-----------------------------------

Hi Ashish,

The patch mainly consists of a wicket component and a simple wicket example page in the example application.
The wicket example serves to demonstrate the necessary setup. 

The proof of concept is not polished but it serves to show:
1) how we add a wicket component to framework
2) how we can use wicket in an existing OFBiz application
3) how we can reuse the OFBiz's menu.xml file to generate the menus in the wicket page.

I have added the function for the request handler to forward the request from OFBiz control servlet to Wicket servlet.
Inorder for the forwarding to work, we need to
a) add request-map to the controller.xml and set the response type to 'forward'
b) mount the wicket page in WicketExampleApplication.java

UrlRewrite servlet and its urlrewrite.xml file serves to rewrite the url necessary for accessing wicket's resource and ajax functions.

About the WicketCommonDecorator class:
1) It's concept is akin to OFBiz's Decorator concept, and meant to be subclassed when creating a wicket page.
2) There are various abstract methods the developer needs to provide information with. (I am thinking of providing a setting class instead of those abstract methods)
3) It should look at the current theme and add the necessary themes panel (currenty only done for Tomahawk)

Other things todo includes:
1) Implement the panels for other themes, including the footers
2) page header info is hardcoded

Bugs:
1) Screen doesn't look OK in IE8.

I am hoping that someone interested in using wicket with OFBiz to give it some polish, as I need to focus on other things 1st.

Regards,
James

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "james yong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901693#action_12901693 ] 

james yong commented on OFBIZ-3897:
-----------------------------------

Hi BJ,

I will rework on the theme portion.

As for reusability, wicket panels work equally well. It can also combine panels into a single form and page.

#2 I am not sure if I understand your question. Wicket is a web application framework. You can take a look at some demos at http://wicketstuff.org/wicket14/, including the guestbook.

Regards,
James

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Commented: (OFBIZ-3897) Wicket component

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901314#action_12901314 ] 

BJ Freeman commented on OFBIZ-3897:
-----------------------------------

I looked briefly at the patch.
one thing stood out.
the double works for themes.
there is already a themes framework, so it would be better to have a generic themes panel that reads the ofbiz themes to create look and feel.

1) what is the advantage over the widgets of ofbiz
2) how are you going to make GUI be interactive with ofbiz

At first glance this should be external to ofbiz then use a communications layer to communicate with it, unless I missed something.

As a side note: I use a third party WYSIWYG to create the java code for a GUI.
I now use Java Network Launching Protocol (JNLP)  to launch and communicate with ofbiz. 

Just some thoughts.



> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Updated: (OFBIZ-3897) Wicket component

Posted by "james yong (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

james yong updated OFBIZ-3897:
------------------------------

    Attachment: patch.txt

attached patch serves as proof of concept.

additional jar files are not included in framework/wicket/lib
1. slf4j-api-1.4.3.jar
2. slf4j-log4j12-1.4.3.jar
3. urlrewrite-3.2.0.jar
4. wicket-1.4.9.jar
5. wicket-extensions-1.4.9.jar

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt
>
>
> This component allow developers to use Wicket framework

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


[jira] Updated: (OFBIZ-3897) Wicket component

Posted by "james yong (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

james yong updated OFBIZ-3897:
------------------------------

    Attachment: patch20100901.txt

Hi all,

I have attached an improved patch.

The template files for wicket pages are now in the respective templates folders
For example, if I have a wicket page java files in the order/src folder, the corresponding html files will be in order/templates/pages folder.
So the html files can be edited just like the ftl files and requires no reloading.

The attached code demonstrates
1) the usage of delegator and local dispatcher.
2) there is no need to create additional POJO in order to use the wicket components.
3) Using the screen widget for the WicketCommonDecorator template. So there is no more duplicate coding in the header, footer and menu.

Regards,
James

> Wicket component
> ----------------
>
>                 Key: OFBIZ-3897
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3897
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: james yong
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: patch.txt, patch20100901.txt
>
>
> This component allow developers to use Wicket framework

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