Questions tagged [viewaction]

JSF tag to declare a GET action.

The <f:viewAction> is a JSF UI component which allows the developer to declare a GET action. They follow the same lifecycle as regular UICommand components (<h:commandXxx> tags), complete with support for action listeners and navigation case outcomes.

18 questions
157
votes
2 answers

What can , and be used for?

Can anyone clarify how we can use in general, or a in real world example, this snippet?
Hanynowsky
  • 2,970
  • 5
  • 32
  • 43
101
votes
2 answers

When to use f:viewAction / preRenderView versus PostConstruct?

When should one use the f:viewAction or preRenderView event to initialize data for a page versus using the @PostConstruct annotation? Is the rationale to use one or the other based on the type of scope of the backing bean e.g. If the backing bean is…
BestPractices
  • 12,738
  • 29
  • 96
  • 140
93
votes
5 answers

Android install apk with Intent.VIEW_ACTION not working with File provider

My app has an auto-update feature that download an APK and when the download is finished that a Intent.VIEW_ACTION to open the app and let the user install the downloaded apk Uri uri = Uri.parse("file://" + destination); Intent install = new…
3
votes
2 answers

How to display a wait indicator for f:viewAction?

I have a JSF page that loads the properties of an object (for which the id is passed in the URL). The loading can last more seconds, so I would like to display a wait/busy indicator or a "Loading..." message. This is done using…
Neo
  • 1,337
  • 4
  • 21
  • 50
3
votes
1 answer

Invoke f:viewAction conditionally based on f:viewParam

We have a setting where we have different optional view params passed to JSF pages and subsequent view actions to be processed after the params have been set. A very simple example is shown below: page.xhtml:
Smutje
  • 17,733
  • 4
  • 24
  • 41
2
votes
1 answer

Unable to use f:metadata f:viewAction from inside components

In the following page i am not able to load automobileLists since the method to populate it is outside the component in a f:metadata. I have a nullPointerException error. Partial code :
MrSir
  • 576
  • 2
  • 11
  • 29
2
votes
4 answers

Yii 2 static pages

I can't show static pages. Try do it as described in doc here - http://stuff.cebe.cc/yii2-guide.pdf (on page 100) but when I enable prettyurl, it doesn't work. Added in urlManager rules: 'urlManager' => array( 'enablePrettyUrl' => true, …
almix
  • 289
  • 1
  • 9
  • 23
1
vote
1 answer

Prompting user to install APK

I'm building my own update mechanism for my Android app (I'm not using Play Store). I can successfully download a new apk using DownloadManager. Once the download is finished, I would like to prompt the user to install the apk. I have tried the…
machinery
  • 5,972
  • 12
  • 67
  • 118
1
vote
1 answer
1
vote
0 answers

included into facelets template client does not work

just a question....don't know if I did it right or if this will not work by specs. I've made a simple facelets master template, like this: template.xhtml
crick77
  • 65
  • 8
1
vote
1 answer

Something like f ajax within f viewaction?

I need to show loading image while execute request when execute a f:viewaction, this sound as put f:ajax within f:viewaction, but this is impossible.
1
vote
0 answers

f:viewAction in ui:composition

I've found a strange behaviour while using f:viewAction in ui:composition. I've a main page that includes a composition. In both pages I've defined an f:viewAction, but when loading page, only the one in the main page is fired. This is an example of…
0
votes
0 answers

ViewAction action not executing when the page has been submitted via commandbutton in a data table

I have JSF page eventListEdit.xhtml that displays a data table with a commandbutton in every row to edit the data displayed via a eventCreateEdit.xhtml page. Here is my eventlistEdit.xhtml table with the commandbutton
snafua
  • 75
  • 1
  • 14
0
votes
0 answers

Simulation of f:viewAction on master page template

There is an application scoped bean. @Named @ApplicationScoped public class Bean { @Inject private Service service; private Entity entity; // Getter. // Entity is periodically fetched by EJB timers on the server side // which…
Tiny
  • 27,221
  • 105
  • 339
  • 599
0
votes
0 answers

f:viewParam and f:viewAction not called with *.faces and *.jsf mapping, but only with *.xhtml

I have a strange behaviour in my webapp. I have bound *.faces, *.jsf and *.xhtml to my Faces Servlet. All my pages are reachable about this mappings, but with *.faces and *.jsf endings the setter of my and the method of my…
marcel
  • 412
  • 2
  • 10
1
2