开发者

How do I use the ADF propertyListener tag?

开发者 https://www.devze.com 2022-12-14 14:55 出处:网络
I have a class CustomerBean { Customer customer; public CustomerBean() {...} public getCustomer() {...} public void setCustomer(Customer c) {...}

I have a class

CustomerBean {
    Customer customer;
    public CustomerBean() {...}
    public getCustomer() {...}
    public void setCustomer(Customer c) {...}
    ...
}

When using normal JSF I can use a setPropertyLIstener tag (on say a commandLink) to update the customer property.

I'm trying to do the same thing with Oracle 开发者_运维技巧ADF, but failing. How do I specify a binding to a property on a data control? When I try to use Jdeveloper to do it it sets up an iterator for the customer variable, how do I declare and wire up a PropertyListener correctly?

Are there any-up-to date ADF resources I should know of? - a lot of ones I come accross use deprecated classes and methods.

Thanks in advance.


This should work.

  1. From the datacontrol panel, drag the setCustomer() method to the page and create it as a command link.
  2. Bind the customer argument to #{requestScope.customer}.
  3. Inside the commandLink, use setPropertyListener/setActionListener to put the customer into request scope.
  4. When the commandLink is clicked, ADF will pull the customer value from request scope and invoke the method.


How about Oracle's own ADF docs? The af:setPropertyListener is specified here.

0

精彩评论

暂无评论...
验证码 换一张
取 消