Repeat Upload controler

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

Repeat Upload controler

Claudio Delgado
All,

We have a form with a list of upload controls, it is developed using the
xform:repeat. And we have some problems inserting or removing some item from
that list at rendering level, the list is corrupt in the browser but the
instance is ok.

For example:

Inserting 3 files I have this list in the browser:

Index-1: Value: 1
Index-2: Value: 2
Index-3: Value 3

And the instance is (such as):

<file>1</file>
<file>2</file>
<file>3</file>
<file/>

Adding a new item between 1 and 2

Index-1: Value: 1
Index-New: Value: 2 //That's wrong
Index-2: Value: 3
Index-3: Value: New //That's wrong

And the instance is ok:

<file>1</file>
<file>new</file> //*
<file>2</file>
<file>3</file>
<file/>

* This's ok but inconsistent with the list rendered in the browser


Attached you can find an example XForm with this problem, it runs in the
sandbox.

Thanks in advance for any help to solve this issue.

Regards,

Claudio



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

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

Re: Repeat Upload controler

Alessandro  Vernet
Administrator
Hi Claudio,

I tried to reproduce this issue. This is what I did:

1) Click 3 times on the +. Enter a, b, c in text fields. I get
screenshot002.png (attached).
2) Click on the text field on the second line, the line that contains
b. Click on +. I get screenshot003.png (attached). A line was inserted
between b and c, which is what is expected, right?

Am I doing something wrong? If you don't see the same behavior, it
might be because a bug has been fixed between the version you are
using and the current version. If this is the case, you might want to
give a shot to a nightly build.

http://forge.objectweb.org/nightlybuilds/ops/ops/

Alex

On 6/15/06, Claudio Delgado <[hidden email]> wrote:

> All,
>
> We have a form with a list of upload controls, it is developed using the
> xform:repeat. And we have some problems inserting or removing some item from
> that list at rendering level, the list is corrupt in the browser but the
> instance is ok.
>
> For example:
>
> Inserting 3 files I have this list in the browser:
>
> Index-1: Value: 1
> Index-2: Value: 2
> Index-3: Value 3
>
> And the instance is (such as):
>
> <file>1</file>
> <file>2</file>
> <file>3</file>
> <file/>
>
> Adding a new item between 1 and 2
>
> Index-1: Value: 1
> Index-New: Value: 2 //That's wrong
> Index-2: Value: 3
> Index-3: Value: New //That's wrong
>
> And the instance is ok:
>
> <file>1</file>
> <file>new</file> //*
> <file>2</file>
> <file>3</file>
> <file/>
>
> * This's ok but inconsistent with the list rendered in the browser
>
>
> Attached you can find an example XForm with this problem, it runs in the
> sandbox.
>
> Thanks in advance for any help to solve this issue.
>
> Regards,
>
> Claudio
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

screenshot002.png (13K) Download Attachment
screenshot003.png (14K) Download Attachment
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Repeat Upload controler

Claudio Delgado
Hi Alex,

Attached you will find two screen shots with the problem; you misses to
select files in your test. The problem is focused on upload control; the
input text is just a reference to show that the instance is Ok.

To reproduce:

- Pick three files up as is shown in Screen1.png, and set a reference letter
to identify the referenced items in the instance (A, B, C).

- Select the second control (B) and click on + to add a new one. The
expected behavior should insert a new upload and input txt control between B
and C, however the input text is inserter ok between B and C but the upload
control isn't. See Screen2.png, C (input text) is added to the end of the
list, it is ok, but the C:\FileC.txt is in the third position instead the
fourth one.

We have tested it in the nightly build and the problem is there.


Thanks for you time and help,

Claudio Delgado.


-----Mensaje original-----
De: [hidden email] [mailto:[hidden email]] En nombre de Alessandro
Vernet
Enviado el: viernes, 16 de junio de 2006 21:25
Para: [hidden email]
Asunto: Re: [ops-users] Repeat Upload controler

Hi Claudio,

I tried to reproduce this issue. This is what I did:

1) Click 3 times on the +. Enter a, b, c in text fields. I get
screenshot002.png (attached).
2) Click on the text field on the second line, the line that contains
b. Click on +. I get screenshot003.png (attached). A line was inserted
between b and c, which is what is expected, right?

Am I doing something wrong? If you don't see the same behavior, it
might be because a bug has been fixed between the version you are
using and the current version. If this is the case, you might want to
give a shot to a nightly build.

http://forge.objectweb.org/nightlybuilds/ops/ops/

Alex

On 6/15/06, Claudio Delgado <[hidden email]> wrote:
> All,
>
> We have a form with a list of upload controls, it is developed using the
> xform:repeat. And we have some problems inserting or removing some item
from

> that list at rendering level, the list is corrupt in the browser but the
> instance is ok.
>
> For example:
>
> Inserting 3 files I have this list in the browser:
>
> Index-1: Value: 1
> Index-2: Value: 2
> Index-3: Value 3
>
> And the instance is (such as):
>
> <file>1</file>
> <file>2</file>
> <file>3</file>
> <file/>
>
> Adding a new item between 1 and 2
>
> Index-1: Value: 1
> Index-New: Value: 2 //That's wrong
> Index-2: Value: 3
> Index-3: Value: New //That's wrong
>
> And the instance is ok:
>
> <file>1</file>
> <file>new</file> //*
> <file>2</file>
> <file>3</file>
> <file/>
>
> * This's ok but inconsistent with the list rendered in the browser
>
>
> Attached you can find an example XForm with this problem, it runs in the
> sandbox.
>
> Thanks in advance for any help to solve this issue.
>
> Regards,
>
> Claudio
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>


--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

Screen1.PNG (21K) Download Attachment
screen2.PNG (24K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Repeat Upload controler

Alessandro  Vernet
Administrator
Hi Claudio,

OK, I understand. Yes, this is a bug, but it is not one that will be
easily fixed. When you do an insert, after B, the server does not tell
the client that something has been inserted between B and C, but that:

line 1: unchanged (A)
line 2: unchanged (B)
line 3: was C, new value: empty
line 4: new line, value: C

So since the value of the selected files is unknown to the server, the
filename for C is not shifted. Maybe this will get fixed once we
support file upload with replace="instance", because then we'll make
sure that any selected file is entirely uploaded before we proceed
with any new action. For more on this, see Erik's response in the
thread "Upload submission: replace=all".

I have added the bug below, and in the meantime you can prevent the
user from adding a new file in the middle of the list (if new files
are inserted only at the end of the list, then you won't have this
problem).

http://forge.objectweb.org/tracker/index.php?func=detail&aid=305539&group_id=168&atid=350207

Alex

On 6/19/06, Claudio Delgado <[hidden email]> wrote:

> Hi Alex,
>
> Attached you will find two screen shots with the problem; you misses to
> select files in your test. The problem is focused on upload control; the
> input text is just a reference to show that the instance is Ok.
>
> To reproduce:
>
> - Pick three files up as is shown in Screen1.png, and set a reference letter
> to identify the referenced items in the instance (A, B, C).
>
> - Select the second control (B) and click on + to add a new one. The
> expected behavior should insert a new upload and input txt control between B
> and C, however the input text is inserter ok between B and C but the upload
> control isn't. See Screen2.png, C (input text) is added to the end of the
> list, it is ok, but the C:\FileC.txt is in the third position instead the
> fourth one.
>
> We have tested it in the nightly build and the problem is there.
>
>
> Thanks for you time and help,
>
> Claudio Delgado.
>
>
> -----Mensaje original-----
> De: [hidden email] [mailto:[hidden email]] En nombre de Alessandro
> Vernet
> Enviado el: viernes, 16 de junio de 2006 21:25
> Para: [hidden email]
> Asunto: Re: [ops-users] Repeat Upload controler
>
> Hi Claudio,
>
> I tried to reproduce this issue. This is what I did:
>
> 1) Click 3 times on the +. Enter a, b, c in text fields. I get
> screenshot002.png (attached).
> 2) Click on the text field on the second line, the line that contains
> b. Click on +. I get screenshot003.png (attached). A line was inserted
> between b and c, which is what is expected, right?
>
> Am I doing something wrong? If you don't see the same behavior, it
> might be because a bug has been fixed between the version you are
> using and the current version. If this is the case, you might want to
> give a shot to a nightly build.
>
> http://forge.objectweb.org/nightlybuilds/ops/ops/
>
> Alex
>
> On 6/15/06, Claudio Delgado <[hidden email]> wrote:
> > All,
> >
> > We have a form with a list of upload controls, it is developed using the
> > xform:repeat. And we have some problems inserting or removing some item
> from
> > that list at rendering level, the list is corrupt in the browser but the
> > instance is ok.
> >
> > For example:
> >
> > Inserting 3 files I have this list in the browser:
> >
> > Index-1: Value: 1
> > Index-2: Value: 2
> > Index-3: Value 3
> >
> > And the instance is (such as):
> >
> > <file>1</file>
> > <file>2</file>
> > <file>3</file>
> > <file/>
> >
> > Adding a new item between 1 and 2
> >
> > Index-1: Value: 1
> > Index-New: Value: 2 //That's wrong
> > Index-2: Value: 3
> > Index-3: Value: New //That's wrong
> >
> > And the instance is ok:
> >
> > <file>1</file>
> > <file>new</file> //*
> > <file>2</file>
> > <file>3</file>
> > <file/>
> >
> > * This's ok but inconsistent with the list rendered in the browser
> >
> >
> > Attached you can find an example XForm with this problem, it runs in the
> > sandbox.
> >
> > Thanks in advance for any help to solve this issue.
> >
> > Regards,
> >
> > Claudio
> >
> >
> >
> >
> > --
> > 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
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet