Marco Noronha

Ranch Hand
+ Follow
since Oct 30, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marco Noronha


I ´d like to have your apinion about the basic layout we are doing..

The first thing, is that I have a primefaces PanelGrid with one column..
to produce the header and the footer.

(The text is on portuguese, and it says "fields are placed here. Inside the secound panel".
That is because, inside that panel with facet (header and footer), I have another panelGrid (h:panelGrid)
to store the fields.

I created some Composite to add fields (label+input).. Eg:

So, I have another panelGrid, to align the label+input...
And that added to the page, renders something like this:

What do you guys thiink about that?
I think its a little ugly... Because the labels have diferent sizes,
and so, the input texts are not very aligned...

What do you guys think?
9 years ago

I´m trying to create a simple composite component with a selectOneMenu... It is really simple:

So, the problem is when I´m trying to pass the converter! That is an ENUM converter (extends EnumConverter with @FacesConverter(value = "tipoCampoConverter") annotation)

The error is: javax.el.ELException: Cannot convert tipoCampoConverter of type class java.lang.String to interface javax.faces.convert.Converter
9 years ago

Tim Holloway wrote:I don't know about PrimeFaces, but the basic JSF h:inputText tag cannot accept an EL expression for the id= attribute, only a String constant.

Thanks for the answer, but I don´t think that is the problem.
9 years ago
Is this JSF related?
9 years ago

I am in a puzzle with those naming containers...

The problem is that I want to update by ajax components that are inside composite components.
I have it working for one case, but I want to add another function and I can´t figure out what is the path I should update.

I Have the composite components: filter.xhtml, datatable.xhtml, and confirmDelete.xhtml

I created another that is: crud.xhtml that has all three of those...

This case, IT WORKs. Because this is the deal:

I have the ID crud for that comp.
And inside the Filter, for eg I update like this:

or the data table (remember, it is inside another datatable):

Pretty easy...

But now I want to use the filter and datatable for another function, witch is LOOK UP.

The idea is: I have a lookup.xhtml that has two fields and one button.
First field is a text so the person types the ID of the entity...
Secound field is a disable just to show the entity name, eg.
The third is a button that opens up a dialog so the person can use the filter and datatable and select one entity.

So, lets look at the lookup component:

Well, I´m trying, but I got:

And I tryed passing ":responsavelLookup:filterForm" "mainForm:responsavelLookup:filterForm" or ":mainForm:responsavelLookup:filterForm"..

All same errors

Maybe this is an easy thing for advanced JSF developers, but it is very hard for me.
Sorry ...

Thanks in advanced for the help!
9 years ago
I´m trying to use the collector as a 'master detail' component for my app...
I mean, I have an autocomplete with dropdown (or a select one menu) and
I wanted to use it to show details of the selected entity...

It works fine as in the show case. But I want it to be on a reguler insert-edit form.
And because the other fields have validations, I need the immediate=true on the 'Add'
button, to skip those validations....

BUT ! The component doesn´t work when immediate is true!! So I need to put them on separate forms...
And that makes the form look very very very ugly. (Actually, all my forms are ugly with primefaces, unless they are exact panelGrid with 2 columns).

So, any body has any ideas what I can do to bypass this and still use the Collector ?
9 years ago

Tim Holloway wrote:

Dennis Deems wrote:This is something we would do in our application with colspan. Is that an outmoded approach?

Outmoded? I don't know. But JSF doesn't do colspan. Never has. Some JSF extension tag libraries have colspan options, but the core JSF does not.

I ended up doing this:

panelGrid with 4 columns.



got it ?
But too pretty, but... its the less ugly I got!
9 years ago

Tim Holloway wrote:You can tidy up the layout some by using embedded panelGrids instead of panelGroup. Especially if you define columnClasses to control cell widths and thus keep things better aligned.

Ok, I´ll try that! thanks!
9 years ago
Yeah, but now its ugly..
and the form has much more code:

and still looks ugly:
9 years ago

what I´m trying to do is really simple.

I have a selectOneMenu, and when I seelect an ITEM i want to HIDE that panel,
and show another.

So, here´s what I got:

**PS: any error on typing, ignore. It´s because I´m translating what I have.
9 years ago
Guys, I´m using a panelGrid with 2 columns for my forms...
it looks ok... Something like:

But There´s some fields that CAN stay on the same "row"... because they´re small fields..
"begin date" - "end date".

I m trying to put them on the same row inside the panelGrid, but isn´t looking pretty...
Something like...

This was my last try... and it isn´t the best! lol

Here´s some tries:

9 years ago

Tim Holloway wrote:Backing beans can contain converters, but that is just an additional aspect of the Backing Bean.

Documentation is unclear, but I'm pretty sure that when a Backing Bean implements Converter, it's intended to make the backing bean as a whole self-converting. In other words, if BeanX implements Converter, I don't expect the conversion methods to be receiving/emitting anything that isn't a BeanX.

You are right! That´s why my bean doesn´t implement Converter!!
My Generic (BaseConverter) does!!

9 years ago

Tim Holloway wrote:Converters aren't ManagedBeans. You should be annotating them as @FacesConverter objects.

I should mention also that Converters must be stateless and thread-safe.

OOpps.. Your wrong there!

Converters CAN BE managedBeans!

the error was on the view:

thanks !!
9 years ago
Guys, Is there something wrong with my converter?

Here is MyBase:

I don´t know what's happening.. I did it on an old project and it worked.
9 years ago

Vladimir Mokrozub wrote:You could try PrimeFaces datatable with expandable rows:

that was my first try...but the toggle event is called after the content is rendered.. So i always get a null pointer.

So now I don´t know how to do it
9 years ago