You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "G.Ben" <g....@gmail.com> on 2012/06/04 00:41:47 UTC

Adding calendar to a form widget

Hi everyone,

Is it possible to add a calendar in a widget form ? 
I want to include it in order to let the user select a date from it,


[This is not included in the form widgets]
And also I want to display a calendar with informations in it, 
Do I need to write the code for the whole calendar ? 

Anyhelp ?? 

Thank you.

Regards.

G.Ben.


--
View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-to-a-form-widget-tp4633145.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar to a form widget

Posted by Arun Kumar Batham <ar...@hotwaxmedia.com>.
Hi G. Ben,

You can take reference from this lines for adding calender in form widget:

<form name="NewForm" type="single" target="formTarget"
          header-row-style="header-row" default-table-style="basic-table">
<field name="yourDate" title="Select Date"><date-time 
type="timestamp"/></field>
</form>

I think this this information helps you.

Thank you.

Regards
Arun Kumar Batham
Hotwax Media Pvt. Ltd.
http://www.hotwaxmedia.com/


On Monday 04 June 2012 04:11 AM, G.Ben wrote:
> Hi everyone,
>
> Is it possible to add a calendar in a widget form ?
> I want to include it in order to let the user select a date from it,
>
>
> [This is not included in the form widgets]
> And also I want to display a calendar with informations in it,
> Do I need to write the code for the whole calendar ?
>
> Anyhelp ??
>
> Thank you.
>
> Regards.
>
> G.Ben.
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-to-a-form-widget-tp4633145.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar to a form widget

Posted by Foo Shyn Chung <ip...@gmail.com>.
Ops i mean <date-time type="date" />

Thanx
FooShyn

On Mon, Jun 4, 2012 at 12:05 PM, Foo Shyn Chung <ip...@gmail.com> wrote:

> Hi,
>
> Do you mean a date field? If so you can use the <date> or <date-time> tag
> on your form definition in the xml to create the date field widget.
>
> Thanx
> FooShyn
>
>
> On Mon, Jun 4, 2012 at 6:41 AM, G.Ben <g....@gmail.com> wrote:
>
>> Hi everyone,
>>
>> Is it possible to add a calendar in a widget form ?
>> I want to include it in order to let the user select a date from it,
>>
>>
>> [This is not included in the form widgets]
>> And also I want to display a calendar with informations in it,
>> Do I need to write the code for the whole calendar ?
>>
>> Anyhelp ??
>>
>> Thank you.
>>
>> Regards.
>>
>> G.Ben.
>>
>>
>> --
>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Adding-calendar-to-a-form-widget-tp4633145.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>

Re: Adding calendar to a form widget

Posted by Foo Shyn Chung <ip...@gmail.com>.
Hi,

Do you mean a date field? If so you can use the <date> or <date-time> tag
on your form definition in the xml to create the date field widget.

Thanx
FooShyn

On Mon, Jun 4, 2012 at 6:41 AM, G.Ben <g....@gmail.com> wrote:

> Hi everyone,
>
> Is it possible to add a calendar in a widget form ?
> I want to include it in order to let the user select a date from it,
>
>
> [This is not included in the form widgets]
> And also I want to display a calendar with informations in it,
> Do I need to write the code for the whole calendar ?
>
> Anyhelp ??
>
> Thank you.
>
> Regards.
>
> G.Ben.
>
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Adding-calendar-to-a-form-widget-tp4633145.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: Adding calendar to a form widget

Posted by Martin Kaiser <ma...@gmail.com>.
great.

Thanks,
Martin

On 9 June 2012 17:49, Jacques Le Roux <ja...@les7arts.com> wrote:
> Done see Attic page in Wiki
> https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Attic
>
> Jacques
>
> From: "Adrian Crum" <ad...@sandglass-software.com>
>
>> On 6/9/2012 2:20 PM, Jacques Le Roux wrote:
>>>
>>> From: "Martin Kaiser" <ma...@gmail.com>
>>>>
>>>> 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?
>>>
>>>
>>> Yes you can say that now MacroScreenViewHandler is used and
>>> ScreenWidgetViewHandler
>>> BTW if you search ScreenWidgetViewHandler in all files you will only find
>>> 5 references. I even wonder if at this point all these old stuff should not
>>> be moved to Attic
>>
>>
>> +1
>>
>> Add it to the cleanup Jira issue.
>>
>> -Adrian
>>
>

Re: Adding calendar to a form widget

Posted by Jacques Le Roux <ja...@les7arts.com>.
Done see Attic page in Wiki https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Attic

Jacques

From: "Adrian Crum" <ad...@sandglass-software.com>
> On 6/9/2012 2:20 PM, Jacques Le Roux wrote:
>> From: "Martin Kaiser" <ma...@gmail.com>
>>> 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?
>>
>> Yes you can say that now MacroScreenViewHandler is used and 
>> ScreenWidgetViewHandler
>> BTW if you search ScreenWidgetViewHandler in all files you will only 
>> find 5 references. I even wonder if at this point all these old stuff 
>> should not be moved to Attic
> 
> +1
> 
> Add it to the cleanup Jira issue.
> 
> -Adrian
>

Re: Adding calendar to a form widget

Posted by Adrian Crum <ad...@sandglass-software.com>.
On 6/9/2012 2:20 PM, Jacques Le Roux wrote:
> From: "Martin Kaiser" <ma...@gmail.com>
>> 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?
>
> Yes you can say that now MacroScreenViewHandler is used and 
> ScreenWidgetViewHandler
> BTW if you search ScreenWidgetViewHandler in all files you will only 
> find 5 references. I even wonder if at this point all these old stuff 
> should not be moved to Attic

+1

Add it to the cleanup Jira issue.

-Adrian


Re: Adding calendar to a form widget

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Martin Kaiser" <ma...@gmail.com>
> 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?

Yes you can say that now MacroScreenViewHandler is used and ScreenWidgetViewHandler
BTW if you search ScreenWidgetViewHandler in all files you will only find 5 references. I even wonder if at this point all these old 
stuff should not be moved to Attic

Jacques

> Martin
>
> On 5 June 2012 14:27, Jacques Le Roux <ja...@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 <ma...@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 <ip...@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....@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. 

Re: Adding calendar to a form widget

Posted by Martin Kaiser <ma...@gmail.com>.
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 <ja...@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 <ma...@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 <ip...@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....@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.

Re: Adding calendar to a form widget

Posted by Jacques Le Roux <ja...@les7arts.com>.
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 <ma...@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 <ip...@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....@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.

Re: Adding calendar to a form widget

Posted by Martin Kaiser <ma...@martin-kaiser.info>.
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 <ma...@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 <ip...@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....@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.
>>>

Re: Adding calendar to a form widget

Posted by Martin Kaiser <ma...@gmail.com>.
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 <ip...@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....@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.
>>

Re: Adding calendar to a form widget

Posted by Foo Shyn Chung <ip...@gmail.com>.
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....@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.
>

Re: Adding calendar to a form widget

Posted by "G.Ben" <g....@gmail.com>.
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.

Re: Adding calendar to a form widget

Posted by Foo Shyn Chung <ip...@gmail.com>.
Hi,

Which version of Ofbiz that you're using? Button tag is generated instead
of a 'a' tag for the calendar image when i use the date-time tag in the
Form xml.

<button class="ui-datepicker-trigger" type="button"></button>

FYI the version i'm using is 11.04

Thanx
FooShyn

On Mon, Jun 4, 2012 at 6:32 PM, G.Ben <g....@gmail.com> wrote:

> Yeah,
>
> That's exactly what's happening to me.
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633179.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: Adding calendar to a form widget

Posted by "G.Ben" <g....@gmail.com>.
Yeah, 

That's exactly what's happening to me.

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633179.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar to a form widget

Posted by Martin Kaiser <ma...@gmail.com>.
Hi,

I have a similar problem. The calendar icon is created but when
clicking on it nothing happens. The code generated by OFBiz looks as
follows:

<a class="hasDatepicker"
href="javascript:call_cal(document.updateUserLoginSecurity.disabledDateTime,'2012-06-04%2012:03:45.34');"><img
src="/images/cal.gif" width="16" height="16" border="0" alt="Kalender
einsehen" title="Kalender einsehen"></a>

I found that the call_cal function is not available, and somewhere I
found that it is deprecated (?)
(https://issues.apache.org/jira/browse/OFBIZ-4311).

But from the bugs description I don't see what I have to do.

The same form is also rendered by the request to
https://https://demo-trunk.ofbiz.apache.org/partymgr/control/ProfileEditUserLogin,
where the javascript is correct.

best regards,
Martin

On 4 June 2012 09:28, G.Ben <g....@gmail.com> wrote:
> Thank you all for your replies,
>
> Arun Kumar Batham I did it, but it doesn't work, when I click at the
> calendar to select a date, nothing appears at all, Should I add something
> like Javascript ?
>
> Thank you.
>
> G.Ben.
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633164.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar to a form widget

Posted by "G.Ben" <g....@gmail.com>.
Thank you all for your replies,

Arun Kumar Batham I did it, but it doesn't work, when I click at the
calendar to select a date, nothing appears at all, Should I add something
like Javascript ? 

Thank you.

G.Ben. 



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633164.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar to a form widget

Posted by Jacques Le Roux <ja...@les7arts.com>.
https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples

Jacques

From: "G.Ben" <g....@gmail.com>
> Hi everyone,
> 
> Is it possible to add a calendar in a widget form ? 
> I want to include it in order to let the user select a date from it,
> 
> 
> [This is not included in the form widgets]
> And also I want to display a calendar with informations in it, 
> Do I need to write the code for the whole calendar ? 
> 
> Anyhelp ?? 
> 
> Thank you.
> 
> Regards.
> 
> G.Ben.
> 
> 
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-to-a-form-widget-tp4633145.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar/Radio button to a form widget

Posted by "G.Ben" <g....@gmail.com>.
Thank you,

I'm working with it.



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633196.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Adding calendar/Radio button to a form widget

Posted by mohd Viqar <mh...@gmail.com>.
 You can use this :       

<field name="field1" title="${uiLabelMap.ExampleDateField1Title}">
            <date-time/>
</field>

You can see this file explaining most of the form fields.
ofbizDir/framework/example/widget/example/FormWidgetExampleForms.xml

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-calendar-Radio-button-to-a-form-widget-tp4633145p4633194.html
Sent from the OFBiz - User mailing list archive at Nabble.com.