That example is not updated. Don't know why you take our e2e app as a reference
Matt Savino
@_MattSavino_twitter
We register the custom stencil in the constructor just like this component. Are you able to confirm this code still works?
Tim Donovan
@tdonovancsra
@DenysVuika are you saying we need to implement our own FormRenderingService provider by creating our own class?
Matt Savino
@_MattSavino_twitter
Ok can you give me an example that works?
Because I've tried everything I can think of
Denys Vuika
@DenysVuika
@tdonovancsra instead of injecting FormRenderingService you should be injecting ProcessFormRenderingService
Matt Savino
@_MattSavino_twitter
I am
it doesn't work - the component is never recognized
Denys Vuika
@DenysVuika
are we talking about APS 1.x or Cloud?
Matt Savino
@_MattSavino_twitter
APS
there's the template
I think if you try to call formRenderingService.setComponentTypeResolver() in any custom component which embeds <adf-form> in its template, you'll see that it doesn't work as of 3.8
Denys Vuika
@DenysVuika
Ok, guys, I think that there's a bug there. It may have multiple instances of ProcessFormRenderingService
Tim Donovan
@tdonovancsra
yeah I imported and still not working
Matt Savino
@_MattSavino_twitter
Yeah that's what it seemed like to me. I'm fine with a workaround if there is one. Thanks a lot for looking into this Denys. I really appreciate it.
I was wondering how provider works under the covers. I guess maybe it makes a separate instance just for the built in form component somehow?
Denys Vuika
@DenysVuika
Can someone try a quick workaround before I dive deeper into the fix. In the @Component attribute of the component that holds the Form, define providers section like this:
How is Alfresco Digital Workspace intended to be customized?
These are options that came to my mind:
Add customizations as Angular Library in Alfresco Digital Workspace application?
Add customizations in Alfresco Content App and deploy it as root project in Alfresco Digital Workspace application?
Something else?
2 replies
Eddie May
@freshwebs_twitter
Alfresco Hackathon is happening now - come & join us.
Matt Savino
@_MattSavino_twitter
Does anyone know how to determine the current tab in the form? We're trying to do some custom behavior based on which tab is showing. I've been trying to find a way to get the current tab index for most of the day but no luck. It's probably something simple I'm just missing. Please help :)
Matt Savino
@_MattSavino_twitter
Ok I'd doing this but I don't feel good about it: const activeTab = document.getElementsByClassName("mat-tab-label-active");
I guess we're safe unless angular changes their class names or adf stops using angular material tabs
Matt Savino
@_MattSavino_twitter
Hey @DenysVuika - quick question - is the ability to set a field's value programmatically, as the user clicks around the form not an expected requirement? We were able to programmatically set checkbox value until 3.8. But with this code change we no longer can update a checkbox in real time programatically. It only happens on init of the checkbox (IE - after saving the form and reloading) https://github.com/Alfresco/alfresco-ng2-components/pull/5657/files
Date fields are the same. There's no access to update the form widget in real time. Luckily text fields still work. But if that ever changes it would really break our form.
I worry that I'm doing some behavior that was never intended.
Denys Vuika
@DenysVuika
Looks like a regression to me
davidcanonieto
@davidcanonieto
Hi @_MattSavino_twitter , as you pointed out we did some work in the checkbox widget after spotting a bug in the initialization. To be honest I didn't have your behavior in mind when refactoring this widget. As you mentioned it will only be changed after the OnInit lifecycle hook. I'll open a ticket to make sure that the value of this widget can be changed programatically.
Matt Savino
@_MattSavino_twitter
Ok thanks that would be amazing. Date fields and dynamic tables are the same FYI - you can't update them on the fly programatically.
davidcanonieto
@davidcanonieto
@_MattSavino_twitter were you able to set the date programmatically in the Date Widget before? I don't think it was possible. This widget hasn't got any change other than the date format in the last year or so. The problem with this widget is that it needs to be parsed in its On Init to follow the date format selected.