콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
97743 화면

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>
아바타
취소
관련 게시물 답글 화면 활동
3
3월 15
6913
9
8월 20
4016
1
3월 15
5901
1
9월 15
4766
0
3월 15
4103