0

I'm trying to work out how to add textfield to the navbar in the header that I can use as an always present search box but I haven't had much success. From the documentation (7.2. Replacing page elements) I see that I can replace components inside a page but I don't think this applies to the header. Can any one point me in the right direction with where to start with this?

AdamD
  • 25
  • 1
  • 4

1 Answers1

0

It is possible to change the complete header by using ComponentType.HEADER.

Setup your own ComponentFactory that will have higher priority than the default one.

martin-g
  • 17,243
  • 2
  • 23
  • 35
  • Thanks @martin-g, I've pretty much done this but I'm still seeing the default header. Is there something you have to do to set the priority? – AdamD Jan 21 '16 at 14:09
  • I think I've worked it out, seem that in the registrar if I do replace rather than add it seems to work: `// componentFactories.add(new CustomHeaderFactory()); componentFactories.replace(HeaderPanelFactory.class, new CustomHeaderFactory()); ` – AdamD Jan 21 '16 at 14:13
  • I believe there is a bug in Isis JIRA for this. I remember hitting the same problem when I worked on this. Glad that you make it work! – martin-g Jan 21 '16 at 18:28