简体   繁体   English

来自其他顶点 class 的方法()到 VF 页面

[英]method() from other apex class in to VF page

Can we use method() from other apex classes into the VF page directly and by not using the controller of that VF page?我们可以直接使用来自其他顶点类的方法()进入 VF 页面,而不是使用该 VF 页面的 controller 吗?

In Java, we can use package and do so, but I have no idea what to do with the apex and Vf page.在 Java 中,我们可以使用 package 并这样做,但我不知道如何处理顶点和 Vf 页面。

I would be thankful if anyone with the knowledge can help me out with this doubt.如果有知识的人可以帮助我解决这个疑问,我将不胜感激。

Yes, you can use method() from another controller on your visualforce page, if method() is part of a global class.是的,如果method()是全局 class 的一部分,您可以在您的 visualforce 页面上使用来自另一个 controller 的 method method() )。 See Apex Class Definition and When to use public, private, global请参阅Apex Class 定义何时使用公共、私有、全局

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM