我在使用Office js时遇到了麻烦,并且正在处理带有查找代码以及页眉和页脚的替换值的项目列表。我已经使身体正常工作,而不是页眉/页脚。我收到此错误:class X
{
private int A;
private int B;
public void setA(int A)
{this.A=A;}
public void setB(int B)
{this.B=B;}
public int getA( )
{return this.A;}
public int getB( )
{return this.B;}
}
class Z
{
private X a;
private X b;
public void setZA(X a)
{this.a=b;}
public void setZB(X a)
{this.b=b;}
public X getZA()
{return this.a;}
public X getZB( )
{return this.b;}
}
public class Start{
public static void main(String args[])
{
Z z1= new Z();
z1.setZA(z1.getZA().setA(11));
}
}
如您所见,在尝试访问结果之前,我确实调用了load和sync。
0x800a139e - JavaScript runtime error: The property 'items' is not available. Before reading the property's value, call the load method on the containing object and call "context.sync()" on the associated request context.
任何帮助将不胜感激。
答案 0 :(得分:0)
添加
context.load(mySections, 'items');
或
mySections.load('items');