smart gwt image upload - gwt

Is there a way to upload an image to the server using smart gwt? I noticed there isn't an image upload widget. Does anyone know of some open source code I could use to do this. Right now I'm using a regular upload form, that forces the page to reload.

I believe Smart does provide this functionality Upload.
The key is to use a hidden iframe page as the target so your app does not get reloaded.
This blog post seems to cover it.
For the JSNI on you hidden page in your app want something like:
public static native void uploadComplete() /*-{
$wnd.alert('Upload Complete');
}-*/;
Then on the hidden page specify in the body onLoad
window.parent.UploadComplete();

Related

Include/mashup a dynamic wicket page in a static webpage

we have a "static", non-wicket CMS website and we want to include a dynamic wicket page/component in one of the static pages. Our idea was to use jQuery's load() method to load the content. And include wickets ajax js files in the header.
This worked more or less. But to make it work, the base-url of the page had to be redirected to the ajax endpoint of the wicket server.
Our latest and best solution is to include the page in an iFrame.
Is there any more elegant way to do this?
We have a similar thing, but we have made it by using the exact opposite of you. We include html fragment of the static content via Wicket and render our component inside.
I think, including (rich dynamic) Wicket content via ajax call, from static page, can break native Wicket power, action flow in statefull pages.
Opposite strategy (from cedric.gatay) seems better.

Facebook Send button does not show up on Gwt popup panel?

I'm trying to get Facebook send or like button display on GWT popup panel and I am not successful. When inspecting the generated HTML, facebook HTML button looks properly inserted into but it just does not show up. Save Facebook button works well in html page (not on GWT panel).
Have you ever had success in displaying Facebook Send or Like or Share button in GWT? I know I ca implement FB Like button myself using API or other libraries. But I do it need that. I need standard Facebook Send button to be used in my GWT application.
Please advise me if you have experience and were successful.
Thank you very much!
I had a similar problem, and it was because, in the html file's script tag, I had changed and not updated the src="path" to a valid path. I had a wrong directory listed in the path. For me, it's correct now with:
<script type="text/javascript" src="clienttest/clienttest.nocache.js"></script>
I rebuilt, and the image appeared on the page. This problem was keeping the entry point module from loading.

titanium webview - go to default browser when clicking links

in titanium, i'm using the webview to display a wordpress blog page, that is already formatted for mobile browser. instead of writing my own interface, this works as a good work around. the apps sole focus isn't the browser.
but my issue lies, when the user clicks a link outside of the initial displayed domain. i only want the main domain to be displayed in the apps browser. if any other link is clicked, that takes the user outside of that domain, i want to have it open in the phones default browser.
can anyone point me in a direction for this. i tried adding a listener to try and catch link clicks, however, i've been unsuccessful.
thanks
in this blog posting I show how to find links in a webpage and change the link behavior. Using the same method, you can intercept the links and redirect to opening the URL in the devices default browser
One solution would be to catch the onclick() Event by Javascript inside the WebView (your blog code) and handle this by a custom handler. Maybe you can inject the javascript event handler code into the running WebView through Titanium.
Another solution is to make your blogposts readable for app technology and create a new data interface. This is the way I would do. For that I would use some kind of JSON data format and a simple REST Interface to get the data.
I don't think bove solutions are that simple. If you want an app with "great feeling", you'll have to handle the events by your own. Maybe Phonegap would be a better solution four your problem. But there you will still need a kind of REST/JSON interface for your blog data. The idea behind an app is, that the main code is in your app and you get the content from a remote source. This way you'll get an advantage compared to a simple browser optimized site.

How can I distribute a bookmarklet in FBML?

I have a JavaScript bookmarklet that I'd like fans of a certain page to take. Unfortunately, the only way I've found of distributing it is giving them the raw JavaScript source, which is then problematic to add as a bookmark.
Ideally, I'd use
Drag this to the bookmarks bar
But FBML filters out the JavaScript href.
Any advice?
If it is not possible using fbml, I would share a link to a web page where you put the actual bookmarklet. It is the opportunity to display on this page a tutorial on how install/use the bookmarklet.
Huh. Looks like dragging the bookmarklet in text form is sufficient to create a bookmark.

facebook-share popup not getting customized for an Iframe application created with DotNet Libraries

0 vote down star
I have a .aspx page and I am creating a Facebook iframe applcation and i want to implement the share functionality on my page by using which the facebook user is able to share the contents of my page on his/her wall I using the following code to achieve this functionality
function fbs_click()
{
u="http://apps.facebook.com/shareddatas/default.aspx/";
t=document.title;
alert(u);
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
-->
**
My problem is if in the javascript function fbs_click() if i use u = "http://www"DOT"google"DOT"com" then the google image and google customized content is coming properly but if i assign the value of u = "MYaPP#FACEBOOK" then i just get apps"DOT"facebook"DOT"com on my share.php popup and what ever customized content i want to share across doesn't appear on that
Is there is a way of customizing the share.php for iframe application if not then by what means can i achieve the functionality of sharing the contents available on my page on to my wall
The whole methodology for sharing/liking has changed. I would suggest you convert over to using the new Like Plugin: https://developers.facebook.com/docs/reference/plugins/like/