Ok, thanks for putting together that test case, I'll take a look tomorrow. Cheers, Dan On 24 Nov 2015 3:12 pm, "Vladimir Nišević" <[email protected]> wrote:
> Hi Dan, yes, that's exactly the problem. > > I have adapted the simple-app trying to show my problem: > https://github.com/niv0/isis > > Meanwhile I understood that my integration test was wrong - I haven't used > the wrapper. Now is my problem at least consistent through WebUI and > Integration test, but I still have it. > > To reproduce: > > 1. Start SampleAPP Webapp > 2. Create new simple object > 3. Execute action "Plan" on simple object (will add three steps of > specific subtype). Two steps will have a specifc properties. > 4. Exectute action "Execute" on simple object - status of first step > change to processing, but since properties are not loaded, business > logic > prevent it from doing (my problem) > > > > > Regs,Vladimir > > > 2015-11-23 16:30 GMT+01:00 Dan Haywood <[email protected]>: > > > If I understand you correctly, sounds as if the query that you are using > is > > only querying the supertype table, rather than doing left outer jobs for > > all subtypes. > > > > But in guessing here... perhaps you could share some code that > demonstrates > > the issue? > > On 23 Nov 2015 3:20 pm, "Vladimir Nišević" <[email protected]> wrote: > > > > > Hi Dan, when I execute the action on order the steps instances are > there, > > > but the values of its properites are definitely empty - I've checked it > > > thru debugging of webapp. When I open a view of single step, the values > > of > > > that step are there. > > > > > > I do not need to show additional values in a table, but have a problem > > with > > > business logic when executing an action which uses a data on single > step. > > > > > > Any idea? > > > Thanks, Vladimir > > > > > > > > > 2015-11-23 14:25 GMT+01:00 Dan Haywood <[email protected]>: > > > > > > > The objects are loaded, however the Wicket UI uses the compile time > > type > > > of > > > > the list to determine what columns to render. > > > > > > > > I could imagine us allowing some sort of hint for the framework to be > > > told > > > > to render the objects as per some other type (eg some "union > interface" > > > > that combines all desired properties). But that would be a new > > feature, I > > > > think. > > > > > > > > Dan. > > > > On 23 Nov 2015 1:16 pm, "Vladimir Nišević" <[email protected]> > wrote: > > > > > > > > > Hi, I have perhaps similar issue. > > > > > > > > > > I have an object (Order) which contains a list of objects can be > > > > different > > > > > type but all extend from the same superclass (Step). When I execute > > the > > > > > action on order thru wicket UI, the properties of concrete classes > > > > > StepType1 and StepType2 are not loaded. When I do the same thru > > > > > Intergration Test, the values are there? > > > > > > > > > > > > > > > *class Order{* > > > > > *.....* > > > > > *//region > steps (collection)* > > > > > *@Column(allowsNull = "true")* > > > > > *@Persistent(mappedBy = "order", defaultFetchGroup = "true")* > > > > > *private List<Step> steps = new ArrayList<>();* > > > > > > > > > > *@Collection(editing = Editing.DISABLED)* > > > > > *@CollectionLayout(render = RenderType.EAGERLY)* > > > > > *public List<Step> getSteps() {* > > > > > * return steps;* > > > > > *}* > > > > > > > > > > *public void setSteps(final List<Step> steps) {* > > > > > * this.steps = steps;* > > > > > *}* > > > > > *....* > > > > > *}* > > > > > > > > > > > > > > > *abstract class Step{* > > > > > *....* > > > > > *//region > order (property)* > > > > > *@Persistent(defaultFetchGroup = "true")* > > > > > *@Column(allowsNull = "false")* > > > > > *private Order order;* > > > > > > > > > > *@MemberOrder(name = "General", sequence = "1.1")* > > > > > *@PropertyLayout(named = "Order", hidden = Where.PARENTED_TABLES)* > > > > > *public Order getOrder() {* > > > > > * return order;* > > > > > *}* > > > > > > > > > > *public void setOrder(final Order order) {* > > > > > * this.order = order;* > > > > > *}* > > > > > *.....* > > > > > *}* > > > > > > > > > > > > > > > *class StepType1 extends Step{* > > > > > *//region > ipAdresse (property)* > > > > > *private String ipAdresse;* > > > > > > > > > > *@MemberOrder(sequence = "1")* > > > > > *@javax.jdo.annotations.Column(allowsNull = "true")* > > > > > *public String getIpAdresse() {* > > > > > * return ipAdresse;* > > > > > *}* > > > > > > > > > > *public void setIpAdresse(final String ipAdresse) {* > > > > > * this.ipAdresse = ipAdresse;* > > > > > *}* > > > > > *....* > > > > > *} * > > > > > > > > > > *class StepType2 extends Step{* > > > > > *....* > > > > > *private String dslam;* > > > > > > > > > > *@MemberOrder(name = "Output", sequence = "1.0")* > > > > > *@PropertyLayout(named = "DSLAM")* > > > > > *@javax.jdo.annotations.Column(allowsNull = "true")* > > > > > *public String getDslam() {* > > > > > * return dslam;* > > > > > *}* > > > > > > > > > > *public void setDslam(final String dslamId) {* > > > > > * this.dslam = dslamId;* > > > > > *}* > > > > > *.....* > > > > > *} * > > > > > > > > > > > > > > > > > > > > > > > > > 2015-11-22 15:23 GMT+01:00 Dan Haywood < > [email protected] > > >: > > > > > > > > > > > On 21 November 2015 at 22:01, Stephen Cameron < > > > > > [email protected]> > > > > > > wrote: > > > > > > > > > > > > > Actually, it already does have the behaviour that I wanted. > > > > > > > > > > > > > > > > > > > > OK, that's good to hear. > > > > > > > > > > > > > > > > > > > > > > > > > > I'll try individual icons for the subtypes and see if it uses > > them > > > > > > instead > > > > > > > of the one for the base-type. > > > > > > > > > > > > > > It should do. In the todoapp we use the similar cssClass() to > > > > return a > > > > > > CSS class name per instance, and then use application.css to > style > > > the > > > > > > different values. This is how individual rows within a table > show > > > some > > > > > > todo items "crossed-off", ie with a line through the centre. > The > > > > icons > > > > > > also vary on a case by case basis. > > > > > > > > > > > > Cheers > > > > > > Dan > > > > > > > > > > > > > > > > > > > > >
