ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kaiser <martin.kai...@gmail.com>
Subject Re: Adding calendar to a form widget
Date Tue, 05 Jun 2012 12:51:13 GMT
Thanks Jacques, I already found this resource. But in my case just the
controller.xml was configured in the wrong way, using an older
renderer (ScreenWidgetViewHandler). By replacing this I successfully
produced the code which I expected. Now also some other things like
the autocompletion fields etc. are working.

By the way, is the ScreenWidgetViewHandler deprecated? If so, is it
possible to print a warning message to the console to make this
visible to the developer that he is using a deprecated function? Or is
such an mechanism not wanted?

Martin

On 5 June 2012 14:27, Jacques Le Roux <jacques.le.roux@les7arts.com> wrote:
> Prefer
> https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples
> For more lastest/up to date examples
>
> Jacques
>
>
> Martin Kaiser wrote:
>>
>> Ok, I think I solved the problem. My "template" for the controller.xml
>> file was based on the book "Apache OFBiz Development - The beginners
>> tutorial", which seems to be not state of the art. So I registered an
>> older handler for screens:
>>
>> <handler name="screen" type="view"
>> class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
>>
>> I replaced it now by
>>
>> <handler name="screen" type="view"
>> class="org.ofbiz.widget.screen.MacroScreenViewHandler"/>
>>
>> which produces much more JavaScript.
>>
>> best regards,
>> Martin
>>
>>
>> On 5 June 2012 10:20, Martin Kaiser <martin.kaiser@gmail.com> wrote:
>>>
>>> Hi all,
>>>
>>> for me it's still not working. I just did a minimal setup with files
>>> containing only the xml responsible for the date picker.
>>>
>>> form file:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd">
>>> <form name="testform" type="single" list-name="mytest" target="mytest"
>>> odd-row-style="alternate-row" header-row-style="header-row-2"
>>> default-table-style="basic-table hover-bar">
>>> <field name="aDate" title="aDate"><date-time/></field>
>>> </form>
>>> </forms>
>>>
>>> screen file:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>
>>> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
>>> <screen name="testScreen">
>>> <section>
>>> <widgets><include-form
>>> location="component://test/widget/test/TestForm.xml" name="testform"
>>> /></widgets>
>>> </section>
>>> </screen>
>>> </screens>
>>>
>>> and then everything was hooked in controller.xml. Still the result is
>>> [...]
>>> <form method="post" action="/crm/control/mytest" id="testform"
>>> class="basic-form"
>>> onsubmit="javascript:submitFormDisableSubmits(this)" name="testform">
>>> <table cellspacing="0" class="basic-table hover-bar">
>>> <tr>
>>> <td class="label">aDate</td>
>>> <td colspan="4"><input type="text" name="aDate" title="" size="25"
>>> maxlength="30" id="testform_aDate"/><a class="hasDatepicker"
>>>
>>> href="javascript:call_cal(document.testform.aDate,'2012-06-05%2010&#58;18&#58;56.41');"><img
>>> src="/images/cal.gif" width="16" height="16" border="0" alt=""
>>> title=""/></a></td>
>>> </tr>
>>> </table>
>>> </form>
>>> [...]
>>>
>>> and not the expected button. What am I doing wrong here?
>>>
>>> Thx,
>>> Martin
>>>
>>> On 4 June 2012 19:01, Foo Shyn Chung <ipohfly@gmail.com> wrote:
>>>>
>>>> Am not sure about version 12.04, but 11.04 has some enhancement that
>>>> personally i think is great over 10.04 so likewise i think 12.04 should
>>>> be
>>>> the same =)
>>>>
>>>> Thanx
>>>> FooShyn
>>>>
>>>> On Mon, Jun 4, 2012 at 11:07 PM, G.Ben <g.benabdellah@gmail.com> wrote:
>>>>
>>>>> Thank you,
>>>>>
>>>>> I think that I'm working with 10.04 and I'm going to work with 12.04
so
>>>>> is
>>>>> it a good version ?
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633192.html
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.

Mime
View raw message