Hello, Alain.

I have xforms with
<xf:select1 ref="value_check" class="baseInput">
    <xf:itemset nodeset="../itemset/info/row">
        <xf:label ref="name" />
        <xf:value ref="uid" />
    </xf:itemset>
</xf:select1>

inside
xf:repeat element(line 327 in attached file).


When I click to checkbox the error message appears.(output from firebug
console):
TypeError: this.select.firstChild is null

if (!this.full && this.select.firstChild.value === "\xA0")
{(xsltforms.js (line 7250)

Thus results to an unexpected behaviour: clicking on one checkbox may
change value of another( from another repeat iteration).

Otherwise, when I delete select1 from repeat element everything works
properly.

Is itemset allowed inside repeat?

Would you be so kind to comment the behaviour?

BR, Alexander.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:ev="http://www.w3.org/2001/xml-events";
    xmlns:xsd="http://www.w3.org/2001/XMLschema"; xmlns:fs="http://www.curs.ru/ns/FormServer";
    xmlns:xf="http://www.w3.org/2002/xforms";>
    <head>
        <style type="text/css">
            .dateInput
            .xforms-value {
                width:120px !important;
                border:0px;
                padding:2px 0px 2px 0px;
                background-color:#E5F2FF;
                margin:2px 0px 0px 0px;
                min-height:13px;
            }
            .narrowInput
            .xforms-value {
                width:120px !important;
                border:0px;
                padding:2px 0px 2px 0px;
                background-color:#E5F2FF;
                margin:2px 0px 0px 0px;
                min-height:13px;
            }
            .control button {
                width:30px;
            }
            .baseSelectorInput
            .xforms-value {
                width:130px !important;
                border:0px;
                padding:2px 0px 2px 0px;
                background-color:#E5F2FF;
                margin:2px 0px 0px 0px;
                min-height:13px;
            }
            .baseSelectorInputL
            .xforms-value {
                width:225px !important;
                border:0px;
                padding:2px 0px 2px 0px;
                background-color:#E5F2FF;
                margin:2px 0px 0px 0px;
                min-height:13px;
            }
            .baseSelectorInputBig
            .xforms-value {
                width:300px !important;
                border:0px;
                padding:2px 0px 2px 0px;
                background-color:#E5F2FF;
                margin:2px 0px 0px 0px;
                min-height:13px;
            }
            .aid-button,
            .aid-button
            button {
                width:30px !important;
            }
            .xforms-invalid
            .xforms-alert {
                display:none !important;
            }
            .xforms-output .xforms-value {
                background-color:#FFF !important;
                border:0 none;
                display:block;
                margin:4px 2px;
                min-height:0px;
                padding:0;
                width:100%
            }
            .newbutton .blue button {
                width:150px
            }
            
	    table.monit_table {
		border: 1px solid #AAA;
		}

	    table.monit_table td{
		border: 1px solid #AAA;
		}

	    table.monit_table td textarea{
		min-height:1em;
		}

	    table.monit_table thead td{
		background-color: #5A8BC3;
		color: white;
		text-align: center;
		}



	   </style>
        <xf:model id="mainModel">
            <xf:instance id="mainInstance" xmlns="">
                <schema xmlns="">
                    <group>
                        <row>
                            <mac_uid>e089d1c0-3de6-11e2-bab5-dfb89d95d7de</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>c3784b0e-edf3-11e1-832a-cbb293d741bf</uidMonitoringParameter>
                            <mp_name>Код пациента (ФИОДДММГГГГ) </mp_name>
                            <value/>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment gdf </commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>05136632-3de7-11e2-96a7-d30fd8cfbff7</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>684c5328-edf4-11e1-8b2b-6bbf74673422</uidMonitoringParameter>
                            <mp_name>Информированное согласие (да/нет) </mp_name>
                            <value>valueeee</value>
                            <value_check>false</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684c5328-edf4-11e1-8b2b-6bbf74673422</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d3b416a-3de7-11e2-9089-b782bd48d34b</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>684eb578-edf4-11e1-a0dc-7bc370ee286c</uidMonitoringParameter>
                            <mp_name>Дата подписания ИС </mp_name>
                            <value>valueeee</value>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d400628-3de7-11e2-904d-5bf8204e5a85</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>685117c8-edf4-11e1-8bbe-bf051868def1</uidMonitoringParameter>
                            <mp_name>Первичная документация </mp_name>
                            <value>valueeee</value>
                            <value_check>832d29d6-405d-11e2-8c7f-93bea06c9c65</value_check>
                            <check_selection_lists_type>63a7d8a0-405c-11e2-8f41-5fc65a08bc89</check_selection_lists_type>
                            <commentValue>this is Первичная документация</commentValue>
                            <check_text>Есть и не ссответствует стандартам GCP</check_text>
                            <itemset>
                                <info>
                                    <row>
                                        <name>Есть и соответствует стандартам GCP</name>
                                        <uid>6dfcd408-405d-11e2-85e0-7ff533a8dab0</uid>
                                    </row>
                                    <row>
                                        <name>Есть и не ссответствует стандартам GCP</name>
                                        <uid>832d29d6-405d-11e2-8c7f-93bea06c9c65</uid>
                                    </row>
                                    <row>
                                        <name>Не предоставлена</name>
                                        <uid>a84831c0-405d-11e2-add9-abc4605b005c</uid>
                                    </row>
                                </info>
                            </itemset>
                        </row>
                        <row>
                            <mac_uid>8d44caf0-3de7-11e2-9272-47be7c1bb289</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>685117c8-edf4-11e1-94b3-dfedcb32e90b</uidMonitoringParameter>
                            <mp_name>Пол</mp_name>
                            <value>correct is 1</value>
                            <value_check>false</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d498fae-3de7-11e2-81c2-6375cef70dcb</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>68537a0e-edf4-11e1-8b90-bb574af4251e</uidMonitoringParameter>
                            <mp_name>Регион наблюдения</mp_name>
                            <value>valueeee</value>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d4bf212-3de7-11e2-bbfa-eb0a4eca835a</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>68537a0e-edf4-11e1-be10-87de2b3994ba</uidMonitoringParameter>
                            <mp_name>Город, населенный пункт</mp_name>
                            <value>valueeee</value>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d50b6d0-3de7-11e2-8af7-b7d7f078aa9c</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>6855dc5e-edf4-11e1-bfe9-c76248c9a834</uidMonitoringParameter>
                            <mp_name>Жизненный статус</mp_name>
                            <value>valueeee</value>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d557b98-3de7-11e2-abd4-77b58025c10a</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>6855dc5e-edf4-11e1-941d-978f27a0ad3b</uidMonitoringParameter>
                            <mp_name>Лечебное учреждение</mp_name>
                            <value>valueeee</value>
                            <value_check>false</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d57ddf2-3de7-11e2-b070-ababa23c89ec</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>68583eae-edf4-11e1-94b0-a39e939a3043</uidMonitoringParameter>
                            <mp_name>Доктор</mp_name>
                            <value>valueeee</value>
                            <value_check>false</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d5ca2ba-3de7-11e2-aa2e-df4374ba94d6</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>685aa0fe-edf4-11e1-90b8-df4829abfe39</uidMonitoringParameter>
                            <mp_name>Фаза на дату установления диагноза</mp_name>
                            <value>valueeee0</value>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>com6c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                        <row>
                            <mac_uid>8d616778-3de7-11e2-9dde-5f714d3927bf</mac_uid>
                            <uidMonitoringAct>33e5f7e8-3ddf-11e2-9899-17f90452f015</uidMonitoringAct>
                            <uidMonitoringParameter>685aa0fe-edf4-11e1-81a3-9b4a7004bd86</uidMonitoringParameter>
                            <mp_name>Дата диагноза</mp_name>
                            <value>valueeee1</value>
                            <value_check>true</value_check>
                            <check_selection_lists_type xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                            <commentValue>comment 684eb578-edf4-11e1-a0dc-7bc370ee286c</commentValue>
                            <check_text/>
                            <itemset xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                        </row>
                    </group>
                </schema>
            </xf:instance>


            <xf:bind>
                <xf:bind nodeset="/schema/group/row[./check_selection_lists_type='']/value_check"
                    type="boolean"
                    ></xf:bind>


                <xf:bind nodeset="/schema/group/row/commentValue"
                    required="if(../value_check='true',true(),false())"
                    ></xf:bind>


            </xf:bind>


        </xf:model>
    </head>
    <body>

    <pre style="font-size:12px;"><xf:output value="serialize(instance('mainInstance'))"></xf:output></pre> 

    <pre>Shema is valid:<xf:output value="is-valid(/schema/group)"> </xf:output></pre>                


	     <div style="width:600px; margin:0px; padding:0px;">
		<table class="monit_table">
		  <thead>
		   <tr>
			   <td>
				<p>Показатель</p>
			   </td>
			   <td>
				<p>Значение</p>
			   </td>
			   <td>
				<p>Значение ошибочно</p>
			   </td>
			   <td>
				<p>Примечание</p>
			   </td>
		   </tr>
		  </thead>
		  <tbody>
	           <xf:repeat id="rows" nodeset="/schema/group/row">
			   <tr>
				   <td>
					<p><xf:output value="mp_name"></xf:output></p>
				   </td>
				   <td>
					<p><xf:output value="value"></xf:output></p>
				   </td>
				   <td>
					<p>

						<xf:group ref=".[check_selection_lists_type='']">
							<xf:output value="value_check='true'"/>
							<xf:input ref="value_check"/>
						</xf:group>

						<xf:group ref=".[not(check_selection_lists_type='')]">

<!--
							<xf:group ref="value_check">
						           <xf:repeat id="rows3" nodeset="../itemset/info/row">
									<xf:output value="name"/>
									<xf:output value="uid"/>
						           </xf:repeat>
							</xf:group>
-->
								<xf:select1 ref="value_check" class="baseInput">

				                                        <xf:itemset nodeset="../itemset/info/row">
				                                                <xf:label ref="name" />
				                                                <xf:value ref="uid" />
				                                        </xf:itemset>

								</xf:select1>


						</xf:group>

					</p>
				   </td>
				   <td>
					<p>
			                   <xf:textarea  ref="commentValue" >
	                                   </xf:textarea>
					</p>
				   </td>
			   </tr>
	           </xf:repeat>
		  </tbody>
		</table>
	     </div>


        <div class="newbutton"
            style="margin-top:21px; margin-left:10px; padding: 2px;float: left;clear: both">
            <xf:trigger class="blue" id="Tab10">
                <xf:label>Сохранить и закрыть</xf:label>
                <xf:action ev:event="DOMActivate">
                    <xf:action if="is-valid(/schema) = false()">
                        <xf:message>Данные не сохранены. Форма содержит ошибки.</xf:message>
                    </xf:action>
                    <xf:action if="is-valid(/schema) = true()">
                        <xf:load
                            resource="javascript:gwtXFormSave('monit_act_card','save',  Writer.toString(xforms.defaultModel.getInstanceDocument('mainInstance')))"/>
                        <!--                        <xf:message>Данные сохранены</xf:message>
                        -->
                    </xf:action>
                </xf:action>
            </xf:trigger>
        </div>
        <div class="newbutton" style="margin-top:21px; padding: 2px;float: left;">
            <xf:trigger class="blue" id="Tab20">
                <xf:label>Закрыть</xf:label>
                <xf:action ev:event="DOMActivate">
                    <xf:load resource="javascript:gwtXFormFilter('monit_act_card','close', null)"/>
                </xf:action>
            </xf:trigger>
        </div>

    </body>
</html>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to