LoginSignup
1
1

More than 3 years have passed since last update.

visualforce でdivタグに xmlns を定義すると、なぜか表示されなくなったので解決した

Posted at

visualforcevue.js を使う際に、id付きのdivと一緒に xmlns: を定義すると、これ以降のoutputPanelがレンダリングされなくなった。

<apex:component >
  <apex:outputPanel rendered="false">
    <div id="xxx" xmlns:v-bind="http://vue.org" xmlns:v-on="http://vue.org">
      :
    </div>
  </apex:outputPanel>
  <apex:outputPanel rendered="true">
    <p>表示されない</p>
  </apex:outputPanel>
</apex:component>

原因は不明だけど、xmlns:の定義を別divで切り出すことで解決できました。

<apex:component >
  <apex:outputPanel rendered="false">
    <div id="xxx">
      <div xmlns:v-bind="http://vue.org" xmlns:v-on="http://vue.org">
        :
      </div>
    </div>
  </apex:outputPanel>
  <apex:outputPanel rendered="true">
    <p>表示される</p>
  </apex:outputPanel>
</apex:component>

原因やもっとよい解決方法がある場合は、教えて下さい...

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1