Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

循环中回调action的编译问题 #40

Open
marcogu opened this issue Nov 26, 2011 · 0 comments
Open

循环中回调action的编译问题 #40

marcogu opened this issue Nov 26, 2011 · 0 comments

Comments

@marcogu
Copy link

marcogu commented Nov 26, 2011

在项目中遇到一个问题:如果在模板中有一个循环,循环体中只做一件事:回调action。此时编译的结果不是所期望的,我将例子简化如下:

在controller中有两个action:
public class JapidTestController extends JapidController {
public static void view1() {
renderJapid();
}
public static void willBeTempalteInvoke() {
renderJapid();
}
}

view1 模板的代码如下:

can not be invoke? `for(int i=0; i<10; i++){ `a JapidTestController.willBeTempalteInvoke() `}

此时view1模板的编译结果为:
@OverRide
protected void doLayout() {
//------
p("\n" +
"\n" +
"\n" +
"can not be invoke?\n");// line 1
for (int i = 0; i < 10; i++) {// line 5
------期望这里出现回调,可是没有--------------------------
}// line 7
p("\n" +
"\n");// line 7

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant