EGL editor warning [message #1704200] |
Sat, 08 August 2015 16:46 |
Arseniy Isakov Messages: 118 Registered: May 2012 |
Senior Member |
|
|
Hello
Recently I migrated to Epsilon 1.2. And egl editor shows me following message
"All loose statements and textual content after the first operation will be ignored at runtime."
Can you give me any suggestion how to avoid this warning.
Thanks
Arseniy Isaov
My template is :
[%@template
operation domain::OutputText treeContext(hash,value) {
%]
<p:inplace editor="true" event="dblclick">
[%=self.rw(hash,value)%]
</p:inplace>
[%
}
%]
[%@template
operation domain::OutputText tableContext(hash,value) {
%]
<p:cellEditor>
<f:facet name="output">
<span style="display: inline-block; width: 100%; height: 100%">
[%=self.ro(hash,value)%]
</span>
</f:facet>
<f:facet name="input">
[%=self.rw(hash,value)%]
</f:facet>
</p:cellEditor>
[%
}
%]
[%@template
operation domain::OutputText noContext(hash,value) {
%]
[%=self.rw(hash,value)%]
[%
}
%]
[%@template
operation domain::OutputText rw(hash,value) {
hash.put("readonly","true");
%]
<p:inputText [%=self.mkUIDBinding()%] value="[%=value%]" [%=self.uiElementAttributes(hash)%]>
[%=self.validator(hash)%]
[%=self.convertor(hash)%]
</p:inputText>
[%
hash.put("readonly",null);
}
%]
[%@template
operation domain::OutputText ro(hash,value) {
%]
<h:outputText value="[%=value%]" [%=self.uiElementAttributes(hash)%] >
[%=self.readOnlyConverter(hash)%]
</h:outputText>
[%
}
%]
|
|
|
Re: EGL editor warning [message #1704228 is a reply to message #1704200] |
Sun, 09 August 2015 10:17 |
|
This warning tries to prevent users from running into the common issue in which "X" wouldn't be printed. This is because we only run the code blocks up to the first operation (for historic reasons, I believe):
operation f() {
...
}
'X'.println();
In your case, perhaps removing the unnecessary [% %] between @template operation would help:
[%@template
operation domain::OutputText treeContext(hash,value) {
%]
<p:inplace editor="true" event="dblclick">
[%=self.rw(hash,value)%]
</p:inplace>
[%
}
@template
operation domain::OutputText tableContext(hash,value) {
%]
<p:cellEditor>
<f:facet name="output">
<span style="display: inline-block; width: 100%; height: 100%">
[%=self.ro(hash,value)%]
</span>
</f:facet>
<f:facet name="input">
[%=self.rw(hash,value)%]
</f:facet>
</p:cellEditor>
[%
}
@template
operation domain::OutputText noContext(hash,value) {
%]
[%=self.rw(hash,value)%]
[%
}
@template
operation domain::OutputText rw(hash,value) {
hash.put("readonly","true");
%]
<p:inputText [%=self.mkUIDBinding()%] value="[%=value%]" [%=self.uiElementAttributes(hash)%]>
[%=self.validator(hash)%]
[%=self.convertor(hash)%]
</p:inputText>
[%
hash.put("readonly",null);
}
@template
operation domain::OutputText ro(hash,value) {
%]
<h:outputText value="[%=value%]" [%=self.uiElementAttributes(hash)%] >
[%=self.readOnlyConverter(hash)%]
</h:outputText>
[%
}
%]
|
|
|
|
Re: EGL editor warning [message #1704241 is a reply to message #1704239] |
Sun, 09 August 2015 18:29 |
|
If I recall correctly, EGL source code is transformed into EOL, so the last bit after the closing %] might be producing an out.writeln() call that is creating that problem. Do you have anything after the closing %] at all (e.g. a newline character or any kind of whitespace)?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03034 seconds