Two columns having same name at leaf node causes problems

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

Two columns having same name at leaf node causes problems

Kannan Ekanath
Hi,
I have a XForm, where I have a part number and item number. My model looks like,
<xf:bind id="partNumber" nodeset="/a/bc/number"/>
<xf:bind id="itemNumber" nodeset="/de/fg/number"/>

Note that, the xpaths are same at the leaf which is "number", but the actual complete xpath is different.

Now in the UI, both these fields have auto-complete (Pop up a set of values when partial values are entered), and the UI looks like,

<xf:select1 bind="partNumber" id="machine-itemNumber" ...>
       <xf:send submission="auto-complete-part-number" ev:event="xforms-value-changed" />   
</xf:select1>

<xf:select1 bind="partNumber" id="machine-itemNumber" .../>
        <xf:send submission="auto-complete-part-number" ev:event="xforms-value-changed" />   
</xf:select1>

However, when the second item is entered, i can see a request to the server as follows (The below portion comes from xforms log)
DEBUG processor.XFormsServer - org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular (XFormsSubmissionUtils.java:154) XForms - opening URL connection for: http://localhost:8080/webapp/xforms/getSerialNumbers.action?type=XYZ& number=C123&number=C

Note that the parameter number is sent twice. Can someone tell me how this can be prohibited? I changed the submission to use ref instead of a bind and the request doesnt even get sent to the server

a) What is the difference between passing as ref and bind in a submit element?
b) How can i solve the problem mentioned above?
--
Regards,
Kannan Ekanath

--
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
Reply | Threaded
Open this post in threaded view
|

Fwd: Two columns having same name at leaf node causes problems

Kannan Ekanath
Hi,
I sent the below mail to the group, but dint get the mail although I was part of the group. Is there a problem with mailing list? (Even online archiving doesn't seem to have the mail). Nevertheless kindly help me with the below mentioned problem.

---------- Forwarded message ----------
From: [hidden email] <[hidden email]>
Date: Nov 8, 2006 6:40 PM
Subject: Two columns having same name at leaf node causes problems
To: [hidden email]

Hi,
I have a XForm, where I have a part number and item number. My model looks like,
<xf:bind id="partNumber" nodeset="/a/bc/number"/>
<xf:bind id="itemNumber" nodeset="/de/fg/number"/>

Note that, the xpaths are same at the leaf which is "number", but the actual complete xpath is different.

Now in the UI, both these fields have auto-complete (Pop up a set of values when partial values are entered), and the UI looks like,

<xf:select1 bind="partNumber" id="machine-itemNumber" ...>
       <xf:send submission="auto-complete-part-number" ev:event="xforms-value-changed" />   
</xf:select1>

<xf:select1 bind="partNumber" id="machine-itemNumber" .../>
        <xf:send submission="auto-complete-part-number" ev:event="xforms-value-changed" />   
</xf:select1>

However, when the second item is entered, i can see a request to the server as follows (The below portion comes from xforms log)
DEBUG processor.XFormsServer - org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular (XFormsSubmissionUtils.java:154) XForms - opening URL connection for: <a href="http://localhost:8080/webapp/xforms/getSerialNumbers.action?type=XYZ&amp;" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8080/webapp/xforms/getSerialNumbers.action?type=XYZ& number=C123&number=C

Note that the parameter number is sent twice. Can someone tell me how this can be prohibited? I changed the submission to use ref instead of a bind and the request doesnt even get sent to the server

a) What is the difference between passing as ref and bind in a submit element?
b) How can i solve the problem mentioned above?
--
Regards,
Kannan Ekanath


--
Regards,
Kannan Ekanath

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

Alessandro  Vernet
Administrator
In reply to this post by Kannan Ekanath
Kannan,

How is your XForms submission defined? In general, if you want to have
an instance sent to the server, you should <xforms:submission
method="post">. Could you be having this problem here because you have
method="get" in your submission.

Alex

On 11/8/06, [hidden email] <[hidden email]> wrote:

> Hi,
> I have a XForm, where I have a part number and item number. My model looks
> like,
> <xf:bind id="partNumber" nodeset="/a/bc/number"/>
> <xf:bind id="itemNumber" nodeset="/de/fg/number"/>
>
> Note that, the xpaths are same at the leaf which is "number", but the actual
> complete xpath is different.
>
> Now in the UI, both these fields have auto-complete (Pop up a set of values
> when partial values are entered), and the UI looks like,
>
> <xf:select1 bind="partNumber" id="machine-itemNumber" ...>
>        <xf:send submission="auto-complete-part-number"
> ev:event="xforms-value-changed" />
> </xf:select1>
>
> <xf:select1 bind="partNumber" id="machine-itemNumber" .../>
>         <xf:send submission="auto-complete-part-number"
> ev:event="xforms-value-changed" />
> </xf:select1>
>
> However, when the second item is entered, i can see a request to the server
> as follows (The below portion comes from xforms log)
> DEBUG processor.XFormsServer -
> org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular
> (XFormsSubmissionUtils.java:154) XForms - opening URL connection for:
> http://localhost:8080/webapp/xforms/getSerialNumbers.action?type=XYZ&
> number=C123&number=C
>
> Note that the parameter number is sent twice. Can someone tell me how this
> can be prohibited? I changed the submission to use ref instead of a bind and
> the request doesnt even get sent to the server
>
> a) What is the difference between passing as ref and bind in a submit
> element?
> b) How can i solve the problem mentioned above?
> --
> Regards,
> Kannan Ekanath
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

Kannan Ekanath
Alessandro,
I guess mails are flowing through the maililng list to my email. Yes I was using a "get". I have tried "post" and it sort of gives me the whole XML document and I can pick data from it. That brings me to this question. In my application

1) All auto-completes have been modelled as gets (Fields where entering partial values fetches a list of values), this sounds logical to me because the list of values returned *depends* purely on the value entered in the input box. I would also expect *only* that particular input box value to come through to the server. In the case i mentioned i expect just the partNumber to be sent to the server
2) All auto fills have been posts (Cases where you populate fields D, E and F based on what was entered in A, B and C), I would expect the whole document to be submitted in this case.

Are we supposed to use "POST" for case 1?

On 11/10/06, Alessandro Vernet <[hidden email]> wrote:
Kannan,

How is your XForms submission defined? In general, if you want to have
an instance sent to the server, you should <xforms:submission
method="post">. Could you be having this problem here because you have
method="get" in your submission.

Alex

On 11/8/06, [hidden email] <[hidden email] > wrote:

> Hi,
> I have a XForm, where I have a part number and item number. My model looks
> like,
> <xf:bind id="partNumber" nodeset="/a/bc/number"/>
> <xf:bind id="itemNumber" nodeset="/de/fg/number"/>
>
> Note that, the xpaths are same at the leaf which is "number", but the actual
> complete xpath is different.
>
> Now in the UI, both these fields have auto-complete (Pop up a set of values
> when partial values are entered), and the UI looks like,
>
> <xf:select1 bind="partNumber" id="machine-itemNumber" ...>
>        <xf:send submission="auto-complete-part-number"
> ev:event="xforms-value-changed" />
> </xf:select1>
>
> <xf:select1 bind="partNumber" id="machine-itemNumber" .../>
>         <xf:send submission="auto-complete-part-number"
> ev:event="xforms-value-changed" />
> </xf:select1>
>
> However, when the second item is entered, i can see a request to the server
> as follows (The below portion comes from xforms log)
> DEBUG processor.XFormsServer -
> org.orbeon.oxf.xforms.XFormsSubmissionUtils.doRegular
> (XFormsSubmissionUtils.java:154) XForms - opening URL connection for:
> http://localhost:8080/webapp/xforms/getSerialNumbers.action?type=XYZ&
> number=C123&number=C
>
> Note that the parameter number is sent twice. Can someone tell me how this
> can be prohibited? I changed the submission to use ref instead of a bind and
> the request doesnt even get sent to the server
>
> a) What is the difference between passing as ref and bind in a submit
> element?
> b) How can i solve the problem mentioned above?
> --
> Regards,
> Kannan Ekanath
>
> --
> 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





--
Regards,
Kannan Ekanath

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

Alessandro  Vernet
Administrator
On 11/9/06, [hidden email] <[hidden email]> wrote:
> 1) All auto-completes have been modelled as gets (Fields where entering
> partial values fetches a list of values), this sounds logical to me because
> the list of values returned *depends* purely on the value entered in the
> input box. I would also expect *only* that particular input box value to
> come through to the server. In the case i mentioned i expect just the
> partNumber to be sent to the server

Hi Kannan,

Are you referring to a submission you run to populate the
auto-complete drop-down, like in the Google Suggests example (linked
below)? For this you can use a GET or a POST. I would have a
preference for a GET, because you are passing a very small amount of
information to the server and the state on the server is not changed
in any way that is significant to the end-user.

http://www.orbeon.com/ops/goto-example/xforms-google-suggests

Alex
--
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
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

Kannan Ekanath
Hi Alessandro,
Thanks for the reply. Yes I am trying something similar to google suggest thing in XForms controls example.

So a GET is better. Now coming back to the old problem. If you have like 2-3 fields which have the same name like "a/b/number" and "d/e/number", then both values are going through as part of the request. (Refer the older mail for exact problem details and log messages of XFormSubmissionUtils).

In that case, is your advice to go with POST? Or there are any other alternatives that I can try :)

Regards,
Kannan

[older threads removed]


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

ToddG
OK so I found the doc for xxforms:format function. Following the example, I replaced the "when" reference in the file I gave you to this:

<xforms:output ref="when" xxforms:format ="format-date(xs:date(.), '[MNn] [D], [Y]', 'en', (), ())"/>

and I get the error "Control is no longer bound to a node. Cannot evaluate control display value."  I try this alternative for kicks:

<xforms:output value="when" xxforms:format ="format-date(xs:date(when), '[MNn] [D], [Y]', 'en', (), ())"/>

and get the ISO date unformatted in the display.  Thoughts?  Perhaps I could change the CSS to hide the extra space after the @ref output unless actually used.

 
On 11/13/06, [hidden email] <[hidden email] > wrote:
Hi Alessandro,
Thanks for the reply. Yes I am trying something similar to google suggest thing in XForms controls example.

So a GET is better. Now coming back to the old problem. If you have like 2-3 fields which have the same name like "a/b/number" and "d/e/number", then both values are going through as part of the request. (Refer the older mail for exact problem details and log messages of XFormSubmissionUtils).

In that case, is your advice to go with POST? Or there are any other alternatives that I can try :)

Regards,
Kannan

[older threads removed]


--
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: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.objectweb.org/wws" target="_blank">http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

Alessandro  Vernet
Administrator
In reply to this post by Kannan Ekanath
Hi Kannan,

If you have multiple elements with the same name "x", then like you
said they will be submitted as ?x=val1&x=val2. If the service you're
calling can't handle that, then you might be able to modify it so it
can handle this, or if you think it doesn't make sense to have
parameters like this on the URL, then use a POST. Or of course, you
can rename the element names in your instance so the same name is not
used more than once.

Alex

On 11/13/06, [hidden email] <[hidden email]> wrote:

> Hi Alessandro,
> Thanks for the reply. Yes I am trying something similar to google suggest
> thing in XForms controls example.
>
> So a GET is better. Now coming back to the old problem. If you have like 2-3
> fields which have the same name like "a/b/number" and "d/e/number", then
> both values are going through as part of the request. (Refer the older mail
> for exact problem details and log messages of XFormSubmissionUtils).
>
> In that case, is your advice to go with POST? Or there are any other
> alternatives that I can try :)
>
> Regards,
> Kannan
>
> [older threads removed]
>
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Two columns having same name at leaf node causes problems

Alessandro  Vernet
Administrator
In reply to this post by ToddG
Hi Todd,

Would you have a simple stand-alone XForms file that runs in the
sandbox and that we can use to reproduce this?

Alex

On 11/13/06, Todd Gochenour <[hidden email]> wrote:

> OK so I found the doc for xxforms:format function. Following the example, I
> replaced the "when" reference in the file I gave you to this:
>
>
> <xforms:output ref="when" xxforms:format ="format-date(xs:date(.), '[MNn]
> [D], [Y]', 'en', (), ())"/>
>
> and I get the error "Control is no longer bound to a node. Cannot evaluate
> control display value."  I try this alternative for kicks:
>
> <xforms:output value="when" xxforms:format ="format-date(xs:date(when),
> '[MNn] [D], [Y]', 'en', (), ())"/>and get the ISO date unformatted in the
> display.  Thoughts?  Perhaps I could change the CSS to hide the extra space
> after the @ref output unless actually used.
>
>
> On 11/13/06, [hidden email] <[hidden email] > wrote:
> >
> > Hi Alessandro,
> > Thanks for the reply. Yes I am trying something similar to google suggest
> thing in XForms controls example.
> >
> > So a GET is better. Now coming back to the old problem. If you have like
> 2-3 fields which have the same name like "a/b/number" and "d/e/number", then
> both values are going through as part of the request. (Refer the older mail
> for exact problem details and log messages of XFormSubmissionUtils).
> >
> > In that case, is your advice to go with POST? Or there are any other
> alternatives that I can try :)
> >
> > Regards,
> > Kannan
> >
> > [older threads removed]
> >
> >
> > --
> > 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
> >
> >
> >
>
>
>
> --
> 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