within af:resource
component in javascript, use of the &&
for comparison throws the following error:
Expected name instead of &
The second ampersand is highlighted with a wavy red u开发者_如何学Cnderscore when this error is thrown.
The sample code is shown below.
blnTargetRowReady = (targetIndex==1 && targetDestinationComponent.getValue()==null && targetOriginComponent.getValue()==null && targetSelectComponent.checked==false && targetDateComponent.getValue()!=null);
I notice when i subsitute the &&
with ||
this error does not occur.
Does anyone know why this error occurs on the page. The page runs fine when run in the browser, ie with the ampersand, but in JDeveloper the relevant page shows up with an error.
Any guidance you can provide i would appreciate it.
In your code, try to replace each ampersand with &
blnTargetRowReady = (targetIndex==1 && targetDestinationComponent.getValue()==null && targetOriginComponent.getValue()==null && targetSelectComponent.checked==false && targetDateComponent.getValue()!=null);
精彩评论