Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » SWT toolbar in Riena(Problem with binding data)
SWT toolbar in Riena [message #529938] Tue, 27 April 2010 18:42
Amel Jakupovic is currently offline Amel JakupovicFriend
Messages: 64
Registered: March 2010
Member
Hello to everybody,

we have riena application and from main View we call Dialog, from that Dialog we call third dialog.

On third dialog there is a toolbar, groupbox with textbox.

If we put some text in that textbox and make click on toolbar in our controller we don't see value from textbox, but if I click second time, than I see value in Controller.

It's bug or I don't see something.

If I use button everything is good.

viewClass:


//toolbar
	coolBar = new CoolBar(composite, SWT.FLAT);
		toolBar = new ToolBar(coolBar, SWT.RIGHT | SWT.FLAT);
		coolBar.setBackground(LnfManager.getLnf().getColor(LnfKeyConstants.SUB_MODULE_BACKGROUND));
		
		toolBar.setBackground(LnfManager.getLnf().getColor(LnfKeyConstants.SUB_MODULE_BACKGROUND));
				
		snimiButton = new ToolItem (toolBar, SWT.PUSH);
		snimiButton.setEnabled(false);
		snimiButton.setText("Snimi");
		snimiButton.setToolTipText("Snimi sve veze s vanjskim poslovnim partnerima");
		snimiButton.setImage(ImageStore.getInstance().getImage(ApplIcons.ICON_SNIMI));
		snimiButton.setHotImage(ImageStore.getInstance().getImage(ApplIcons.ICON_SNIMI));
		
		addUIControl(snimiButton, "snimiButton");



//textbox
Text textPoslovni = UIControlsFactory.createText(result, SWT.LEFT,
				"textPoslovni"); //$NON-NLS-1$
		
		

		hFill.applyTo(textPoslovni);
		addUIControl(textPoslovni, "textPoslovni");


//controller

companyName = ((ITextRidget) getRidget("textPoslovni"));
		companyName.setMandatory(true);


DataBindingContext dbc = new DataBindingContext();
		dbc.bindValue(BeansObservables.observeValue(companyName, ITextRidget.PROPERTY_TEXT), BeansObservables
				.observeValue(compForUpdate, "name"), null, null);


IToolItemRidget buttonTollbarSnimi = (IToolItemRidget) getRidget("snimiButton");
		 IToolItemRidget buttonTollbarOdustani = (IToolItemRidget)
	 getRidget("odustaniButton");

		buttonTollbarSnimi.addListener(new IActionListener() {
			public void callback() {
				try {
					System.out.println(compForUpdate.getName()) //First time nothing, second time we have value
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
					showMessage(e);
				}
			}
		});






thanks
Previous Topic:Submodules closeable ?
Next Topic:SWT toolbar in Riena
Goto Forum:
  


Current Time: Fri Apr 19 14:00:34 GMT 2024

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

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

Back to the top