Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
97661 มุมมอง

Is it possible to only replace the attributes of an xml field in an xml view but not the full field?

Example:

<page string="Contacts" attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}" autofocus="autofocus">
...
</page>

All i want to change is the

attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}"

to

attrs=""

without replacing the full page field and all of its content!

So the problem is that i only know how to replace the full <page> filed with all of its content - so i would have to copy and paste all of the content of the page field to my new inherited view also - not a good way for me!

So is there a way to only change the attributes of a field (xml node) through an inherited view?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Use below approach 


<xpath expr="//page[@string='Contacts']" position="attributes">
       <attribute name="attrs"></attribute>
</xpath>
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
มี.ค. 15
6879
9
ส.ค. 20
3961
1
มี.ค. 15
5889
1
ก.ย. 15
4726
0
มี.ค. 15
4056