adding to repeat table

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

adding to repeat table

Jency Thomas

Hi,

I have the following scenario:

I have 3 text boxes(say A, B, and C) and an Add button and a repeat table.

1)      On clicking the Add button, I need to populate the textboxes of a repeat table with the values entered in the textboxes A, B, and C. Again I add another values to the textboxes A,B and C and on clicking the Add button, the news values need to be added as a new row in the repeat table retaining the old values.

2)      Initially the textboxes in the repeat table will be readonly. For each row, I have an Edit button. On clicking the edit button, the textboxes in that row should be enabled.  

3)      There is a save button in each row; but initially it is not visible. When the row is in editable mode, the Save button becomes visible for the editable row and Edit button becomes invisible. Once the Save button is clicked, the row becomes non-editable and the Edit button becomes visible.

 

I have implemented this partially; I’m attaching the code. Please help me to complete these 3 scenarios.

 

Thanks

Jency

 



--
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

eform2.xsl (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: adding to repeat table

Alessandro Vernet
Administrator
Jency,

Let's start with the first item:

On 10/26/07, Jency Thomas <[hidden email]> wrote:
> 1)      On clicking the Add button, I need to populate the textboxes of a
> repeat table with the values entered in the textboxes A, B, and C. Again I
> add another values to the textboxes A,B and C and on clicking the Add
> button, the news values need to be added as a new row in the repeat table
> retaining the old values.

Looking at the "Add" trigger:

* The at="index('ReminderDetails')" you have on the <xforms:action>
will be ignored. You can just remove it.
* You can move the first <xforms:insert> inside the <xforms:action>,
so you don't have to repeat the ev:event="DOMActivate".
* In the <xforms:setvalue> you want the XPath expression to work on
details[last() - 1]. This will be the item you just added; the item
which is before the last one, which you are not displaying.

I have attached your file with those updates.

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

eform2.xsl (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: adding to repeat table

Jency Thomas
Thanks Alex. That worked. Will you please help me to implement the
scenarios 2 and 3(Edit and Save)?

Thanks in advance
Jency


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: Tuesday, October 30, 2007 4:05 AM
To: [hidden email]
Subject: Re: [ops-users] adding to repeat table

Jency,

Let's start with the first item:

On 10/26/07, Jency Thomas <[hidden email]> wrote:
> 1)      On clicking the Add button, I need to populate the textboxes
of a
> repeat table with the values entered in the textboxes A, B, and C.
> Again I add another values to the textboxes A,B and C and on clicking
> the Add button, the news values need to be added as a new row in the
> repeat table retaining the old values.

Looking at the "Add" trigger:

* The at="index('ReminderDetails')" you have on the <xforms:action> will
be ignored. You can just remove it.
* You can move the first <xforms:insert> inside the <xforms:action>, so
you don't have to repeat the ev:event="DOMActivate".
* In the <xforms:setvalue> you want the XPath expression to work on
details[last() - 1]. This will be the item you just added; the item
which is before the last one, which you are not displaying.

I have attached your file with those updates.

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