Sad day for manufacturers and consumers of ‘rectangular devices with round corners’

Samsung have said the final court ruling in the patent case with Apple is ‘a loss for the American consumer’, and I can’t help but agree.

In a statement after the ruling, Samsung continue:

“It is unfortunate that patent law can be manipulated to give one company a monopoly over rectangles with rounded corners, or technology that is being improved every day by Samsung and other companies”

That one statement for me sums up the ridiculous nature of his patent lawsuit. So what next, is Apple going to continue to sue every other phone manufacturer who manufacturers a device that is essentially a rectangle with rounded corners? To avoid infringing on Apple’s patents on rectangles, all other phones must be square, or circular, or any other shape but not a rectangle? This is the ridiculous part of this case. Imagine if someone was able to patent the shape of a car? A house? A table? A TV?

Setting the default/welcome page for a JSF app

Since <welcome-file-list> only works with physical files, you cannot use a *.jsf filename here since this resolves to a different physical file (like *.xhtml).

To define a welcome file, use one of the following approaches:

    • add an index.html file, and include a refresh meta tag in the head:

      <head>
      <meta http-equiv="Refresh" content="0; URL=your_welcome_page.jsf">
      </head>

 

  • add an index.jsp file, and redirect to your welcome page:

    <% response.sendRedirect("dropdowns.jsf"); %>

Initializing a JSF ManagedBean

Sometimes things really are easy – the fact that I Googled how to do this now seems pretty silly. The more I use JSF the more I like it 🙂

To initialize the state of the ManagedBean that a JSF page is using (like to preload data, or initialize other displayed values), just call the code from the bean’s constructor. Simple as that.

For example

@ManagedBean
public class ExampleController
{
    private String exampleProperty1;
    private String exampleProperty2;

    public ExampleController()
    {
    //example init code here, e.g. to init property values
    }

    ...

}

Skipping locally updated files with Git

If you have a local file that you’ve updated locally (like a properties file) but you want to avoid committing the changes when you next commit, use this command:

git update-index --skip-worktree path/to/filename

If you need to add it back to the list of tracked files, then use this:

git update-index –no-skip-worktree path/to/filename