I have a simple question that lead to a larger question. I have an OverlayPanel and have to guess what the "hideEvent" option is. The documentation doesn't give out that detail. I downloaded the source and have been filtering through that but so far have been unable to find any list.
Where can I find a list of what the available options are for a primefaces argument when it's not in the documentation?
It's any standard HTML DOM event, just part of basic HTML. You know, JSF is merely a HTML code generator.
Related
In a xpages application I need to mount a label with a certain layout, analogous to the layout of a ticket. Searching, I have verified that the most used practice is to use openoffice to design the odt model and in java to use bilbiotec to JOD Reports. Do you advise to follow this line yourself, or do you have any suggestions?
I would concur with Marcus. The way forward is PDF output. There are a couple of ways to do this, depending on your constraints.
When user must design every aspect of the ticket using openoffice is a suitable approach, however you need a headless openoffice install for the rendering
If everything can be code, then PDFBox is a good way to go. Wrap your code into a managed bean
The middle path would be XSL:FO and Apache FOP. It allows alteration of the layout by providing a different style sheet. I wrote an article series outlining that approach.
Let us know what works for you!
There is also the POI4XPages plugin. You could design your form with Word and then use placeholders to populate the document and output as a pdf.
See https://poi4xpages.openntf.org/main.nsf/project.xsp?r=project/POI%204%20XPages/releases/E80C4FC9FB07E1E4852580E3006E02C7
Download the latest version (1.4) at http://p2.openntf.org/repository.nsf/home.xsp/poi4xpages/snapshots
Howard
I was able to solve my problem, because I discovered that here in the company there is the abcpdf software. Through a web service that uses the APis of this software, I pass the html code of the ticket and the web service returns the pdf document in an array of bytes. I created a managed javabean to consume the web service and display the pdf in the browser.
Thanks to all who have contributed in some way with suggestions.
I'm using titanium webviews to open an internal html page that I need to internationalize. This seems a rather basic need, but I can't seem to find the right documentation on how to accomplish it. This guide (https://wiki.appcelerator.org/display/guides2/Internationalization) points out how to use internationalization from app.js, but as I need to have it in my html I was wondering on the best way to do it. I was thinking on grabbing the onload event and populate the html with translated strings, but then, how do I obtain the html elements that should be translated? From my investigations it seems that I cannot use jQuery dom manipulation from within app.js..
Any help?
I am going to take Microsoft 70-486 (MVC) exam. So i am preparing for it. Came across one most important question asking in 70-486 exam but the answer is different across web, Please help to choose the correct answer.
Question
You are designing an HTML5 website. You need to design the interface to make the content of the web page viewable in all types of browsers, including voice recognition software, screen readers, and reading pens. What should you do?
Annotate HTML5 content elements with Accessible Rich Internet
Application (ARIA) attributes.
Convert HTML5 forms to XForms.
Ensure that HTML5 content elements
have valid and descriptive names.
Use HTML5 semantic markup elements
to enhance the pages.
Use Resource Description Framework (RDF) to
describe content elements throughout the entire page.
In some website it is mentioned as AD is correct answer check this enter link description here and others mentioned ABCD is correct answer check this enter link description here. I am confused between this 2 ans.
I would say that the correct answers are :
Annotate HTML5 content elements with Accessible Rich Internet Application (ARIA) attributes : It is the primary role of the aria attributes !
Use HTML5 semantic markup elements to enhance the pages : To help the screen readers to know that an element is a nav, an article...
Ensure that HTML5 content elements have valid and descriptive names : i.e. to help the screen readers to know that an input is the "FirstName", and not just a "Text input", a better approach is to use a label for the inputs, but after reading this article, it seems that only few screen readers manage the label element.
I'm gonna correct Djoul6's answer a bit.
Ensure that HTML5 content elements have valid and descriptive names.
This is not a correct answer. the name attribute can be whatever, screen readers do not read the name attribute out loud. From the source Djoul6 refered to there was this description. http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html#namedef
name
text by which software can identify a component within Web
content to the user
Note 1: The name may be hidden and only exposed by
assistive technology, whereas a label is presented to all users. In
many (but not all) cases, the label and the name are the same.
Note 2: This is unrelated to the name attribute in HTML.
The correct answer should be
Annotate HTML5 content elements with Accessible Rich Internet Application (ARIA) attributes.
Use HTML5 semantic markup elements to enhance the pages.
So, correct answers:
Annotate HTML5 content elements with Accessible Rich Internet
Application (ARIA) attributes.
Use Resource Description Framework (RDF) to describe content elements
throughout the entire page.
Please note that the correct answer should be a complete solution for Accessible web application. HTML5 semantic markup cannot be complete solution, this only enhance the pages, also XForms cannot, and even not valid and descriptive names..
I think no question about ARIA attributes, but you can read about RDF - https://www.w3.org/TR/wai-aria/roles
For futher investigation please reffer W3C WAI-ARIA.
My understanding of HTML5 is that its semantic markup is meant to make it readable across browsers and readers. That would point to the 4th answer.
I am currently trying to write a custom plugin for nutch 1.0. This plugin is supposed to parse html data and filter out relevant information from documents. I have a basic plugin working, it extends the HtmlParserResult object and is executed each time I do a parse.
My problems are two faced at the moment:
I do not understand the workflow/pipline of the nutch parsing good enough. I do not find the information about this on the nutch site.
I do not understand how the DOM parsing is done, I see that Nutch have set of DOM objects and that the HtmlParser plugin does some DOM parsing, still I have not figured out how this is best done.
I remember making a nutch HTML parsing plugin for a past work. I don't have access to how I did it exactly, but here are the basic points. We wanted to do the following:
parse an HTML page but conditionally use a H1 tag or a tag with a certain class as the page title rather than the actual //html/head/title
There were some special pieces of data that were sometimes on the page (ie what tab was selected, which would tell us if this was a retail customer, a bank customer, or a corporate customer).
etc.
What I did was just find the html-parse plugin class (I'm having trouble finding the actual class name), and extend it. Then override the parsing function. The new function should call the super function and then can walk the DOM tree to find the special data you are looking for. In my case I'd look for a better title and then override the value that the super function came up with.
For your second question, I'm not clear what you are asking about. I think you are asking what happens when the DOM isn't well formed? I would just dig through the nutch code (http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.nutch/nutch/1.3/) and find out how the parsing is done (i'm sure they use a library to do it). That should tell you more about if things are greedy, or what.
Holler if you have questions.
I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this.
I've used the print style sheet
here's and article http://alistapart.com/stories/goingtoprint/ that will go through the way to set that up. Rather than setting up a special page that would need to be maintained as well.
If you just need to print your web page from the client-side use window.print(). Sample could be found here: http://www.javascriptkit.com/howto/newtech2.shtml. I would suggest preparing a special version of your page first with no dynamic content and with a layout which would look nice on print.
If you need to send something to printer on the server-side that would be a little bit more complicated. Check out this MSDN article on how to do the basic printing.
The browser prints your pages. If you need to tweak the page so it looks better on the printer, use CSS #media selectors.
Restating what others have said, you just need to call window.print() in javascript. That and build a separate css for print.