Hi Carla,

Below is some sample code (getters and setters omitted) on how to implement
dependent state choices, the fourth parameter of the update address action.
On the injected state service you have to write a filter or query which
returns the states for a given country.

Hope this helps.

Cheers,

Jeroen

~~~~


public class Address {

    private String addressLine;
    ...
    private String zip;
    ...
    private State state;
    ...
    private Country country;
    ...

    @DescribedAs("Update address")
    public Address updateAdress(
            final @Named("Adress line") String addressLine,
            final @Named("zip") String zip,
            final @Named("Country") Country country,
            final @Named("State") State state) {
        setAddressLine(addressLine);
        setZip(zip);
        setCountry(country);
        setState(state);
        return this;
    }

    public List<State> choices3UpdateAddress(
            final Country country) {
        return states.findByCountry(country);
    }

    ...

    private States states;

    public final void injectStates(final States states) {
        this.states = states
    }
}



On Tue, Oct 22, 2013 at 2:40 AM, Carla Pappalardo <
[email protected]> wrote:

>
>
>
>
>
>
>
>
>
>
>
>
> Hi everyone,
>
> I would be interested to use dependent drop-down list. Is it possible?
> I've been seen these example about Country/State[1], but I can't go on
> implementation.
>
>
>
>
> Can you guide me?,
>
>
> [1] https://issues.apache.org/jira/browse/ISIS-478
>
>
>
> Thanks!
>
>
>

Reply via email to