Custom component help
Hi,
Could you point me to some documentation/tutorials/examples how to bind to and iterate collection data in the same way as dataTables does?
Well, something a little more easily digested than the RI code for dataTable ;-)
I would like to process a nested iterated tag sort of like
<x:document list="#{thelist}" var="item">
<x:column>
<x:data itemdata="#{item.something}"/>
</x:column>
</x:document>So that I could iterate over the collection and access the "something" attributes
Help much appreciated!
Thanks in advance,
Nik
somethere you will do something like:
FacesContext context = .... ;
List<?> list = component.getList(); //getList asks the ValueExpression of Parameter "list"
for(Object o : list) {
context.getExternalContext().getRequestMap().put(getItemName(), o); //getItemName() returns the content of parameter "var"
encodeChildren(...); //or something like that.
context.getExternalContext().getRequestMap().remove(getItemName());The above sample is very short and easy, but you should understand howto set such a temporary el-variable. Pay attention that you need to iterate in every phase (method processValidations, processUpdates, etc.)
Edited by: muhviehstarr on 03.03.2008 22:40
Similar Messages
-
Scroll bar, buttons and a Custom Component - help
Thanks to another forum I was able to create a scroll panel and add a scroll bar to it. That works fine. Inside the scroll panel I have thumbnails of the product that I'm highlighting. I want to be able to click on the thumbnail and have a full size photo of the product come up in the window next to the scroll panel. I created a custom component that has a stage showing each full size product individually. This worked fine when I simply had buttons and no scroll bar. I could convert the thumbnail to a button and then add interaction so that it would go to the proper state of the custom component. Where I'm having problems is now that I've imbedded the buttons in a scroll panel I'm no longer given the custom component as an option to pick from. I can add interaction, but it only gives me the option of picking one of the pages, and not a component.
I've attached a screen grab to help show what I'm describing.
Any ideas?
DougDoug, thanks for asking this question.
Hi ADAM...
It seems that a lot of us are asking the same question: Scrollbar Navigation-Make Actionable
(I created a low-fidelity proof-of-concept to test—using a datalist as you suggested. See link in my posting).
I have reviewed the video you refer to here, but you example still does not allow for individual items in the datalist (scrollbar) to be assigned individual actionable events.
Can you expain your thinking in Option 1, as a workaround? Do you have any other suggestions?
BOTTOM LINE
We are all looking to do the same thing... something we are going to see A LOT MORE of after Uncle Steve's TABLET presentation next week:
A scrolling menu, with selected items in the menu causing "navigation" to a certain point in a scroll panel. (imitating the flick or slide effect of iPhone).
Suggestion: Can you add a field to thedatalist so that when the "repeated item" (in edit mode) is configuredto do an action (i.e., On-Click, Transition to State), we can then assign the state you'd like for each item in thetable itself?
Now the issue is making it change the "State" within another component (i.e. scrolling panel). Can that be done?
Thanks,
- Rick -
Help with creating a custom component.
Hi. I have created a really simple custom component called
myComp. It is a simple Canvas 100 pixels x 100 pixels with an Image
control component.
<mx:Canvas>
<mx:Image id="image1">
</mx:Canvas>
After instantiating the component in Main.mxml eg. var
pic1:myComp = new myComp(); I am having a problem setting the
source property of the Image component.
"image1" is the id of mx:Image in the custom compoenent so I
tried pic1.image1.source = "assets/ball.jpg" but I get a run time
error "Error #1009: Cannot access a property or method of a null
object reference".
Don't really know what I am doing wrong.
Any help please!In your custom component, try adding a bindable public var
which contains the path to your image. Also, set the image.source
to this var.
In your main app, set the var within the <mx:> tags of
the custom component. Since it is a public var, it will show up in
the code hint. You can also now change the image var from the main
app anytime you like using ActionScript code. -
Help with Custom Component: Ajax and ValueChangeListener
Hello,
I am trying to create a custom component that triggers an update via Ajax. However, I would also like to trigger a ValueChangeListener method from the same component, however I am unsure of how to obtain and trigger the ValueChangeEvent.
The code I have so far in the Phase Listener is:
private void handleAjaxRequest(PhaseEvent event) {
FacesContext context = event.getFacesContext();
HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
Object object = context.getExternalContext().getRequest();
if (!(object instanceof HttpServletRequest)) {
return;
HttpServletRequest request = (HttpServletRequest)object;
HttpSession session = request.getSession();
String requestType = request.getParameter("jsflotRequestType");
if (requestType != null && requestType.equalsIgnoreCase("jsflotchartValueChange")) {
//Trigger valueChangeEvents
log.info("Handling JSFlot Chart Value Change Event.");
}What I am looking for though, is some information regarding how to obtain the ValueChangeListener from the request/session objects.
The component tag is called like this:
<jsflot:flotChart id="valueTimeChart"
value="#{chartMbean.chartSeries}"
valueChangeListener="#{chartMbean.valueChangeListener}"Any help would be greatly appreciated!The field calculation order was not in the correct order, had a devil of a time figuring out how to get to it, in Acrobat X.
My check boxes for shipping have the same name field but I don't see a tab for export value for the check boxes, and I have no idea how to implement your suggestions for a switch or if statement or what fields to attach them to.
My amatuer attempt at a shipping formula follows, I don't know if I can use a range for event value, or where to put the script, if it is even correct.
if(event.value == "<25.01")
nShipFee = 06;
else if(event.value == "25.01 - 75")
nShipFee = 11.50;
else if(event.value == "75.01 - 125")
nShipFee = 15;
else if(event.value == "125.01 - 200")
nShipFee = 20;
else if(event.value == "200.01 - 300")
nShipFee = 25;
else if(event.value == "300.01 - 400")
nShipFee = 30;
else if(event.value == ">400")
nShipFee = 50; -
Help,Help me! I want to create a custom component
The first, I'm a chinese,my English is very poor.Maybe I make so many mistakes.so
I say sorry for you.
I want to create a custom component so I research the Java.awt.Component .but I don't understand that the class has a method-------dispatchEvent(AWTEvent e).I want to know what invoke this method and when invoke?
thank uI believe ( believe mind you )
that the method:
public final void dispatchEvent(AWTEvent e)
Dispatches an event to this component or one of its sub components. Calls processEvent before returning for 1.1-style events which have been enabled for
the Component.
Parameters: e - the event
Is used to send an Event message to This component from another
like :
Say you have 'MyComponent1' sending Events to MyComponent2
AWTEvent e = new AWTEvent( blah whatever.......);
MyComponent2.dispatchEvent( e );
and then the Event Handlers on MyComponent2 if any will recieve 'e'
You Probably don't need to modify this behaviour
I assume you are doing something like
public class TestComponent extends Component
private int MySpecialExtraValue;
public TestComponent()
super(); // like : new Component()
MySpecialValue = 5; // Just an example
// Override a Method in Component just as an example.
public String getName()
String S = "I am a Custom Component";
return S;
//Another override example
public void repaint()
System.out.println("repaint() was called");
super.repaint(); // use the original Component Method
// blah do own stuff
}Override any methods that you need to get the required behaviour that you want...
I hope this is a help........ -
How to construct the component tree in my custom component?Help!
Hi, i am writing a custom component like this:
public class HtmlCategory extends HtmlPanelGrid
public void processRestoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
setColumns(1);
HtmlCommandLink link=new HtmlCommandLink();
link.setValue("Let's Bingo");
MyUtil.setActionListener(context,link,"#{temp.mytest}");
UIParameter param=new UIParameter();
param.setName("name");
param.setValue("Robin!");
link.getChildren().add(param);
param.setParent(link);
getChildren().add(link);
link.setParent(this);
super.processRestoreState(context,state);
} you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
I got a message from the console:
Wrong columns attribute for PanelGrid id0:id4: -2147483648
but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
Best Regards:)
RobinWell, i don't know if i have got my question clear.
usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
<f:form>
<h:panelGrid ...........>
<h:dataTable ................>
</h:dataTable>
</h:panelGrid>
</f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
Best Regards:)
Robin -
Custom component Search and Result view using value node :pls help
Hi Experts,
I am creating a Custom component with Search and Result view using value nodes.
This is the code I wrote in the Search button event handler method.
The data which gets in lv_search I need to put in lv_col .
Can somebody guide me for this.
Points will be awarded .
METHOD eh_onsearch.
DATA : lv_current TYPE REF TO if_bol_bo_property_access,
lv_search TYPE zcrm_orgstruct_search, "Search value node structure
lv_result TYPE zcrm_orgstruct_result, "Result value node structure
lv_col TYPE REF TO if_bol_bo_col.
lv_current ?= me->typed_context->search->collection_wrapper->get_current( ).
CALL METHOD lv_current->get_properties
IMPORTING
es_attributes = lv_search.
me->typed_context->searchresult->collection_wrapper->set_collection( lv_col ).
op_toresultview( ).
ENDMETHOD.
Regards,
LakshmiHi Lakshmi,
Could you please share with us how it was solved.
"CALL METHOD lv_current->get_properties
IMPORTING
es_attributes = lv_search."
Did you get any values in lv_search ?
Because while using value nodes for search view (which inherits from advance search controller class), the above method does not return any search values entered in the fields.
Please let me know how did you solve it.
Thanks & Regards
Vidhya -
Stumped with a custom component. Can anyone help?
I'm working on a component that I would like to have 3 dream levels plus limbo.
Oh wait, sorry...I'm mixed up. Though I do feel my issue is equally contrived and at times, frustrating to wrap my head around.
What I REALLY would like, is to make a custom component that does indeed have 3 levels, and I'm having issues with mouseover. My goal, Is to have a menu of several items, each a custom component. When a component is clicked, it "opens" into a similar menu of additional components, which in turn can be hovered over to display an image. That seems to be the easy part.
I have created each second level item (blue), that upon mouseover displays an image (green). I have combined all of those into a single custom component, (red) and made individual states for the overall component that 1) displays ONLY the red button and 2) displays the blue components with the red component disabled.
What I can't figure out is how to make ONLY the (red) item appear for mouseover and click when in the top state. What is happening at the moment is that as far as the browser is concerned, the entire component is the mouseover area. This makes it impossible to put multiple (red) items next to each other.
I've tried making the (blue) and (green) components hidden and/or disabled, but it does not seem to effect the problem. I can't make those items not "accept mouseover" because the (blue) items are in turn supposed to be buttons used to display the end (green) image.
Does anyone know what I can do to solve this problem? I hope I was able to describe the situation well enough. Like I said....it's kind of stupid and contrived.WELL. After typing that whole deal out, I seem to have come across the solution myself, and it's ridiculously simple, and makes me feel the same for not figuring it out right away.
Much like everything else in Catalyst, the "accepts mouse events" can be changed for the same object in different states. So what you do is uncheck the "accepts..." box for each item while in the top state, and check it once more in the lower states. Also, the "Transparency accepts mouse" needs to be unchecked.
Simple. -
Problem with inputText in my custom component
Hi, I have a custom dataTable component that I'm trying to get to work. It has to be a custom component because dataTable doesn't support rowspan, colspan, multi line headers, and a rendered attribute for rows. The problem is, that when I wrap the column tag inside my row tag then the method for the inputText tag never gets called in the UPDATE_MODEL_VALUES phase.
I'm starting to think that JSF doesn't support 2 levels of tags between the inputText and dataTable. I'm hoping that someone can tell me what I have wrong with my components.
Here is the JSP snippet.
<cjsf:rptTable>
<cjsf:data id="dataTable1" value="#{allAuthUser.tableRows}" var="myTableRow1">
<cjsf:row>
<cjsf:col>
<h:inputText id="tableTestFld" value="#{myTableRow1.testFld}" size="5" maxlength="5"/>
</cjsf:col>
</cjsf:row>
</cjsf:data>
</cjsf:rptTable>Here is what it renders. It looks to me like everything renders fine. So I'm guessing that there is something in a component that is causing JSF during the life cycle to not be able to process correctly.
<table>
<tbody>
<tr>
<td><input id="tblmaintForm:body:dataTable1_0:tableTestFld" name="tblmaintForm:body:dataTable1_0:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
</tr>
<tr>
<td><input id="tblmaintForm:body:dataTable1_1:tableTestFld" name="tblmaintForm:body:dataTable1_1:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
</tr>
<tr>
<td><input id="tblmaintForm:body:dataTable1_2:tableTestFld" name="tblmaintForm:body:dataTable1_2:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
</tr>
</tbody>
</table>Note: If I leave off the row tag it renders the same way except of course the <tr> and </tr> tags are missing. If I do this, then the backing method for the inputText tag is called and everything works fine. Why doesn't it work with the row tag in place?
Here are the components:
public class UIRptTable extends UIComponentBase {
public UIRptTable() {
setRendererType("tblmaint.rptTableRenderer");
public String getFamily() {
return "javax.faces.Output";
public class UIRptTableData extends HtmlDataTable {
public UIRptTableData() {
setRendererType("tblmaint.rptTableDataRenderer");
public String getFamily() {
return "javax.faces.Data";
public class UIRptTableRow extends UIOutput {
public UIRptTableRow() {
setRendererType("tblmaint.rptTableRowRenderer");
public String getFamily() {
return "javax.faces.Output";
public class UIRptTableCol extends UIColumn {
public UIRptTableCol() {
setRendererType("tblmaint.rptTableColRenderer");
public String getFamily() {
return "javax.faces.Column";
}Here is part of the faces-config file in case you need it.
<!-- Components -->
<component>
<component-type>tblmaint.rptTable</component-type>
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
</component>
<component>
<component-type>tblmaint.rptTableData</component-type>
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
</component>
<component>
<component-type>tblmaint.rptTableRow</component-type>
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
</component>
<component>
<component-type>tblmaint.rptTableCol</component-type>
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
</component>
<!-- Render Kits -->
<render-kit>
<renderer>
<component-family>javax.faces.Output</component-family>
<renderer-type>tblmaint.rptTableRenderer</renderer-type>
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
</renderer>
</render-kit>
<render-kit>
<renderer>
<component-family>javax.faces.Data</component-family>
<renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
</renderer>
</render-kit>
<render-kit>
<renderer>
<component-family>javax.faces.Output</component-family>
<renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
</renderer>
</render-kit>
<render-kit>
<renderer>
<component-family>javax.faces.Column</component-family>
<renderer-type>tblmaint.rptTableColRenderer</renderer-type>
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
</renderer>
</render-kit>I sure hope that someone can help me out. Please let me know if you need any additional information.
Thanks,
RayHi, Ray!
1) I was trying to put a button in the column header (for sorting) and I couldn't get that to work. That involved the >colhdr tag. I got that to work but I don't remember the fix. I'll look it up and reply back with that when I can.Dealing the first part of your trouble, you need NOT a custom component.
I have looked through the implementation of RepeaterRenderer, as you advised me, and found that the multi-header possibility is included in the implementation of dataTable control.
The code below is the part of source of repeater.jsp with only change:
<d:data_repeater>  <h:dataTable>
And it works fine.
<h:dataTable id="table"
binding="#{RepeaterBean.data}"
rows="5"
value="#{RepeaterBean.customers}"
var="customer">
<f:facet name="header">
<h:outputText value="Customer List"/> <!� First Header row -- >
</f:facet>
<h:column>
<%-- Visible checkbox for selection --%>
<h:selectBooleanCheckbox
id="checked"
binding="#{RepeaterBean.checked}"/>
<%-- Invisible checkbox for "created" flag --%>
<h:selectBooleanCheckbox
id="created"
binding="#{RepeaterBean.created}"
rendered="false"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Account Id"/> <!�Second Header row -- >
</f:facet>
<h:inputText id="accountId"
binding="#{RepeaterBean.accountId}"
required="true"
size="6"
value="#{customer.accountId}">
</h:inputText>
<h:message for="accountId"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Customer Name"/> <!�Second Header row -- >
</f:facet>
<h:inputText id="name"
required="true"
size="50"
value="#{customer.name}">
</h:inputText>
<h:message for="name"/>
</h:column>
<h:column>
<f:facet name="header"> <!�Second Header row -- >
<h:outputText value="Symbol"/>
</f:facet>
<h:inputText id="symbol"
required="true"
size="6"
value="#{customer.symbol}">
<f:validateLength
maximum="6"
minimum="2"/>
</h:inputText>
<h:message for="symbol"/>
</h:column>
<h:column>
<f:facet name="header"> <!�Second Header row -- >
<h:outputText value="Total Sales"/>
</f:facet>
<h:outputText id="totalSales"
value="#{customer.totalSales}">
<f:convertNumber
type="currency"/>
</h:outputText>
</h:column>
<h:column>
<f:facet name="header"> <!�Second Header row -- >
<h:outputText value="Commands"/>
</f:facet>
<h:commandButton id="press"
action="#{RepeaterBean.press}"
immediate="true"
value="#{RepeaterBean.pressLabel}"
type="SUBMIT"/>
<h:commandLink id="click"
action="#{RepeaterBean.click}"
immediate="true">
<h:outputText
value="Click"/>
</h:commandLink>
</h:column>
</h:dataTable>
You may have a look at HTML source to prove that dataTable is already what you need:
<table id="myform:table">
<thead>
<tr><th colspan="6" scope="colgroup">Customer List</th></tr>
<tr>
<th scope="col"></th>
<th scope="col">Account Id</th>
<th scope="col">Customer Name</th>
<th scope="col">Symbol</th>
<th scope="col">Total Sales</th>
<th scope="col">Commands</th>
</tr>
</thead>
<tbody>
2.) The second trouble is still unsettled as previously. Right now I have different task at my job, and I can�t continue investigation of this problem.
But when you find smth., please let me know. I�ll be very grateful.
Regards,
Oleksa Stelmakh -
Unable to Edit the View in Custom Component
Hi Experts,
Please help me to resolve this issue !
I am unable to lock the BOL Entity in my custom component using BTAdminH. I have written the below code in the Edit event Handler for Edit Button. The lr_entity->lock( ) condition statement is getting false and it is skipping the "set_view_editable( me )." code statement. Why??
This is code excerpt that I have taken from edit button of the BP_HEAD/AccountViewSet and altered to my component/View
DATA: lr_entity TYPE REF TO cl_crm_bol_entity,
lr_controller TYPE REF TO cl_ZVKH8_bspwdcomponent_impl.
TRY.
lr_controller ?= me->comp_controller.
lr_entity ?= lr_controller->typed_context->btadminh->collection_wrapper->get_current( ).
IF lr_entity IS BOUND.
IF lr_entity->IS_LOCKED EQ abap_false.
IF le_entity->IS_CHANGEABLE EQ abap_true.
IF lr_entity->lock( ) EQ abap_true.
me->view_group_context->set_view_editable( me ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
and when I directly executed the below code in the Edit event Handler for Edit Button I am receiving the dereferencing NULL value exception. Why in my custom component in many places this happening??
me->view_group_context->set_view_editable( me ).
Exception Details
CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference
Method: ZL_ZVKH8_DETAILSEF_IMPL=>EH_ONBACK
Thanks,
BujjiHi Summit & NishaNC,
Thanks for your responses !
As suggested, I have debugged the code for ->lock( ) method and there are exceptions raised from some methods.
Method GET_LOCK () -> Method GET_ROOT () ->Method GET_PARENT ()
At GET_ROOT( ) method i have received an exception
"Root entity BTAdminH could not be determined" and one more "Entity BTAdminH could not be locked"
Later when I have checked in MODEL Browser, I found that the BOL object "BTAdminH" for my view is an Access object and not the Root Object.
Hence, I have a question? Does the locking can be done only for ROOT Objects?
If this is TRUE then I think this is the major problem with my custom component where even the cross component navigation is also not happening and in many places I am receiving "Dereferencing NULL Value" information.
Also I have gone through some of the Threads and one information that I found from Sumit Mittal
1. An access object is an independent entity, has primary keys of its own.
2. A root object is a special access object that is at the top of the hierarchy based on business rules.
3. A dependent object's primary keys are supplied by access objects and it's lifetime is bound to them. If the parent object is destroyed, the dependent object is also destroyed.
4. Search objects are query objects useful for querying root objects
5. Search result objects - Search objects return the results in the form of a result object together with a relation pointing to the root object.
6. View objects - ?
7. Dynamic search objects - Used in advanced search, supports ranges and operators
Could you please specify in which scenarios we have to go for Access Objects and Root Objects
Thanks,
Bujji -
How do you reference a valueObject located in main to a custom component created in Catalyst?
Hello,
I have been working with the Catalyst Beta 2 / Flash Builder beta trying to create a photogallery and have hit a little bit of a snag, try as I might I can't seem to find the answer anywhere. I am still new to Flex so please excuse me if this is a basic question, I have been trying to understand more about Flex to make my designs in Catalyst better.
I found this video on Adobe TV: http://tv.adobe.com/watch/rich-internet-applications-101/ria-stepbystep-16-binding-a-data- service-to-flash-builder-components/
It's wonderful and I have the datalist I created in Catalyst working with the XML file I generated but I designed my little photogallery a bit diffrent, I created a Custom Component in Catalyst so that when you click an item on the DataList it pop's up a little screen with a larger photo in on it, rather then having an image in the main application. Now my problem seems to be that I can't refrence the valueObject I created with the wizard as it's in my Main.mxml file, is there a way to refrence it from my Custom Component so the larger image will display? Is there a way to let the component know which item on the dataList in the main application is selected and display the correct image?
I should also say I really enjoy working with the Beta for both Flash Builder / Catalyst, thanks for the hard work!
Thanks for the help,
ChrisI am afraid you cannot bind to static properties in Windows Store Apps. It is simply not supported.
You could create a proxy class that exposes the static command property and bind to this property of an instance of the proxy object:
http://stackoverflow.com/questions/14186175/bind-to-a-static-field-in-windows-8-xaml
http://stackoverflow.com/questions/4708711/how-can-i-use-the-xstatic-extension-for-phone7-silverlight-apps
You will of course have to create an instance of the proxy object. There is no way around this.
Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. -
Custom Component UI not displaying in 11G
Hi All,
We have a custom component in 10G where we have added new link in the UCM Home Page, it will be displayed beside Administration tab with name Edit Tables, under this we have sub links Alldistr_RVS, Distprod, Distuser, Prdstate, Products_RVS, State_RVS, Stateusr. When we deployed this code in 11G it is not working. Could any one please provide me code to make it work in 11G instace. Appreciate your help on this.
Below is the code used in 10G in resource file
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>
ampfRVSEditTables htmlIncludeOrString
</title>
</head>
<body>
<@dynamichtml custom_finish_layout_init@>
<$include super.custom_finish_layout_init$>
<$include how_to_components_menu$>
<$include vbis_edit_tables_link$>
<@end@>
<@dynamichtml how_to_components_menu@>
<$if not how_to_components_menu_included$>
//add a drop-down menu, or a tray to the UI
navBuilder.addChildNodeTo('NAVTREE', 'collection', 'id==EDIT_Tables', 'label==Edit Tables');
if (navBuilder.menuB)
navBuilder.menuB.addTopLevelNode("EDIT_Tables");
else if (navBuilder.trayA)
navBuilder.trayA.addTopLevelNode("EDIT_Tables");
<$EDIT_Tables_menu_included=1$>
<$endif$>
<@end@>
<@dynamichtml vbis_edit_tables_link@>
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==ALLDISTR_RVS',
'label==Alldistr_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_ALLDISTR_RVS_PAGE');
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTPROD',
'label==Distprod', 'url==<$HttpCgiPath$>?IdcService=GET_DISTPROD_PAGE');
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTUSER',
'label==Distuser', 'url==<$HttpCgiPath$>?IdcService=GET_DISTUSER_PAGE');
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRDSTATE',
'label==Prdstate', 'url==<$HttpCgiPath$>?IdcService=GET_PRDSTATE_PAGE');
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRODUCTS_RVS',
'label==Products_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_PRODUCTS_RVS_PAGE');
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATE_RVS',
'label==State_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_STATE_RVS_PAGE');
navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATEUSR',
'label==Stateusr', 'url==<$HttpCgiPath$>?IdcService=GET_STATEUSR_PAGE');
<@end@>
</body>
</html>
Thanks.
AshokHi Jiri,
I from the sample example I tried to develop component to display HOW_TO_COMPONENTS as Menu item under which there is sub item Annuity_Dispname_Mapping, but it is not displaying. I am afraid where it went wrong. Below is the code i used, please help me to fix this. Thank you
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>
MenuExample htmlIncludeOrString
</title>
</head>
<body>
<@dynamicdata CoreMenuItems@>
id, label, linkType, linkData
HOW_TO_COMPONENTS, How To Components, YuiDev,
ANNUITY_DISPNAME_MAPPING, Annuity_Dispname_Mapping, YuiDev, <$HttpCgiPath$>?IdcService=GET_DATA_ACCESS_PAGE
<@end@>
<@dynamicdata CoreMenuItemRelationships@>
<?commatable mergeKey="primaryKey"?>
parentId, id, loadOrder
MENU_A, HOW_TO_COMPONENTS, 1000
HOW_TO_COMPONENTS, ANNUITY_DISPNAME_MAPPING, 10
<@end@>
<@dynamicdata CoreMenuItemsFlags@>
id, flags
HOW_TO_COMPONENTS, isLoggedIn
ANNUITY_DISPNAME_MAPPING, isLoggedIn
<@end@>
<@dynamicdata CoreMenuItemsImages@>
id, image, imageOpen
HOW_TO_COMPONENTS, ScsPageItem.gif,
ANNUITY_DISPNAME_MAPPING, ScsPageItem.gif,
<@end@>
<@dynamicdata ampcustom_menu_items_template_data@>
<?commatable indexedColumns="id"?>
id, parentId, linkType, flags
HOW_TO_COMPONENTS_LINK_TEMPLATE, HOW_TO_COMPONENTS, external,
<@end@>
<@dynamichtml custom_navigation_menu_items@>
<$include super.custom_navigation_menu_items$>
<$urlCount = 0$>
<$if utLoadResultSet("pne_portal", "PersonalURLS")$>
<$if rsFirst("PersonalURLS")$>
<$loop PersonalURLS$>
<$ddAppendIndexedColumnResultSet("ampcustom_menu_items_template_data", "NavigationMenuItems", "id", "HOW_TO_COMPONENTS_LINK_TEMPLATE")$>
<$rsLast("NavigationMenuItems")$>
<$NavigationMenuItems.id = "HOW_TO_COMPONENTS_" & urlCount$>
<$NavigationMenuItems.label = js(title)$>
<$NavigationMenuItems.linkData = js(website)$>
<$NavigationMenuItems.loadOrder = urlCount$>
<$urlCount = urlCount + 1$>
<$endloop$>
<$endif$>
<$endif$>
<@end@>
</body>
</html>
Thanks -
JPanel won't display my custome component
Hi,
I made a custome component class that in its paint method at this stage is suppose to paint a white rectangle on screen. However the when I add this custome component to my JPanel it doesn't show up. Does anybody have a solution for this?
My code for the custome component is,
public spaceMediaDisplayObject(mediaObject mo){
x = mo.getSpaceX();
y = mo.getSpaceY();
height = mo.getHeight();
width = mo.getWidth();
name = mo.getName();
System.out.println("Constructor");
this.repaint();
public void paint(Graphics g){
System.out.println("Draw");
g.setColor(Color.white);
g.drawRect(x, y, height, width);
And the fragment of code I am using to try and display in on the panel is as follows,
spaceMediaDisplayObject smdo = new spaceMediaDisplayObject(toDisplay);
spaceBodyPanel.add(smdo);
Please help if able.If it's null then you need to set the size of each component explicitly:
JPanel panel = new JPanel(null);
Component customComponent = new CustomComponent();
panel.add(customComponent);
customComponent.setBounds(0, 0, 100, 100); // For exampleA simple layout manager could be used to make the component fill the panel, for example:
JPanel panel = new JPanel(new GridLayout(1, 1));
panel.add(new CustomComponent());Hope this helps. -
How Do I Link to Custom Component States From Scrolling Content Buttons?
Hi there, I'm in need of some help as i've got a deadline to meet within the next few weeks and im stuck!
Basically what I've done is i've made a scrolling content lists, containing about 10 products in each one, my plan was to turn each product into a button so that users could click on that product, and take them to a new page containing more detailed information on that product; when they've finished looking at that product they can click a button to return them to the list they were on previously. However I can't just make a brand new state for each product as there is a limit to 20 states, and I will need around 50 of them.
So, from what i've read I will need to create custom components. the only trouble with doing this is that I can't link to the custom component on a different main timeline state (I dont get the option to link to the states of the custom component).
If i put the image of the detailed product into the scroll panel I am able to link to it, however, it's inside the scrolling content and it just scrolls around and stuff which isn't what I want; as it makes it look messy.
- Basically I just need to link from the buttons in the scrolling list, to a more detailed page for that product. Then be able to return to the list using a button.
If anybody has any input on how to achieve this, please help me out. Starting to panic now as this needs to be finished before september :s
Btw i'm happy to share my .fxp file it that helps.
Thanks alot, Hoping for some helpful replies on this topic
- TomHi Tom,
Adding this back here to share my wireframe with the community.
Have put a quick .fxp together based on the 'product' section of your project.
Take a look at how the product lists are linking into the product detail pages within their custom components.
Using this model you should be able to expand out to infinite product detail states. If a particular product area has more than the maximum allowed states, just start a new custom component (part 2 for that product section).
Let me know if you have any questions. Hope this sets you on a path to getting your project complete. It's looking nice.
Tanya -
I am not able to create a JMS connection from a custom component in UCM
I am trying to create a custom component which makes a JMS connection and inserts messages in JMS Queue.
THe JMS server is hosted on Weblogic Application Server.
When the code runs I am getting the factory object and the queue object.
But when I try to get a connection it throws an error as pasted below.
WHen I googled the same error It has shown a simliar problem in TOmcat in sun thread
It said two jar files xerces.jar and xml-apis.jar are obsolete.
I replaced with the new version.
still the same problem occurred
Please help
Pasting the code and exception here
Code __________________________________________
import java.util.Date;
import java.util.Hashtable;
import javax.jms.*;
import javax.naming.*;
import weblogic.jms.client.WLConnectionImpl;
import weblogic.jms.extensions.*;
import javax.rmi.PortableRemoteObject;
public class SimpleProducer {
public static void drive() {
final int NUM_MSGS;
NUM_MSGS = 93;
Context jndiContext = null;
Hashtable<String, String> ht;
ht = new Hashtable<String, String>();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://punitp52975d:7001");
try {
jndiContext = new InitialContext(ht);
} catch (NamingException e) {
System.out.println("Could not create JNDI API context: " +
e.toString());
System.exit(1);
ConnectionFactory connectionFactory = null;
Destination dest = null;
try {
Object home = jndiContext.lookup("CNFT"); // where iiopTestDS is jndi name for my DataSource.
connectionFactory =(ConnectionFactory)PortableRemoteObject.narrow(home , ConnectionFactory.class);
Object home1 = jndiContext.lookup("QUEUE2"); // where iiopTestDS is jndi name for my DataSource.
dest =(Destination)PortableRemoteObject.narrow(home1 , Destination.class);
/*connectionFactory = (ConnectionFactory) jndiContext.lookup(
"CNFT");
dest = (Destination) jndiContext.lookup("QUEUE2");
System.out.println("connectionFactory,dest "+connectionFactory+dest);*/
} catch (Exception e) {
System.out.println("JNDI API lookup failed: " + e.toString());
e.printStackTrace();
System.exit(1);
//WLConnectionImpl connection = null;
WLConnection connection = null;
WLMessageProducer producer = null;
try {
System.out.println("Getting Connection "+(WLConnection) connectionFactory.createConnection());
//connection = (WLConnection) connectionFactory.createConnection();
System.out.println("Connection created");
WLSession session =
(WLSession) connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
producer = (WLMessageProducer) session.createProducer(dest);
WLMessage message = (WLMessage) session.createTextMessage();
//TextMessage message = session.createTextMessage();
for (int i = 91; i < NUM_MSGS; i++) {
((TextMessage) message).setText("This is message " + (i + 1));
Long l = new Date().getTime();
message.setLongProperty("ReleasedDate",l );
System.out.println("Sending message: " + ((TextMessage) message).getText());
producer.send(message);
producer.send(session.createMessage());
} catch (Exception e) {
System.out.println("Exception occurred: " + e.toString());
} catch (Throwable et) {
System.out.println("Exception occurred: " + et.toString());
et.printStackTrace();
finally {
if (connection != null) {
try {
connection.close();
} catch (Exception e) {
System.out.println("*************Instantiating Producer***************");
Exception_________________________________________________________________
Exception occurred: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:124)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:115)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:143)
at weblogic.xml.jaxp.WebLogicSAXParserFactory.<init>(WebLogicSAXParserFactory.java:62)
at weblogic.rmi.internal.wls.WLSRMIEnvironment.getSAXParser(WLSRMIEnvironment.java:136)
at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:170)
at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:159)
at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:104)
at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
at weblogic.rmi.internal.OIDManager.initializeDGCServer(OIDManager.java:231)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:144)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
at weblogic.corba.server.naming.ReferenceHelperImpl.exportObject(ReferenceHelperImpl.java:233)
at weblogic.rmi.extensions.PortableRemoteObject.exportObject(PortableRemoteObject.java:34)
at weblogic.messaging.dispatcher.DispatcherImpl.export(DispatcherImpl.java:85)This is probably related to this other issue http://www.adobeforums.com/webx/.59b7fbab/0.
Jasmin
Maybe you are looking for
-
Hi, i try to implement test network with Office 365 and AD Domain on-premise. Have created federated trust, it seems works: PS C:\> Get-MsolFederationProperty -DomainName testdomain.maildomain.org Source : ADFS Server ActiveClientSignInUrl : https://
-
MIRO - customer-designed messages
Hi, I have a problem with a customer-designed message "ZGUT" out from MIRO - we are executing debit-notes back to the supplier based on delivery-notes and for the printing we use a customer-designed message-type. Basically it works but the problem I
-
IS-Oil and IS Gas on same server
Dear Experts , Please throw some light on the requirement that company has 2 distinct identity gas and oil. servers are being installed in parent company which is oil sector . Now they want to make a separate client in the existing servers for gas. D
-
Errors when starting JMS Server
When trying to start my managed server (after deployment) I get the following error: Throwable: java.util.ConcurrentModificationException Exception raised: java.util.ConcurrentModificationException java.util.ConcurrentMo
-
I am trying to upgrade SW to iSO 5 on my iPad but do not see the software upgrade option under the setting/general tab. Please help.