Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Problems with Jubula and possibly Spring(Autowired Function not Supported by Jubula?)
icon4.gif  Problems with Jubula and possibly Spring [message #1412550] Tue, 26 August 2014 12:33 Go to next message
Thomas Eberle is currently offline Thomas EberleFriend
Messages: 3
Registered: August 2014
Junior Member
Dear Jubula/Eclipse Community
My team and I are having a strange and not explainable problem with the pretty amazing tool Jubula. We are trying to object map our components, however the components can't be recognised by Jubula even though they get greenly rectangled (see the Jubula Manual).
As far as I know, in the documentation of Eclipse this phenomenon gets described as a not supported component problem and the recommended solution for this problem is to write an extension for Jubula. However we can proof that this is surely not the case as we a) have written and tried an extension without any success and b) have figured out that our components are supported by Jubula by simply writing another GUI application and map our custom components there.

That's why I will describe my problem here further with great hope that someone can help us:

First of all, we use the SwingX API ("Extended Swing", see org.jdesktop.swingx.*) for our application. In addition, most of our components extend this framework and, furthermore, this framework extends the basic Swing components. We have tested all of our components in single applications and we didnt have any problems with them. This means our components are supported in Jubula.

index.php/fa/18943/0/

Secondly we generate the production of our GUI by the usage of Spring features such as the Autowired function and by our own implementation. Therefore I made a mockup and small class diagram to demonstrate the structure of our GUI. Having a look at image "MockupMainFrame" you can see that we have a frame which contains a list of pages on the left hand side and a open and active page on the right hand side. The Page is a JXTitledPanel with a close Button as the "Right decoration" and the Page title as the title of the Panel. Inside the Panel (highlighted yellow) we have all our components contained in another panel. Each page contains the same toolbar (the buttons on top, "Acknowledge", "New", "Edit", "Save"...) and any custom components which differentiate each page. By regarding image "UML1" you can see that with our PageViewComponent we enable and disable our visibility of a Page via the showPage()-method.

index.php/fa/18944/0/


Here are a few snippets of code:
public class PageViewComponent extends JXTitledPanel{
	private final Map<Page, Container> activePages = Maps.newHashMap();
	private Page activePage;

	public void showPage(Page page) {
		setTitle(page.getName());
		JPanel content = new JPanel(new MigLayout("fill", "[fill]", "[fill]"));
		content.add(activePages.get(page));
		content.add(toolbar.getComponent(), "dock north");
		setContentContainer(content);
		setRightDecoration(closeButton);
		activePage = page;
		activePage.getPropertyChangeSupport().addPropertyChangeListener(this);
		activePage.getPropertyChangeSupport().firePropertyChange("visible", false, true);
	}


Every time a button on the left hand side gets clicked, an action invokes the method "showpage()" and shows the actual active page. The visibility of the old pages will be disabled. With this setup we are able to object map the title of the JXTitledPanel and the Right Decoration (in this case the closedButton), everything what is highlighted yellow in image "MockupMainFrame" however can't be mapped even though we get a green rectangle around every swing component.
Having a look at the following snippet:
	public JPanel getViewpanel() {
		if (viewComponent == null) {
			viewComponent = getApplicationContext().getBean				(View.class);
		}
		return (JPanel) viewComponent;
	}


You can see that we use the method getBean to create the JPanel viewComponent. The View class is individual for each page and contains all necessary swing components such as Tables, Textfields and other custom components for each page. All of these components - except usually Labels- are Autowired through spring.
So far we were able to test single pages as we combined them into single Java Applications. We also found out that apparently Jubula doesnt like the activePages map in the class PageViewComponent. As soon as we commented out those lines including the map and just added a single page, it worked completely fine.
As soon as we were then able to find a way to object map the page, we had trouble with the "autowired" components inside the page. We were able to object map labels without the autowired annotation, textfields containing the annotation however were not recognised by Jubula by object mapping them. However - very confusingly - in the "Properties" view of Jubula: As soon as we were able to object map one component (Label e.g.) inside the Viewpanel of a page, we are able to see other "non-object mappable" -components in the section "Context"- even the "Autowired" components.

To summarise all this mess, we make the following assumptions:
- Spring is not completely compatible with Jubula
- Jubula might have Timing issues with generated Pages like in our case

We there hope that we find someone in the community that had or has the same mysterious problems combining Spring (the Autowired function) and Jubula.

Any help would be appreciated, maybe the assumptions are right!
Thomas
Re: Problems with Jubula and possibly Spring [message #1412939 is a reply to message #1412550] Wed, 27 August 2014 11:58 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi there,

First of all - thank you for the work you've put into this description! This goes a bit beyond my realm of being able to help, but I'll see if one of the guys on the team can have a look.

Best regards,
Alex
Re: Problems with Jubula and possibly Spring [message #1413782 is a reply to message #1412939] Fri, 29 August 2014 12:06 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi again,

Just a quick update - we're not going to be able to look at this today, but I'll bring it up again on Monday. Have a great weekend!

Alex
Re: Problems with Jubula and possibly Spring [message #1414710 is a reply to message #1413782] Mon, 01 September 2014 05:54 Go to previous messageGo to next message
Thomas Eberle is currently offline Thomas EberleFriend
Messages: 3
Registered: August 2014
Junior Member
Thank you very much: Looking forward to the question! Smile
Re: Problems with Jubula and possibly Spring [message #1414711 is a reply to message #1414710] Mon, 01 September 2014 05:54 Go to previous messageGo to next message
Thomas Eberle is currently offline Thomas EberleFriend
Messages: 3
Registered: August 2014
Junior Member
*answer
Re: Problems with Jubula and possibly Spring [message #1414901 is a reply to message #1414711] Mon, 01 September 2014 15:09 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Thomas,

Thanks for your patience on this. I've spoken to a couple of team members now, and here's the information I've got:

It's nice that you phrase it as "Spring is not completely compatible with Jubula", but the truth is that the reverse is probably more applicable - Jubula is not completely compatible with Spring. We've never analysed or tested Jubula in a Spring context, which explains why there are errors such as green borders when there shouldn't be, and also that you are having problems.

If you'd be willing to upload / make available a small example application that shows the same behaviour as your own, then we'd take a look at it to get some more information. (You could also upload the rc swing logs for your current problem too). I can't promise that any analysis will happen very quickly if we do it in this way, because it's above and beyond what we would normally count as community assistance. We're also not Spring gurus.

If you want us to analyse the problem in a more detailed and timely way, then that's something you could contact us about separately (contact details are on testing.bredex.de). Based on your information and requirements, we'd be able to let you know what time frame an analysis would take.

If you want to talk about any options, I'm happy to do it via the forum, or you can ping us via the portal with your contact details and we'll get in touch. Another alternative would be to have a chat over a beer at EclipseCon if you're going to be there.

Best regards,
Alex
Previous Topic:Identifying the DSL editor in Jubula
Next Topic:EventHandler to loop on data until correct line is found
Goto Forum:
  


Current Time: Tue Apr 23 17:11:56 GMT 2024

Powered by FUDForum. Page generated in 0.02966 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top