Search code examples
apache-flexflex3flex4flexbuilderflexigrid

Whitespace required before attribute error in my flex code


In my flex code I am getting error whitespace required before attribute what may be problem below is code

<components:DialogButton buttonLabel="okCaption" click="{dispatchOK(event);}" enabled="okEnabled" id="_DialogButtons_DialogButton1" includeInLayout="okCaption != """ visible="okCaption != """/>
<mx:Spacer id="_DialogButtons_Spacer1" includeInLayout="cancelCaption != """ width="4"/>
<components:DialogButton buttonLabel="cancelCaption" click="{dispatchCancel(event);}" enabled="cancelEnabled" id="_DialogButtons_DialogButton2" includeInLayout="cancelCaption != """ visible="cancelCaption != """/>
<mx:Spacer width="15"/>

Even on this code too I am getting error whitespace required before attribute below is code

<components:QuadStateImage click="{resetFilter();}" id="_FriendList_QuadStateImage1" right="7" sourceId="filterDelete" verticalCenter="0" visible="{StringUtil.trim(filterField.text) != ""StringUtil.trim(filterField.text) != "Search friends..."}"/>

Solution

  • includeInLayout="okCaption != """
    visible="cancelCaption != """
    

    Here, I think. Try

    includeInLayout="{okCaption != ''}"
    visible="{cancelCaption != ''}"