Issue with custom XBL + relevant

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

Issue with custom XBL + relevant

Binesh Gummadi
This post was updated on .
<xforms:bind nodeset="instance('instance')">
  <xforms:bind nodeset="./newsBlockOne/newsItems/newsItem" relevant="instance('instance')/newsBlockOne/type = 'manual' "/>                           
  <xforms:bind nodeset="./newsBlockOne/newsItems/newsItem/title" />
  <xforms:bind nodeset="./newsBlockOne/newsItems/newsItem/description" />
  <xforms:bind nodeset="./newsBlockOne/newsItems/newsItem/items/item" />
</xforms:bind>

## xform
<div class="citrix-xforms-widget-wrapper">
        <fr:dropdown-simple ref="instance('instance')/newsBlockOne/type">
                <xforms:label>News Block One:</xforms:label>
                <xforms:hint>Auto-Fill selects the 3 latest news</xforms:hint>
                                               
                <xforms:itemset nodeset="instance('common-type-instance')/item">
    <xforms:label ref="./@label"/>
    <xforms:value ref="./@value"/>
        </xforms:itemset>
       
        </fr:dropdown-simple>
</div>                                           
<div class="citrix-xforms-widget-wrapper">
        <fr:repeated-group
                groupName="News Block One"
                nodeset="instance('instance')/newsBlockOne/newsItems/newsItem"
                origin="instance('news-proto-property')"
                context="instance('instance')/newsBlockOne/newsItems"
                min="1" max="4">
               
                <div class="citrix-xforms-widget-wrapper">
                                <fr:input-counted ref="instance('instance')/newsBlockOne/newsItems/newsItem/title" max="50">
                                <xforms:label>Title:</xforms:label>
                                <xforms:alert>Title is a required field</xforms:alert>                                                               
                                </fr:input-counted>

    </div>
        </fr:repeated-group>
</div>

##This is from input-counted.xbl. We are using this variable in js to limit the input.
<xsl:copy-of select="xxbl:parameter(., 'max')" />

##This is from input-counted.js
var maxCount = YDOM.getElementsByClassName("xbl-fr-input-counted-max", null, this.container)[0].innerHTML;

This variable is initialized and works if I do not have relevant attribute in binding. But due to the relevancy, input-counted control is not displayed initially and I am confused as why repeated-group control is processed when it is not relevant. By processed I mean init() javascript function is called and I see the right DOM elements of course without values.

When I use drop down to change the relevancy I see the input-counted control as expected but control is missing the "max" value.

What am I missing?
Reply | Threaded
Open this post in threaded view
|

Re: Issue with custom XBL + relevant

Binesh Gummadi
I do see the max value rendered(as a hidden span) when I change the drop down and select the right value to make the repeated-group control relevant. Problem is repeated-group component is already initialized and during initialization it couldn't find the max value.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Issue with custom XBL + relevant

Alessandro  Vernet
Administrator
Binesh,

How are you calling your JavaScript init()? In general, you would do this with:

<xforms:action id="xf-en" ev:event="xforms-enabled">
    <xxforms:script>YAHOO.xbl.fr.Recaptcha.instance(this).init();</xxforms:script>
</xforms:action>

I double checked, and in the case I was looking at, this wasn't called
if the component is not relevant when the page loads. If
xforms-enabled is dispatched in your case, and you feel you are doing
the right thing, could you create a minimal reproducible example that
shows this? (You can have the XBL definition and usage in the same
file, as in the one attached.)

Alex

On Thu, Jul 15, 2010 at 4:33 AM, Binesh Gummadi <[hidden email]> wrote:

>
> I do see the max value rendered(as a hidden span) when I change the drop down
> and select the right value to make the repeated-group control relevant.
> Problem is repeated-group component is already initialized and during
> initialization it couldn't find the max value.
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Issue-with-custom-XBL-relevant-tp2289977p2290001.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


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

20100912-xbl-scope-id.xhtml (2K) Download Attachment
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with custom XBL + relevant

Binesh Gummadi
In reply to this post by Binesh Gummadi
Here you go Alex. Finally I was able to strip out LOT of details and attached a simple xhtml and a js file. You might have to modify the js file location.

I used firebug and added a break point in line 23 and even though repeated-group is not relevant I see that being initialized.

Thank You

repeated-group.js
repeated-group.xhtml
Reply | Threaded
Open this post in threaded view
|

Re: Re: Issue with custom XBL + relevant

Alessandro  Vernet
Administrator
Binesh,

I am running the your example and see that init() is indeed called.
But you have a <fr:repeated-group> in your view, which is not in a
non-relevant group or hidden case, so the control does "exist", and
xforms-enabled should be called. Am I missing something?

Alex

On Fri, Jul 16, 2010 at 2:02 PM, Binesh Gummadi <[hidden email]> wrote:

>
> Here you go Alex. Finally I was able to strip out LOT of details and attached
> a simple xhtml and js files. You might have to modify the js file location.
>
> I used firebug and added a break point in line 23 and even though
> repeated-group is not relevant I see that being initialized.
>
> Thank You
>
> http://orbeon-forms-ops-users.24843.n4.nabble.com/file/n2291946/repeated-group.js
> repeated-group.js
> http://orbeon-forms-ops-users.24843.n4.nabble.com/file/n2291946/repeated-group.xhtml
> repeated-group.xhtml
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Issue-with-custom-XBL-relevant-tp2289977p2291946.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Issue with custom XBL + relevant

Binesh Gummadi
Unless the binding is wrong I do have a bind with relevant which checks the value of the dropdown.

<xforms:bind
        nodeset="instance('instance')/groups[@name='ctx-pdl:downloadComponent']/group[@name='ctx-core:group']"
        relevant="instance('instance')/type = 'manual'" />

Repeat group control is not diplayed until you select the dropdown. Even though it is initialized it is not displayed due to relevancy.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Issue with custom XBL + relevant

Alessandro  Vernet
Administrator
Binesh,

The <xforms:bind> makes the groups/group non-relevant, and you point
to that groups/group with the nodeset attribute on
<fr:repeated-group>. But the <xforms:group> on which you listen for
xforms-enabled, you copy the "model context ref bind" attributes, and
those attribute don't point to the groups/group, so that
<xforms:group> will be relevant (even if the <xforms:repeat> a few
lines lower isn't).

Alex

On Tue, Jul 20, 2010 at 5:27 PM, Binesh Gummadi <[hidden email]> wrote:

>
> Unless the binding is wrong I do have a bind with relevant which checks the
> value of the dropdown.
>
> <xforms:bind
>
> nodeset="instance('instance')/groups[@name='ctx-pdl:downloadComponent']/group[@name='ctx-core:group']"
>        relevant="instance('instance')/type = 'manual'" />
>
> Repeat group control is not diplayed until you select the dropdown. Even
> though it is initialized it is not displayed due to relevancy.
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Issue-with-custom-XBL-relevant-tp2289977p2296464.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Issue with custom XBL + relevant

Binesh Gummadi
I see whats going on. I should either provide the right ref to the repeated-group control or change the xbl:attr of the group to match the binding. Thank You.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Issue with custom XBL + relevant

Alessandro  Vernet
Administrator
Binesh,

You're welcome. XBL is powerful but can be tricky, as anything that
adds one level of indirection.

Alex

On Tue, Jul 20, 2010 at 7:31 PM, Binesh Gummadi <[hidden email]> wrote:

>
> I see whats going on. I should either provide the right ref to the
> repeated-group control or change the xbl:attr of the group to match the
> binding. Thank You.
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Issue-with-custom-XBL-relevant-tp2289977p2296536.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Re: Re: Issue with custom XBL + relevant

pappleby
Out of Office AutoReply: Re: Re: Issue with custom XBL + relevant

I am out of the office until 26th July

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG