Portlet Factory, Version 6.1.2


 

Builders calling builders

When one builder wants to call another builder, the process is to create a new builder call object (the API provides assistance with this) and then to invoke it. Since the new builder call is fundamentally no different from a builder call on the primary builder call list, the secondary builder operates normally, as if it were a primary builder.

If one builder calls another, the (highly) recommended method is to make the call during the Creation phase. If the secondary builder expects to run in another phase, then it will defer itself using the same mechanism that it would defer itself if it were a primary builder call. However, it is conceivable that one builder would have to run in the Post-Creation phase and it would not know which other builders it plans to call until then. In this case, it is acceptable for the secondary builder to be called, and it will be called exactly as it would be in the Creation phase. If it defers itself to the Post-Creation phase, then it will be called again, immediately, but with a set up that it will recognize as the Post-Creation phase.

Note: One builder should never call another in the Validation phase.

 

Handling errors from called builders

When a builder calls another builder, there is a possibility that the other builder will generate warning or error messages. Such messages are automatically carried up to the original builder call in the builder call list. This occurs even if the chain of builders calling other builders is multiple levels deep.

Parent topic: Multi-phase builder generation behavior


Library | Support |