Reindeer.BUTTON_LINK in Vaadin 8 - vaadin

I am trying to have button which looks like a link in Vaadin 8.2.0. I am developing in Netbeans 8.2. I found this piece of code:
Button btn = new Button("Click Here");
btn.setStyleName(Reindeer.BUTTON_LINK);
But, it seems that in Vaadin 8 there is not such a Reindeer class. Is there any alternative?

Alternatively: ValoTheme.BUTTON_LINK
See Javadoc.

BaseTheme.LINK_STYLE should work in v8

Related

In electron 4.0.1 how do you hide the menu bar under linux

In electron 1.8.7 I could just do this:
.on('browser-window-created', (e, window) => {
window.setMenu(null);
})
But in electron 4.0.1 this doesn't seem to work anymore.
It should work the same way, but looks like there's a bug in Electron (https://github.com/electron/electron/issues/15901). A workaround is suggested in the comments: Set autoHideMenuBar-option to true when creating the BrowserWindow-object. Unfortunately that will still show the menu when alt key is pressed.
Edit: There's a better workaround. Use BrowserWindow.setMenuBarVisibility(false).
Alternatively, you can try Electron version 3.

jQuery UI 1.8.13 sudden error

We have been using Jquery from this link http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js for drag and drop. Suddenly we notice it is not working now and there is no code change done our side. We notice the error is pointing to these line and error is TypeError: a.curCSS is not a function? What will be solution to this problem?
e&&e.call(i)},g)}):this._focus.apply(this,arguments)},scrollParent:function(){var g;g=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter
This javascript error is caused by jQuery and jQueryUI being out of sync with each other. Rather than go back to an older version of jQuery, I would update jQuery UI. This link from the jQueryUI blog talks about support for the latest version jQuery. I experienced the same error before updating jQuery UI.
Base on another answer... I did something slightly different...
Instead of replacing:
$.curCSS(element, attrib, val);
with:
$(element).css(attrib, val);
I created a new function:
$.curCSS = function (element, attrib, val) {
$(element).css(attrib, val);
};
$.curCSS: This method is simply an alias for jQuery.css() from jQuery 1.3 onward. Although it has never been part of the documented API, some external code has been known to use it, perhaps thinking it was “more efficient.” Now it’s “more gone.” - from the page here.
This error can occur by using curCSS also.
replace:
$.curCSS(element, attrib, val);
with
$(element).css(attrib, val);
I had same problemm. Search for a link like this in your project:
https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
and change it with this:
https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
It worked for me.

setOnClickListner

I am totally new to Android development , recently i bought Lynda.com Android App Development video learning course.
I am facing following problem:
Created new project
Created new xml file with text field only
Then go to Main.xml(that was created by defualt) and replace the default text field with button.
Then go to Main.Java and try calling added button by code "Button b = (Button) findViewById(android.R.id.button1);"
After that I tried to call the setOnClickListner function by " b. " but there is no option with
name of setOnClickListner.
I follow the exact steps as told by tutor in videos .. I am using Android SDK 12 ,Eclipse Indigo and working on Gingerbread 2.3.3. Any solution in this regard would be appreciated
Possible situations:
Make sure you imported android.widget.Button
"Button b = (Button) findViewById(android.R.id.button1);"
Usually it is called:
"Button b = (Button) findViewById(R.id.button1);"
if you have defined the button correctly in the main.xml file. Also make sure you are not importing android.R
I suppose it is a typo but it is actually written setOnClickListener()
Cheers

Fill textarea using spynner

Is it possible to fill the textarea using spynner? How can I do it?
I try this:
sb.fill("textarea[name=NAME]","TEXT")
But it doesn't work.
Please, help me.
Ok I found the solution, I'm using the webkit fill:
wk_fill("textarea[name=NAME]","TEXT")

power function in blackberry

I desperately need a solution for this... I m using Blackberry JDE 5.0. In documentation it shows net.rim.device.api.util.MathUtilities.pow ( double double ) is added form 4.6. But i couldnt get pow function when i use Math.pow().
I need to get this value...float fSecondFactor=(float) (Math.pow(1+fRatePerMonth,fNumberofMonths)-1);
Can anyone tell me how to achieve this...Plzz....
i blogged about this a while ago- posted a link there to a good article on it
http://bryanallott.net/blog/2010/01/to-the-power-of-by-hand.html
Thanks MAX for ur support.... as you said, MathUtilities.pow, instead of Math.pow worked...

Resources