field date formatted using Intalio

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

field date formatted using Intalio

Talita Pezzi - PROJELER
Hello,
 
I'm trying creat a field that show the current date.
I know do in enviroment Orbeon, but I'm using Intalio and I need adapt my code to the code of the Intalio.
My code show a field formatted, but with an exclamation point beside and I not go to next page.
I attached my code.
Can you help me?
 
 
Talita Pezzi
[hidden email]
Tel +55 51 2117 1872 | +55 11 3717 5271
www.projeler.com.br


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

date.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

Erik Bruchez
Administrator
Talita,

If I remove the XML schema defined on xforms:model, I don't see an  
exclamation mark. I don't have that schema, but I suspect that it may  
be the one marking the date field as invalid somehow.

-Erik

On Jan 9, 2008, at 5:07 PM, Talita Pezzi - PROJELER wrote:

> Hello,
>
> I'm trying creat a field that show the current date.
> I know do in enviroment Orbeon, but I'm using Intalio and I need  
> adapt my code to the code of the Intalio.
> My code show a field formatted, but with an exclamation point beside  
> and I not go to next page.
> I attached my code.
> Can you help me?
>
>
> Talita Pezzi
> [hidden email]
> Tel +55 51 2117 1872 | +55 11 3717 5271
> www.projeler.com.br<date.txt>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

ilango_g
In reply to this post by Talita Pezzi - PROJELER
What kind of date format are you looking to use?

Talita Pezzi - PROJELER wrote
Hello,

I'm trying creat a field that show the current date.
I know do in enviroment Orbeon, but I'm using Intalio and I need adapt my code to the code of the Intalio.
My code show a field formatted, but with an exclamation point beside and I not go to next page.
I attached my code.
Can you help me?


Talita Pezzi
talita.pezzi@projeler.com.br
Tel +55 51 2117 1872 | +55 11 3717 5271
www.projeler.com.br
<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns:f="http://orbeon.org/oxf/xml/formatting" 
xmlns:ev="http://www.w3.org/2001/xml-events" 
xmlns:xforms="http://www.w3.org/2002/xforms" 
xmlns:xhtml="http://www.w3.org/1999/xhtml" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:fe="http://example.com/form1/xform" 
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" 
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
  <xhtml:head>
    <xhtml:style type="text/css" id="intalio-fe-xforms" xml:space="preserve">
    #xforms_cntrl_data {position : absolute; top : 60; left : 30; width : 240; height : 29; margin : 0; padding : 0;}
    #xforms_cntrl_data input {width : 209; height : 21}
</xhtml:style>
    <xforms:model schema="form1.xform.xsd">
         
   
     
      <xforms:instance id="taskinput">
        <fe:input>
          <fe:data/>
        </fe:input>
      </xforms:instance>
     
     
      <xforms:instance id="taskmetadata">
        <taskmetadata/>
      </xforms:instance>
     
     
      <xforms:instance id="taskoutput">
        <fe:output>
          <fe:data/>
        </fe:output>
      </xforms:instance>
     
      <xforms:action ev:event="xforms-ready">
        <xforms:action xforms:if="string(instance('taskoutput')/@saved) != 'true'">
          <xforms:setvalue ref="instance('taskoutput')/fe:data" value="instance('taskinput')/fe:data"/>
        </xforms:action>
      </xforms:action>
     
      <xforms:bind nodeset="instance('taskoutput')/fe:data" relevant="true()" type="xs:date" constraint="if (. castable as xs:date)
                                      then current-date() + xdt:dayTimeDuration('P1D') >= xs:date(.)
                                      else false()"
                                      readonly="false()"
                                      calculate="if (. = '') then adjust-date-to-timezone(current-date(), ()) else ."/>
      <xforms:bind nodeset="instance('taskinput')/fe:data" relevant="true()" type="xs:date"/>
     
    </xforms:model>
  </xhtml:head>
  <xhtml:body>
 
    <xhtml:div id="intalio-bpms-form">
      <xhtml:div id="xforms_cntrl_data">
        <xforms:output ref="instance('taskoutput')/fe:data" xxforms:format="format-date(xs:date(.), '[D]/[M]/[Y]', 'en', (), ())">
          <xforms:label>data</xforms:label>
        </xforms:output>
      </xhtml:div>
    </xhtml:div>
   
  </xhtml:body>
</xhtml:html>


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

Alessandro Vernet
Administrator
On Jan 10, 2008 6:17 AM, XGuy <[hidden email]> wrote:
> What kind of date format are you looking to use?

If you are using a "date widget" (input control bound to a node of
type xs:date), then the date in the instance should an xs:date, e.g.
2008-01-10.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

ilango_g
Can I throw up an Alert Message saying "hey, you entered an invalid date, in the situation where I entered a date by hand".

And if I set it to a required field that also needs to be valid, is there any other validity check besides xs:date (I have done that) that needs to be done?
Alessandro Vernet wrote
On Jan 10, 2008 6:17 AM, XGuy <ilangocal@yahoo.com> wrote:
> What kind of date format are you looking to use?

If you are using a "date widget" (input control bound to a node of
type xs:date), then the date in the instance should an xs:date, e.g.
2008-01-10.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

djalma.saraiva
In reply to this post by Alessandro Vernet
Hello!
Thanks!. Have we solved.
The problem was with the format of Brazilian date. Ex 14/01/2008. (And not
01/14/2008).

Again, thanks for your help.

Djalma Saraiva
[hidden email]
Tel +55 51 2117 1872 | +55 11 3717 5271

www.projeler.com.br


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, January 10, 2008 6:12 PM
Subject: Re: [ops-users] field date formatted using Intalio


> On Jan 10, 2008 6:17 AM, XGuy <[hidden email]> wrote:
>> What kind of date format are you looking to use?
>
> If you are using a "date widget" (input control bound to a node of
> type xs:date), then the date in the instance should an xs:date, e.g.
> 2008-01-10.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.com/
>

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


>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

Alessandro Vernet
Administrator
In reply to this post by ilango_g
On Jan 11, 2008 7:17 AM, XGuy <[hidden email]> wrote:
> Can I throw up an Alert Message saying "hey, you entered an invalid date, in
> the situation where I entered a date by hand".

First, if you have an <xforms:alert>, when users mouse over the "!"
icon, they will see your message. If you really want to have a
message, you can react to a xforms-invalid event and use an
<xforms:message> to show the message.

> And if I set it to a required field that also needs to be valid, is there
> any other validity check besides xs:date (I have done that) that needs to be
> done?

If you set the the type to xs:date, then a date widget will show, so
you don't have to worry too much about validation, as users won't be
able to enter dates that syntacticly invalid. You might only want to
have additional rules if the date needs to be, say, before of after
another date.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

ilango_g
I would certainly like to have this xforms-invalid event with xforms:message put in.

Alessandro Vernet wrote
On Jan 11, 2008 7:17 AM, XGuy <ilangocal@yahoo.com> wrote:
> Can I throw up an Alert Message saying "hey, you entered an invalid date, in
> the situation where I entered a date by hand".

First, if you have an <xforms:alert>, when users mouse over the "!"
icon, they will see your message. If you really want to have a
message, you can react to a xforms-invalid event and use an
<xforms:message> to show the message.

> And if I set it to a required field that also needs to be valid, is there
> any other validity check besides xs:date (I have done that) that needs to be
> done?

If you set the the type to xs:date, then a date widget will show, so
you don't have to worry too much about validation, as users won't be
able to enter dates that syntacticly invalid. You might only want to
have additional rules if the date needs to be, say, before of after
another date.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

Alessandro Vernet
Administrator
On Jan 16, 2008 6:25 AM, XGuy <[hidden email]> wrote:
> I would certainly like to have this xforms-invalid event with xforms:message
> put in.

Do you know already how to do this, or are you asking?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

ilango_g
I have implemented this on my own. I should have been clearer.

Alessandro Vernet wrote
On Jan 16, 2008 6:25 AM, XGuy <ilangocal@yahoo.com> wrote:
> I would certainly like to have this xforms-invalid event with xforms:message
> put in.

Do you know already how to do this, or are you asking?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: field date formatted using Intalio

Alessandro Vernet
Administrator
On Jan 23, 2008 10:19 AM, XGuy <[hidden email]> wrote:
> I have implemented this on my own. I should have been clearer.

Excellent.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws