Getting FaceletContext from FacesContext in JSF 1.2 - jsf-1.2

How to get FaceletContext from FaceletContext in JSF 1.2?
The problem is that I am creating a Tab dynamically and I want to include a view inside the newly created Tab. Including a view is supported only by FaceletContext.

Maybe with
FacesContext.getCurrentInstance().
getELContext().getContext(FacelectContext.class)
See ELContext#getContext(java.lang.Class)
Returns the context object associated with the given key.

Related

Why does the error occurs then I try to utilize pzRDExportWrapper in Pega 7.1.8?

I have a task to export a repeat grid's content to Excel. I have read an
article, but I still can't realize how to properly use it. I tried to repeat article's steps to provide pzRDExportWrapper, but after I click "Save" button I get the error:
Method: Rule-Obj-Activity instance not found:
Sb-FW-CTrackFW-Work.pzRDExportWrapper. Details: Invalid value for
Activity name passed to ActivityAssembler.
Could anybody give me any suggestions? Thank you.
You invoke activity from another activity which applies to class Sb-FW-CTrackFW-Work. Rule Resolution use primary context Sb-FW-CTrackFW-Work class and try invoke activity pzRDExportWrapper from it and you get error (because rule resolution can't found invoked activity in this class).
Activity pzRDExportWrapper applies to Rule-Obj-Report-Definition class. Try invoke from it.
Try activity step as below:
Call Rule-Obj-Report-Definition.pzRDExportWrapper
Or use step page for this step which defined as applies to Rule-Obj-Report-Definition class(you can declare it on Pages&Classes tab)
Okay. I have resolved the issue (thank you njc). I have two sections on a lone web page.
A context of the first section is my custom data page Co-Name-FW-Data-Search. The Search page has some single value properties which are initialized by an user via an UI.
The second section is a repeat grid section, a report definition as a source. My Search page pointed out in a Pages and Classes tab. Also there is a Page, which is created by report definition and contains results. The report definition takes Search’s values as parameters.
So, I have created an activity and passed the Search page and a Cods-Pega-List MyResultList as parameters. There are some steps in the activity:
Check if Search is null. If true- skip step; else - transfer Search properties into Params props with Data Transform.
Set Param.exportmode = "excel"
Call pzRDExportWrapper with Step Page MyResultList.pyReportDefinition. Pass current parameter page.
P.S.: If it doesn’t work try to play with report definition’s settings.
P.P.S.: An only minus of pzExportWrapper is that it invokes report definition again.

Dynamic Property File Loading in Spring based on the URL Argument for every request for data validation

I am working in a environment(in Spring, version 4.x) which needs to load/change the property files based on the URL argument for every request.
After successful build of application, for the first request I need to get an argument from the URL, and based on that argument I have to load the properties i.e, my application has to run with new properties and I'll be using this property file for validation.
But the problem is based on the configuration all the property files are loading before getting the URL argument and I am not able to load the property file dynamically after every request.
For example, if I am having two customers using my product and both have different set of rules(based on which, validation needs to be performed), from there request I'll get to know which customer is requesting and which set of rules I should apply for validation(for which, I am thinking of using property files).
I tried using different ways(but not working): http://www.baeldung.com/2012/02/06/properties-with-spring/#usage
Similar question: http://forum.spring.io/forum/spring-projects/web/119875-dynamic-property-file-loading-in-spring-based-on-the-url-argument

how to implement source filter property page?

I have followed the instructions at http://msdn.microsoft.com/en-us/library/windows/desktop/dd375010%28v=vs.85%29.aspx to create a property page for my CSourceStream based stream.
When testing with amcap I can see that amcap now shows the menu item to show the capture pin properties (ISpecifyPropertyPages::GetPages is queried). The problem is that when amcap calls OleCreatePropertyFrame it returns with E_FAIL and I am not sure why, it does not seem to even get to the stage of quering my dll for the factory method to instantiate the CBasePropertyPage based property class.
The problem was my DllRegisterServer only registered my filter.
I can use AMovieDllRegisterServer2 to register all components in g_Templates but that function does not register source filters properly so for the moment I am just calling AMovieDllRegisterServer2 and then re-registering my filter with source filter specific code.

How can values in the Alfresco pooled tasks table be changed?

I would like to change the data that is displayed in one of the Pooled Tasks
columns. It's not clear where does that data comes from.
For example, in my pooled-tasks-todo-dashlet.jsp file it has this section:
<%-- Status column --%>
<a:column id="col6" style="padding:2px;text-align:left">
<f:facet name="header">
<a:sortLink id="col6-sort" label="#{msg.status}" value="bpm:status" styleClass="header"/>
</f:facet>
<h:outputText id="col6-txt" value="#{r['bpm:status']}" />
</a:column>
Where is the status value "#{r['bpm:status']}" stored?
How do you add a new value that is not already defined?
Thanks
The object #{r} is the current node object iterated over the Alfresco JSF component a:richList. The value of this component is set by a JSF Bean, thus if you want to add a new property to #{r} I think the better way is by adding it in the Java bean that populates the richlist.
If you are only interested in modifying the values of the property jbpm:status, I guess it is bpm engine specific (it can be either jbpm or activity).
I have done it in one of my project.
If you observe jsp page in rich list tag you will find this
value="#{WorkflowBean.pooledTasks}
The bean which populate the rich list is workflowBean
which points to this class org.alfresco.web.bean.workflow.WorkflowBean
and this API get called when dashlet is open
List getPooledTasks()
It populates the pooledTask List then just like for loop we iterate the nodes one by one with r pointing to current workflow node.

Tridion 2011 with DD4T - no MetaData fields available on Component entity

I'm using Tridion 2011 (with DD4T, feeding an MVC webapp).
It seems that MetaData fields for Multimedia Components (specified on the Metadata tab of my Images Schema in Tridion) are not populating the corresponding property on the DD4T "Component" object. e.g. LinkedComponentFields[0].MetadataFields is empty and Multimedia.AltText is null.
Specifically the field I'm after is the AltText. But as the entire MetadataFields collection is empty on the Component, it's obviously not pulling through any metadata properties. i have tried using TemplateBuilder to set parameters in the Component Template (I set "resolve width and height" to yes, and the MergeAction to Merge) - this did not help.
Any ideas?
It is possibly caused by the linklevel. By default, links are followed for one level from the page or component that you are publishing.
You can increase this by adding a parameter to the template invocation, called linklevel. Try it with a value of 2 first, then increase until it works.

Resources