problem with mode

I am trying to create a texteditor for a new language. For that i modified the “vb” mode. Now if I run the editor with just code mirror it works fine. But when i try to run codemirror using Primefaces extensions, the original “vb” mode is picked up. How can I solve this. I want my own modified mode should run.