Difficulties with Bootstrap and xmlns in forms

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

Difficulties with Bootstrap and xmlns in forms

John Preimonas-2
Hi again,
I think I have yet again struck the namespace issue in my Bootstrap/eXist form.

In my edit.xq I have set up some ‘select’s but the values are not coming through. Some of the code is as follows:


    <form class="form-horizontal" role="form" action="update.xq" method="post">
        <div class="panel-group">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <br /> <br />
                    <h1>{ $title }<small> Flight: {$flight/*:serialNo/text()}</small></h1>
                </div>
                <div class="panel-body">
   …etc…

                    <div class="form-group">
                        <label for="location" class="col-sm-2 control-label">Select T/O location:</label>
                        <div class="col-sm-10">
                        <select class="form-control" id="location">
                        {gFn:locationsList($flight/*:location/text())}
                        </select>
                        </div>
                    </div>
…etc…

The call to gFn:locations() is:
declare function gFn:locationsList($activeItem as xs:string) {
for $locations in collection(  '/db/apps/gliding/modules/data' || '/locations')//location
order by $locations/Location
return
if ($locations/Location/text() = $activeItem)
then
<option selected="selected">{ $locations/*:Location/text() }</option>
else
<option>{ $locations/*:Location/text() }</option>
};




In eXide the result looks as I expect it to be (screenshot follows)

However, when I open it in my application, I get the following (another screenshot). All of my selects appear empty, but I very well know they are populated correctly. They are just not being displayed.


When I download the page information, everything again looks correct, except for the xmlns which comes up blank. And that, I guess, is where my problem once again seems to lie.


Or is it something else that I am missing?

Thanks for your help.
Regards,
John




------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties with Bootstrap and xmlns in forms

Adam Retter
I wouldn't have thought that xmlns="" would be a problem unless the rest of your HTML is in a namespace, e.g. XHTML etc. Is it?

On 16 September 2015 at 11:14, John Preimonas <[hidden email]> wrote:
Hi again,
I think I have yet again struck the namespace issue in my Bootstrap/eXist form.

In my edit.xq I have set up some ‘select’s but the values are not coming through. Some of the code is as follows:


    <form class="form-horizontal" role="form" action="update.xq" method="post">
        <div class="panel-group">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <br /> <br />
                    <h1>{ $title }<small> Flight: {$flight/*:serialNo/text()}</small></h1>
                </div>
                <div class="panel-body">
   …etc…

                    <div class="form-group">
                        <label for="location" class="col-sm-2 control-label">Select T/O location:</label>
                        <div class="col-sm-10">
                        <select class="form-control" id="location">
                        {gFn:locationsList($flight/*:location/text())}
                        </select>
                        </div>
                    </div>
…etc…

The call to gFn:locations() is:
declare function gFn:locationsList($activeItem as xs:string) {
for $locations in collection(  '/db/apps/gliding/modules/data' || '/locations')//location
order by $locations/Location
return
if ($locations/Location/text() = $activeItem)
then
<option selected="selected">{ $locations/*:Location/text() }</option>
else
<option>{ $locations/*:Location/text() }</option>
};




In eXide the result looks as I expect it to be (screenshot follows)

However, when I open it in my application, I get the following (another screenshot). All of my selects appear empty, but I very well know they are populated correctly. They are just not being displayed.


When I download the page information, everything again looks correct, except for the xmlns which comes up blank. And that, I guess, is where my problem once again seems to lie.


Or is it something else that I am missing?

Thanks for your help.
Regards,
John




------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open




--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open