Passing a parameter from EL ADF 11.1.1.7

Passing a parameter from EL (expression language) so that you can handle the current value considering that you have a table and for each row you have to enable or disable a button based on the parameter provided.

-Code in the fragment.

<af:column sortable=”false” headerText=”Actions” id=”c5″>
<af:commandButton text=”ADD” id=”cb3″
disabled=”#{pageFlowScope.taskDetailsBean.showBtn[row.Id] eq ‘false’}”/>
</af:column>

-Code in managed bean

public Map getShowBtn() {
return new HashMap<Long, String>() {
@Override
public String get(Object key) {
Number id = (Number)key;
if (processSelected.contains(id))
return “false”;
else
return “true”;
}
};
}

This is only for ADF 11, currently in 12c it’s much simple,

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s