JSF component layout - jsf

How can I achieve this layout in JSF (using richfaces)? I would basically like to use the rowSpan attribute of a rich:datatable, but use it for displaying components of a form (select menus, input boxes etc) instead of a collection.

Related

binding bean method to rendered jsf tag

I would like to know is there any way to hide/show links to certain pages by using the rendered jsf tag in conjunction with a bean method.
for eg. rendered="#{sidebarController.isGrantedAcess("Admin")} doesn't work

How to not render whole block in JSF?

Is there a JSF 2.1 component which lets me conditionally render (or not render) all its content? Something like
<h:component rendered="#{user.loggedIn}">
...a bunch of jsf components and HTML code...
...even more HTML code...
</h:component>
I am using PrimeFaces 3M4 as this may influence your answer!
<h:panelGroup>
If you set attribute layout="block", you will have a <div> tag
Otherwise, you have a <span> tag.
In general most of jsf components support the render attribute (never bumped in some that does not),
container components like h:panelGrid or h:panelGroup supports the rendered attribute and if its set to false all its child will be hidden too
Same goes for the primefaces components ,and if not it probably a bug (i think there was an issue with tabview of primefaces)
Here's a link for primefaces user guide, you can find supported attributes of all primefaces components there User’s Guide for 3.0.M4

myfaces -- duplicate rendering

I am using myfaces 1.2 with trinidad and tomahawk. I have 1 view xhtml that re-displays on a claim search (the div section with the results uses EL to only display if there are results).
On a 2nd submission, it appears that some HTML components display a 2nd time. For example, i'm using a html table to render a grid. I am not using any JSF component tags to render the table, it's straightup table, tr, td.
Is there a reason why this occurs, can I not mix HTML tags in xhtml or JSF (without f:verbatim)? If so, why not? If not, any hints on what isn't properly configured? Should I use something other than xhtml?

JSF remove invalid component from page

i'm using JSF 1.2 with IceFaces 1.8.
On my page i got an selectOneListbox, which content (e.g. EQUAL TO, BETWEEN, IN) triggers inputText fields to be rendered. If EQUAL TO is choosen one field is rendered else if BETWEEN is chossen two fields are rendered.
If my validation on the inputText field fails, and i change the content of the listbox the explained rendering does not work.
So has anyone a suggestion how to remove an "invalid" component from the html page?
I set invalid components to invisible.
I use the visible="#{myManagedBean.fieldVisible}" attribute for the component
in my JSF page
and
public boolean isFieldVisible() { return flag; }
in my Managed Bean to achieve this.

Ajax with JSF -( No RichFaces / No Ajax4Jsf )

I am using jsf portlets (JSR 168), and i am implementing ajax with JSF ( i have a text field and select one menu, on entering a char on the text field, should get the matching strings on the menu, an auto completion functionality). but i am not using any jsf adv specs like richfaces / facelets etc.. our project is using jdk1.4 still.
so i have a h:inputText with onkeyup event which calls javascript method and gets the values into select one menu. this works perfectly alright.
but later i am trying to submit the form with the textfield value and selectonemenu values using h:commandbutton.
there comes the issue, the action menthod in jsf bean is not getting invoked.
but when i tried removing the onkeyup event from the h:inputtext it works perfectly.
please suggest me. whatz goin on here.
got it resolved... there was a problem with my selectonemenu, it was not identifying the item when it is pulling from ajax. so replaced it with html select for now, but i will figureout a way to build the f:selectitem through javascript.

Resources