VAADIN page navigaion and validation - vaadin

In VAADIN, i tried many options for page navigation. Only Link component option is working. Creating new windows all the times won't be useful for building a large enterprise application. The problem with link component is when the user gives that link directly in the browser the page is coming. Is there any option for filtering the pages using filters and any xml's for checking and forwarding to correct page like struts-config or faces-config.xml?
Is there any option for cookie hanling, tampering and maintaining session between different tabs and windows?

Have you tried Navigator7 addon for navigation? link to navigator7 addon
You can create pages using #Page annotation and place components on it and navigate using page names and ids.

Related

OS X Server Wiki - How can I get the content of a wiki page to display on another wiki page

In just about any wiki server you can create a hyperlink to another page on the wiki. How can one create a window that pulls the other page's content into my page?
I can add a HTML Snippet with an iframe but it pulls an entire page not just the content?
The code for the javascript behind the page is not obfuscated but it seems to use Prototype and I don't understant it?
Has anyone had any experience with this?!
This can't be done reliably, one can create iframes and whitelisting the domains it points to but it just pulls the full page into a small window. It's completely unusable.
What I was looking for is called an "inclusion" or "transclusion" and OS X Server does not have the feature that is apparently standard in MediaWiki and has been for years.
More info here:
Wikis - Is there a wiki in which one can create, within a page, "windows" (partial frames) to other pages?

Response.Redirect in MVC 4 Mobile Application

I am developing a mobile web application using ASP.NET mvc 4. I am facing problem with response.redirect to some other website (eg: http://www.google.com) from my controller,it is showing "Error Loading Page" message without redirect.
I have tried the following codes to redirect under "About" action on Home controller:
return Redirect("http://www.google.com");
return RedirectResult("http://www.google.com");
response.Redirect("http://www.google.com");
All the above produced the same error.
Note: the hyperlinks in view pages are working fine
Thanks
When you are setting up your link to the controller...you need to make sure the data-ajax attribute is set to false.
Redirect
My understanding is that jQuery mobile wraps all anchor request in ajax, unless otherwise specified, and your response.redirect is just being served to the jQuery .done function which can't handle it properly.
http://jquerymobile.com/demos/1.2.0/docs/pages/page-navmodel.html
Important: rel="external" and $.mobile.ajaxEnabled=false
Slightly different implementations of the replaceState API in various
browsers can cause odd behavior in specific scenarios. For example,
some browser implementations (including desktop browsers) implement
the popstate event differently when linking externally and moving back
to a page onto which state has already been pushed/replaced. When
building a jQuery Mobile application where the Ajax navigation is
being explicitly disabled, either through the frequent use of
rel="external" on links or by disabling Ajax navigation completely via
the $.mobile.ajaxEnabled=false, we recommend disabling the pushState
feature to fall back to the hash based navigation for more consistent
behavior.
I suspect your problem is that you are redirecting outside local site.
See this part of the documentation: http://jquerymobile.com/test/docs/pages/page-navmodel.html
Hash values created by jQuery Mobile are normalized as full paths
relative to the URL of the first "real" page that was loaded.
Then later it confirms the "local" requirement here:
When a link is clicked, jQuery Mobile will make sure that the link is
referencing a local URL
I think the solution is to not redirect users to other domains.
UPDATE
The above solution highlights the wrong part of the problem but the solution may still be the same. You should use javascript to do the redirection such as:
window.location = 'http://www.google.com/';
I believe you will run into issues if your JQM solution is attempting to make an ajax call that is then redirecting. One issue, specifically for google.com, could be if you are signed in to google. It will then redirect you to https for example. That could be interfering with the JQM / window.location.hash.

How to update iframe page tab content using a form?

I am trying to pass data using a form to a Facebook iFrame page tab but can't seem to figure how to do it.
I have a page tab on my Facebook page with several elements such as links and images directing users to various pages on the main website. This is updated every week, so rather than update the HTML file and upload via FTP everyweek i would like to see if i can create a form to pass the new data to the iframe.
In addition the Facebook page tab cannot be created in PHP as the server is running ASP.NET
I am trying to do this without the use of a database table if possible, using POST or GET would be preferable.
If anyone knows of any tutorials or has any tips i would be very grateful.
Cheers
You can only pass content or interact with iframe content if it's on the same domain as the parent webpage that has the iframe. All browsers have a "same origin policy" that prevent you from being able to do that - sorry :(

Is it possible to use the jQueryUI dialog to pull in a HTML page similar to a traditional popup?

I'm trying to come up with a way to load a url, (https://tools.usps.com/go/ZipLookupAction!input.action in this case) in a jQueryUI dialog box instead of a traditional popup window.
So far, I've tried pulling in the page using an AJAX (AJAH :D) request, but each time, I get a status 200 but no data.
Here is the code from what I've tried: http://jsfiddle.net/Handyman/aXPU7/1/
I had thought that maybe the don't allow ajax requests to usps.com, but I tried a couple of my own sites with the same luck.
Is it even possible to do this without an iframe or a traditional style popup?
Might be easier to use a lightbox plugin like colorbox, jsFiddle.
$('#zipcode_lookup').colorbox({iframe:true, innerWidth:425, innerHeight:344});
Check out the Same Origin Policy.
In computing, the same origin policy is an important security concept for a number of browser-side programming languages, such as JavaScript. The policy permits scripts running on pages originating from the same site to access each other's methods and properties with no specific restrictions, but prevents access to most methods and properties across pages on different sites.
You would need to use JSONP or a proxy.

How to show Sharepoint Site Usage Statistics in a page?

What's the best way of showing site usage statistics in a page? I know I can view the stats from /_layouts/SpUsageSite.aspx and from designer also, but if I want to show this information in a customized way for a target audience, how can I show this data in a page? at least I need to show "recently visited pages".
You need to use the SharePoint class for return reports. See the SPUsage class on MSDN (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spusage.aspx)
thanks all but I solved my problem quite easily, I simply used
spweb.GetUsageData(SPUsageReportType, SPUsagePeriodType)
didn't know SPWeb has such method, its enough for my requirement.
thank you #Chris SPUsage is also one solution I think, I'll try it next time
From the SP main page, go to the Site Actions, Site Settings, Modify All Site Settings and then select site Usage reports under the Site Administration column.
Once the page loads and shows you the stats. copy the url out of the browser and then ad that to a List or annoucements and then add that to your page as a web part with a hyper link to the stats report.
you could also create a new web-page and then insert an I-frame object with the stats report url and then link the new page to the parent site using a List.

Resources