Map of the ADF: SelectionListener in mapColorTheme
HelloI'm integrating ADF Rich Faces with oracle mapviewer in an application.
I use JDeveloper 11 g R1 (Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407), database oracle 10g R2 (OEL 5), Oracle Mapviewer 10 g (Ver1033p5_B081010)
In my component 'dvt:map', I use a "dvt:mapColorTheme" and to implement a bean managed to the selectionListener custom method, but is not funtion with precision.
When I select objects in the map of the table of the components had refreshed the content, but the data has not changed because the selectionListener method has not filtered view object
In my custom (selectionListener), the mapSelectionEvent of param method is used for the return of the selected objects, but the iterator is empty.
MyBean.java
....
{} public void mySelectionListener (MapSelectionEvent mapSelectionEvent)
System.out.println ("step 1");
{if (mapSelectionEvent.getSelectionMode (). (Equals ("Select"))}
System.out.println ("step 2");
Iterator iter = mapSelectionEvent.getIterator ();
System.out.println ("have they given iterator?:" + iter.hasNext ());
StringBuffer siteValues = new StringBuffer();
While (iter.hasNext ()) {}
System.out.println ("step 3");
DataContent dc = (DataContent) iter.next ();
String locationName = dc.getLocationName ();
siteValues.append ("'" + locationName + "'");
If (iter.hasNext ()) {}
siteValues.append(",");
}
}
.....
AdfFacesContext.getCurrentInstance () .addPartialTarget (this.getMd1 ());
....
}
In the log file after running the applications:
Step 1
Step 2
have data in the iterator? : false
Question:
I customized can the selectionListener to mapColorTheme and catch objects selected or not?
Additional comments:
2. for custom selectionListener I use this http://andrejusb.blogspot.com/2008/03/oracle-maps-in-jdeveloper-11g-perfectly.html
1. I use the mapColorTheme component how guideline in the post: but I need select several objects in the map and filter the data in the table component and show only this
Please any help for this problem
Kind regards.
Marcelo A. Vasquez
www.jdeveloperla.com
Edited by: Marcelo A. Vasquez on July 21, 2009 17:43
Edited by: Marcelo A. Vasquez on July 21, 2009 17:46
Hi Marcelo,
Thank you. I am your project, and I'll try it once I had the chance
From your description, you can try if your definition of the theme it will works.
It is the theme for the MAP_COUNTRIES_NAME definition in the draft that I sent you:
Please note that there is a column of the label. Also, on page jspx I sent you, the locationColumn is 'COUNTRY' which is
also part of the definition of theme too.
Please let me know if it helps. Thank you.
Kevin Chow.
Tags: Java
Similar Questions
-
Security at the level of the ADF Page - need help
Hello
Currently, I am looking to secure my adf application. The taskflow Unbounded (adfc-config. XML) in my application is as follows
Application is shared with several customers. The homepage of a customer's A.jsp and other D.jsp. The reason is that there are several pages are shared by them. for example. B.JSP and C.jsp
The distinication between two clients's context path. Context path is different to one another. Context for client 1 path is ctx_path1 and for client 2 is ctx_path2.
Since all the page mapping is adfc-config.xml file, when client 2 is being access to the application context path ctx_path2 help and the D.jsp homepage, after if there change the url to A.jsp (ctx_path2/A.jsp), it could reach A.jsp and then B.jsp so on. Client 2 is then able to access the application customer1 and vice versa by changing the URL.
Note: There is correspondence of the page between either B.jsp and F.jsp C.jsp to E.jsp or C.jsp to G.jsp E.jsp to B.jsp so on.
Now, I want to add security to the level of the page Let's say A.jsp, when a customer access request 2 using context path (say ctx_path2)... / ctx_path2/D.jsp, although if he change the URL in... / ctx_path2/A.jsp, the safety of the adf must block access to A.jsp (client application 1.)
Please let me know the solution for the problem above mentioned above.Version Note: ADF - 11.1.1.6.0
Thank you
ASIS
If you enable ADF security and have Customer1 and Customer2 associated with different Application roles, you can set a level for each page role permission, provided that each page has a definition of page each. This will automatically solve your problem of "access if URL.
In addition, when you need to show/hide the navigation links based on the permissions of the user, you can use the visible property:
-
Presentation of the ADF for the recipients display
Hello
JDev version: 11.1.1.7.2
have a requirement to indicate the recipients contact in a window. I'm confused on what provision ADF must be used.
Requirement is. To: < .input field > <. Contact name1 > <. Contact name2 >... |
Contact names can be up to any number. So, if we take the maximum width, next contact should be in the next line.
Currently I use a For: each iterator to browse a list mapped to the bean and show a text and a close button. It is wrapped inside a layout of the Group Panel with horizontal layout. I need to organize the collection of these group of Panel layouts in a different layout.
As far as I know, the PanelGroupLayout can be horizontal or vertical. So it does not help me. PanelFormLayout arrranges contacts first vertically. So I can't use it here.
Y at - it no other component of the ADF that can be useful? Or I have to write code and create components with different layouts programmatically?
Hi user
Use Panel group put in page inside iterator or forEach and set its style inline like this
Display: inline-block;
and then surround iterator or forEach with panelGroupLayout (default layout) and check
When you check resumes maximum width it will automatically move to the next line
Ashish
-
How to get the values of the table of the ADF to bean class?
Hi all
My 11.1.1.6 Jdev
Here I do not use BC ADF in my project. I'll put values in the ADF table with bean.
In the table, I put a checkbox. When I selected (Checkbox) a few rows in table and submit. In the submit method, I want to get all the values of line checkbox selected in my bean class.
How can I get the values. ???
Here my table UI code
< af:table var = "row" rowBandingInterval = "0" id = "t1" value = "#{pageFlowScope.BinderSolutionsBean.uiBinderProperties} '"
styleClass = "AFStretchWidth" emptyText = "no record found".
Binding = "#{pageFlowScope.BinderSolutionsBean.binderTree}" >
< af:column sortable = "false" headerText = "Script ID" id = 'c4' >
< af:panelGroupLayout id = "pgl4" >
< af:selectBooleanCheckbox id = 'sbc1' > < / af:selectBooleanCheckbox >
< af:spacer width = "5" / >
< af:outputText value = "#{row.scenarioId}" id = "ot5" / > "
< / af:panelGroupLayout >
< / af:column >
< af:column sortable = "false" headerText = "Quote ID" id = "c1" >
< af:outputText value = "#{row.quoteId}" id = "ot4" / > "
< / af:column >
< af:column sortable = "false" headerText = "NASP ID" id = "c2" >
< af:outputText value = "#{row.naspId}" id = "ot2" / > "
< / af:column >
< af:column sortable = "false" headerText = "GCH ID" id = 'c3' >
< af:outputText value = "#{row.gchId}" id = "ot3" / > "
< / af:column >
< af:column id = "c6" headerText = "Term" >
< af:outputText value = "#{row.term}" id = "ot9" / > "
< / af:column >
< af:column sortable = "false" headerText = "Status" id = "c5" >
< af:outputText value = "#{row.status}" id = "ot6" / > "
< / af:column >
< / af:table >
follow some above recommendation such as the creation of additional attribute. You will also need the key in your collection, while making the data for your chart.
You must write a custom selectionListener. On valueChangeEvent of box, get the key of a line and add the line at the bean.
Maybe it's little help for you
-
Hi all
I have problem when filtering on af timestamp column: table.
I have a table containing historical information (created_on and modified_on), it is mapped to an entity:
Type = "Oracle.jbo.domain.date"
ColumnType = "DATE".
I've seen object mapped from this entity.
I want to display created_on and modified_on with timestamp (hour and minute), so I add the tips of the user interface for these 2 columns:
-Type format: Date Simple
-Size: MM/DD/YYYY HH: mm
I create a table based on this point of view. The table is filterable.
The column like this:
< af:column sortProperty = "#{bindings." View.hints.CreatedOn.name}"blockable = 'true '.
sortable = "true" headerText = "#{bindings." View.hints.CreatedOn.label}"id ="c6">
< f: facet = name 'filter' >
< af:inputDate value = "#{bindings." ViewQuery.queryDescriptor.filterConjunctionCriterion.criterionMap.CreatedOn.value}.
ID = "id2" >
< af:convertDateTime pattern = "#{bindings." View.hints.CreatedOn.format}"/ >
< / af:inputDate >
< / f: facet >
< af:outputText value = "#{rank." CreatedOn}.
shortDesc = "#{bindings." VIew.hints.CreatedOn.tooltip}"id ="ot6">
< af:convertDateTime pattern = "#{bindings." View.hints.CreatedOn.format} ">"
< / af:outputText >
< / af:column >
When I filter on 2 columns (created_on, modified_on) I got an error: " java.lang.IllegalArgumentException: ADFv: could not convert the instance: 30/07/2014 09:51 type: class java.lang.String in class of type null oracle.jbo.domain.Date."
Do you have an idea for me?
Thanks in advance.
Here is the stacktrace:
Caused by: java.lang.IllegalArgumentException: ADFv: could not convert the instance: 30/07/2014 09:51 type: class java.lang.String in oracle.jbo.domain.Date of type null class.
at oracle.adfinternal.view.faces.convert.DomainConverter._throw(DomainConverter.java:155)
at oracle.adfinternal.view.faces.convert.DomainConverter.convert(DomainConverter.java:120)
to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$ AdfFilterAttributeCriterion.getValue (FacesCtrlSearchBinding.java:5127)
at sun.reflect.GeneratedMethodAccessor448.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:305)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
at com.sun.el.parser.AstValue.getValue(AstValue.java:183)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getValue(ValueRenderer.java:195)
at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputBaseRenderer.renderContentStyleAttributes(SimpleInputBaseRenderer.java:524)
at oracle.adfinternal.view.faces.renderkit.rich.FormInputRenderer.renderAllContentAttributes(FormInputRenderer.java:480)
at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputBaseRenderer.renderAllContentAttributes(SimpleInputBaseRenderer.java:230)
at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputDateRenderer.renderAllContentAttributes(SimpleInputDateRenderer.java:712)
at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputDateRenderer.renderElementContent(SimpleInputDateRenderer.java:592)
at oracle.adfinternal.view.faces.renderkit.rich.FormInputRenderer.encodeAllAsElement(FormInputRenderer.java:169)
at oracle.adfinternal.view.faces.renderkit.rich.FormElementRenderer.encodeAll(FormElementRenderer.java:165)
at oracle.adf.view.rich.render.RichRenderer.delegateRenderer(RichRenderer.java:1828)
at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.renderFieldCellContents(LabeledInputRenderer.java:244)
at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:254)
at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:231)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
to oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer$ UIXColumnFilterWrapper._encodeChild (BaseColumnRenderer.java:2486)
to oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer$ UIXColumnFilterWrapper.encodeChildren (BaseColumnRenderer.java:2454)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChildInContext(RichRenderer.java:3251)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer._renderOrVisitFilterFacet(BaseColumnRenderer.java:1938)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.renderColumnFilterCell(BaseColumnRenderer.java:1324)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:168)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
to oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer.access$ 2900 (BaseTableRenderer.java:78)
to oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer$ FlattenedColumnEncoder.processComponent (BaseTableRenderer.java:3155)
to oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer$ FlattenedColumnEncoder.processComponent (BaseTableRenderer.java:3129)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:195)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:326)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:291)
at oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer.encodeFlattenedColumn(BaseTableRenderer.java:2928)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderFilterRow(TableRenderer.java:2508)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderColumnHeaderTable(TableRenderer.java:2113)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._renderColumnHeader(TableRenderer.java:1899)
at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:727)
Hello
This is a bug in the ADF (Bug 17380741 not public) and it resolved in JDev 12.1.3.
Kind regards
Sébastien
-
Selection of strength to call for listener table the ADF
Hello
JDev 11.1.2.4
I wrote a custom listener selection I associate with my table of the adf.
< af:table selectionListener = "#{pageFlowScope.rangePaging.singleSelectionListener}" >
It is called as expected every time except when I click on a line that is already selected. For example, you have a table with 1 row, the row is selected by default after the initial rendering. Then you click on a link that is of type int row. The selection listener is supposed to be called, but it is not. I guess the selection listener is too smart, that he is not triggered because the line is already selected.
Is there a way to force the listener to selection to be called even if the line is already selected?
Thank you
Hello
I guess you need the selection of the event initially. to do this, remove the property selectedRowKeys, then by default no line will be selected.
Kind regards
Birame
-
A Question about the safety of the ADF
Hello
One of my friends sent me this question:
What file would you use if you want to change the security authentication to an application?
Adfc-config. XML
(B) faces-config. XML
C. jazn-"Data.xml"
Web.XML d.
WebLogic.XML E.
I said that the correct answer is "c. jazn-"Data.xml"", but he insists on the fact that the right answer is "web.xml d..
He sent me this link to approve his response
In fact, I am not convinced of its response.
What is your suggestions.
Your comments are appreciated most.
Well, it's one of those questions...
For me, two answers are good, C and D
To activate the adf security make you changed in the web.xml file. Power is a change, it fits as a response. If you add user roles, roles of map, these changes are written to jazn-"Data.xml", which makes C a valid answer.
Timo
-
Problem with the safety of the Adf
Hello
I am trying to use the safety of the ADF for my project and it's my options in the Setup Wizard:
1 - authorization and authentication of the ADF2 - authentication based on the forms & ' generate the default Pages '
3 - no automatic grant
4 redirect after successful authentication "mapping"
and I did (the roles of Application & business roles and users)
and I also did mapping between them
Finally, I posted anonymous role of 'mapping' and when I try to run it I got this error
Error 500 - Internal server error
java.lang.NoClassDefFoundError: has not been initialized class com.bea.security.quark.ASIParserProxy
at oracle.security.jps.az.internal.runtime.entitymanager.ExtensionsManagerImpl.init(ExtensionsManagerImpl.java:227)
at oracle.security.jps.az.internal.runtime.policy.ApplicationPolicyImpl.initWithAppPolicyEntry(ApplicationPolicyImpl.java:322)
at oracle.security.jps.az.internal.runtime.policy.ApplicationPolicyImpl.initAppPolicy(ApplicationPolicyImpl.java:274)
at oracle.security.jps.az.internal.runtime.policy.ApplicationPolicyMap.get(ApplicationPolicyMap.java:110)
at oracle.security.jps.az.internal.runtime.service.PDPServiceImpl.getApplicationPolicy(PDPServiceImpl.java:575)
at oracle.security.jps.az.internal.runtime.service.PDPServiceImpl.getApplicationPolicy(PDPServiceImpl.java:556)
at oracle.security.jps.internal.policystore.PolicyUtil.getGrantedAppRoles(PolicyUtil.java:2876)
to oracle.security.jps.internal.jaas.JpsAbsSubjectResolver$ 5.run(JpsAbsSubjectResolver.java:497)
to oracle.security.jps.internal.jaas.JpsAbsSubjectResolver$ 5.run(JpsAbsSubjectResolver.java:487)
at java.security.AccessController.doPrivileged (Native Method)
at oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.getApplicationRoles(JpsAbsSubjectResolver.java:487)
at oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.createJpsSubject(JpsAbsSubjectResolver.java:334)
at oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.getAnonymousSubject(JpsAbsSubjectResolver.java:319)
at oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.resolveJpsSubject(JpsAbsSubjectResolver.java:258)
at oracle.security.jps.internal.jaas.JpsAbsSubjectResolver.resolveSubject(JpsAbsSubjectResolver.java:214)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
I use JDeveloper R 2 (11.1.2.3.0)
So, what should I do?
I will be grateful if someone could help me in this
Thank youHello
You can check if the solution in this thread works.
You also try to remove the system directory, then by restarting JDev.
Jean Lou
-
Form values: DB view or anything in the ADF ViewObject?
Hello.
I have a DB table with a field called PERSON_ID, which is the ID of a person. My version of JDeveloper is 11.1.1.7.0
With an Oracle DB function, I pass this ID and Mr. John Smith Smith prepare to indicate in the request.
Another field in the table is the AGE, with a raw number.
I need to generate a table of the ADF, and I need to show the person name and age.
I tried these two approaches for the solution:
- Generate an attribute calculated in the ViewObjectand try to call the function DB: obviosly, if that were possible, I did something wrong, because it did not work. If something as if it were possible, it would be the best solution.
- DB view: it works, but I can't commit data in this window of the application.
- Create a DB view with formatting of name, age, etc.
- Map an OT and VO
- Generate a table of the ADF in this VO
- When the form is completed, insert the form data in the DB Table.
- Validate the new line
- Reload the table of the ADF.
How can I solve this problem?
Any suggestion is appreciated
Thanks in advance. Concerning
Create EO based on your DB table.
Create this EO vo
Go to expert mode and modify the query
to something like:
Select user_id,
xx_utils.get_full_name (user_id) full_name,
Ager
---------------------------------------------------------------------Full name add LOV which, in the return element fill in your UserID
Drop the VO on the page
Now when you create the new line, the user will choose the 'full name' lov, who will fill in the field "user_id".
Commit;
you have completed
-
Calendar of the ADF: Drag and Drop
Dear all,
I tried to add the drag and drop functionality provided by Oracle ADF to a calendar that displays events from the database.
< af:calendar id = 'c4' value = ' #{bindings. " CalendarView1.calendarModel}.
calendarActivityListener = "#{CalendarBean.activityListener}" > "
< af:calendarDropTarget dropListener = "#{CalendarBean.handleDrop}" action = "MOVE" / > "
< / af:calendar >
The "CalendarBean" code is that provided in the Oracle ADF Faces "DemoCalendarBean.java" demo application
Unfortunately, the following error occurs "oracle.adfinternal.view.faces.model.binding.FacesCtrlCalendarBinding$ AdfmCalendarActivity cannot be cast to oracle.adfdemo.view.calendar.rich.model.DemoCalendarActivity.
Can anyone advise a solution
Thanks in advance
Concerning
Hello
Start with the calendar using Oracle demonstrations certainly seem convoluted - I did the same thing. I had to interpret what the demo was trying more of in the java code in general, and then write my own code. Below, I have the code that works for my clients.
1.) tag add calendar Drop target within your calendar.
2.) create your listener to drop in a managed bean (make sure that your method is mapped into the target calendar Drop). Note the areas where I've "updated HERE". I had fun with the data conversions that you see
Updated - this must go in your bean example. You can of course do this dynamic, but for now, it should work.
currTimeZone private zone is TimeZone.getTimeZone (' America/Detroit');.
This card to your target calendar drop tag
public DnDAction handleDrop (DropEvent dropEvent) {}
Method to handle the Drag and Drop feature calendar
Return _handleDrop (dropEvent, false);
}
public DnDAction _handleDrop (DropEvent dropEvent, showPopup boolean) {}
Drag and drop (mailable)
Transferable transferable = dropEvent.getTransferable ();
CalendarDropSite dropSite = (CalendarDropSite) dropEvent.getDropSite ();
DropSiteDate date = dropSite.getDate ();
CalendarActivity.TimeType timeType = dropSite.getTimeType ();
Civil activity
Activity CalendarActivity = (CalendarActivity) transferable.getData (DataFlavor.getDataFlavor (CalendarActivity.class));
If (activity! = null) {}
_handleCalendarActivityDrop (dropEvent, dropSiteDate, activity, showPopup);
Return dropEvent.getProposedAction ();
}
Return DnDAction.NONE;
}
private _handleCalendarActivityDrop Sub (DropEvent dropEvent, dropSiteDate Date, CalendarActivity activity, boolean showPopup) {}
Current start date Info get an activity
Date startDate;
startDate = activity.getStartDate (currTimeZone);
Calendar startCal = Calendar.getInstance (currTimeZone);
startCal.setTime (startDate);
Obtain the primary key of the calendar item as we move
String rowPK = activity.getId (m:System.NET.SocketAddress.ToString ());
int startDayOfYear = startCal.get (Calendar.DAY_OF_YEAR);
int startHour = startCal.get (Calendar.HOUR_OF_DAY);
int startMin = startCal.get (Calendar.MINUTE);
int startYear = startCal.get (Calendar.YEAR);
Get current Info from Date of end of the activity
Date endDate;
endDate = activity.getEndDate (currTimeZone);
Calendar endCal = Calendar.getInstance (currTimeZone);
endCal.setTime (endDate);
int endDayOfYear = endCal.get (Calendar.DAY_OF_YEAR);
int endHour = endCal.get (Calendar.HOUR_OF_DAY);
int endMin = endCal.get (Calendar.MINUTE);
int endYear = endCal.get (Calendar.YEAR);
Download New Start Date object dropSiteDate Info
Calendar dropCal = Calendar.getInstance (currTimeZone);
dropCal.setTime (dropSiteDate);
int dropDayOfYear = dropCal.get (Calendar.DAY_OF_YEAR);
int dropHour = dropCal.get (Calendar.HOUR_OF_DAY);
int dropMint = dropCal.get (Calendar.MINUTE);
int dropYear = dropCal.get (Calendar.YEAR);
calculation variables
long eventDelta = 0;
int newEndDayOfYear = 0;
Check if there is any change with the start date new old vs.
If (startDayOfYear! = dropDayOfYear) {}
Get the value of delta beginning-enddate
eventDelta = endCal.getTime () .getTime () - startCal.getTime () .getTime ();
Info set start date (Leaving time infact info)
startCal.set (Calendar.DAY_OF_YEAR, dropDayOfYear);
startCal.set (Calendar.YEAR, dropCal.get (Calendar.YEAR));
startCal.set (Calendar.MONTH, dropCal.get (Calendar.MONTH));
calculate the new endDate
Day newEndDate = new Date (startCal.getTime () .getTime () + eventDelta);
endCal.setTime (newEndDate);
reformat the start date, just in case.
Trainer SimpleDateFormat;
Formatter = new SimpleDateFormat ("yyyy-MM-DD hh: mm:." "") « « S ») ;
Date newStartDate;
newStartDate = new Date (startCal.getTime () .getTime ());
Formatter.format (newStartDate);
Take the iterator that is used for the calendar
DCBindingContainer dcbindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
UPDATE HERE - the name of your iterator binding your view calendar object
Iterator DCIteratorBinding = dcbindings.findIteratorBinding ("NameOfYourViewObjectIterator");
Get lines of database that uses the iterator
Line lines [] = iterator.getAllRowsInRange ();
Line currentRow = iterator.getCurrentRow ();
Must make sure that we have the iterator on the right line
If (rows.length > 0) {}
for (int i = 0; i)< rows.length;="" i++)="">
Updated HERE - this is a primary key for your view object
If (rows [i].getAttribute("Id").toString () .equals (rowPK)) {}
We found the line, now exit loop and move forward
currentRow = lines [i];
break;
}
}
}
If (currentRow! = null) {}
Get the binding of operations
CHECK to make sure that you have a validation link on your Page Def
OperationBinding commitBinding = dcbindings.getOperationBinding ("Commit");
/ Date start and end Date for the line that we are changing the value
* We need to create an oracle.jbo.domain.Timestamp because the view entity object using oracle.jbo.domain.Date
* oracle.jbo.domain.Date does not accept that the oracle.jbo.domain.Timestamp, which stamp accepts java.util.Date
*/
Start date of new game
Timestamp newStartDateTs;
newStartDateTs = new Timestamp (newStartDate.getTime ());
UPDATE HERE - launched date field
currentRow.setAttribute ("Startdate", newStartDateTs);
New defined end date
Timestamp newEndDateTs;
newEndDateTs = new Timestamp (newEndDate.getTime ());
UPDATE HERE - launched date field
currentRow.setAttribute ("Enddate", newEndDateTs);
Perform field validation against currently modified line
try {}
currentRow.validate ();
} catch (Exception e) {}
System.out.println (e);
Restore all changes so there is no garbage data is entered into the database
currentRow.refresh (Row.REFRESH_UNDO_CHANGES);
return;
}
Run the validation on the database operation
commitBinding.execute ();
Look for errors during validation: If no errors, then update calendar
If (commitBinding.getErrors () .isEmpty ()) {}
Refresh the calendar client in order to reflect the new changes
RequestContext adfContext = RequestContext.getCurrentInstance ();
adfContext.addPartialTarget (getCalendarComponent ());
} else {}
currentRow.refresh (Row.REFRESH_UNDO_CHANGES);
}
} else {}
Nothing to do here.
}
}
}
protected RichCalendar getCalendarComponent() {}
FacesContext context = FacesContext.getCurrentInstance ();
UIComponent root = context.getViewRoot ();
Hard-coded id for the moment, but that can be loaded dynamically.
UPDATE your schedule component JSPX HERE - id
return (RichCalendar) root.findComponent ("c1");
}
(3.) If can't remember off hand imports, if you have a problem let me know, I'll send a list of what I have.
I hope this helps. Good luck!
Gavin
-
Configuring user and group LDAP in application of the ADF
Hi all
I have to use LDAP user and groups in my ADF application. I have configured the LDAP Protocol on WLS Server successfully and you can see all users/groups under the tab "users and groups". I added the role of business in jazn-"Data.xml" corresponding on behalf of the groups. Created the Application role in jazn-"Data.xml" and assigned a business role role.
However, not added any user in jazn-"Data.xml". Which I do not necessary because it will be taken from LDAP.
Now how to set up the JDeveloper for use these users? What changes must make jazn-"Data.xml"? or jps-file config.xml / web.xml / weblogic application. XML
Did I miss nay configuration step. I just ADF security set in place the tutorial step by step - quick - question but not found it useful
I use JDeveloper 11.1.1.5.
Thanking you in advance.
Mukesh.Hello
So, these are the steps:
1. create an application role and the role of the company in the jazndata file
2. map of the application role business role.
3 the provider in the default domain also create sufficient brand
4. change the default identity provider and set it as sufficient.
5. start the application and connect using the enterprise user who has group companies are assigned.Here are the steps...
-
Problem with the partialTrigger on the Table of the ADF
JDeveloper Version 11.1.2.3.0
I've reproduced the problem with partialTrigger on the array element. Sample application can be downloaded from here . He needs to run HR schema.
Underneath the pageFragment sample, I can try refreshing adf table in two ways
1. turn the addEmployee button id in partialTrigger of the ADFTable component.
2. set the id of the button addEmployee in the PanelBox component partialTrigger.
Note the difference - 1st only works no where as 2nd works very well. Do you have additional constraints when updating using the ADF Board
partialTrigger?
I have reproduced the usecase in example below:
Structure of the PageFragment-
PanelBox
|
| _ ADF Table
|
| facet __toolbar
|
| _ addEmployee button
Code PageFragment
< af:panelBox text = "PanelBox2" id = "pb1" >
< f: facet name = "toolbar" >
< af:commandButton actionListener = "#{bindings.addEmployee.execute}" = "addEmployee2" text "
Disabled = "#{!}" Bindings.addEmployee.Enabled}"id ="cb1"partialSubmit ="true"/ >
< / f: facet >
< af:table value = "#{bindings." Var EmployeesView1.collectionModel}"="row"rows =" #{bindings. " EmployeesView1.rangeSize}.
emptyText = "#{bindings." EmployeesView1.viewable? "{'No data to display.': 'Access Denied.'}".
fetchSize = "#{bindings." EmployeesView1.rangeSize}' rowBandingInterval = '0 '.
selectedRowKeys = ' #{bindings. " EmployeesView1.collectionModel.selectedRow}.
selectionListener = "#{bindings." RowSelection EmployeesView1.collectionModel.makeCurrent}"="single"id ="t1 ".
"displayRow ="selected"partialTriggers =": cb1 "styleClass ="AFStretchWidth">
< af:column sortProperty = "#{bindings." EmployeesView1.hints.EmployeeId.name}"sortable ="false ".
headerText = "#{bindings." EmployeesView1.hints.EmployeeId.label}"id ="c1">
< af:inputText value = "#{row.bindings.EmployeeId.inputValue} '"
label = "#{bindings." EmployeesView1.hints.EmployeeId.label}.
required = "#{bindings." EmployeesView1.hints.EmployeeId.mandatory}.
columns = "#{bindings." EmployeesView1.hints.EmployeeId.displayWidth}.
maximumLength = "#{bindings." EmployeesView1.hints.EmployeeId.precision}.
shortDesc = "#{bindings." EmployeesView1.hints.EmployeeId.tooltip}"id ="it1">
< f: validator binding="#{row.bindings.EmployeeId.validator}"/ >
< af:convertNumber groupingUsed = 'false' pattern = ' #{bindings. " EmployeesView1.hints.EmployeeId.format}"/ >
< / af:inputText >
< / af:column >
< af:column sortProperty = "#{bindings." EmployeesView1.hints.FirstName.name}"sortable ="false ".
headerText = "#{bindings." EmployeesView1.hints.FirstName.label}"id ="c2">
< af:inputText value = "#{row.bindings.FirstName.inputValue} '"
label = "#{bindings." EmployeesView1.hints.FirstName.label}.
required = "#{bindings." EmployeesView1.hints.FirstName.mandatory}.
columns = "#{bindings." EmployeesView1.hints.FirstName.displayWidth}.
maximumLength = "#{bindings." EmployeesView1.hints.FirstName.precision}.
shortDesc = "#{bindings." EmployeesView1.hints.FirstName.tooltip}"id ="it2">
< f: validator binding="#{row.bindings.FirstName.validator}"/ >
< / af:inputText >
< / af:column >
< af:column sortProperty = "#{bindings." EmployeesView1.hints.LastName.name}"sortable ="false ".
headerText = "#{bindings." EmployeesView1.hints.LastName.label}"id = 'c3' >
< af:inputText value = "#{row.bindings.LastName.inputValue} '"
label = "#{bindings." EmployeesView1.hints.LastName.label}.
required = "#{bindings." EmployeesView1.hints.LastName.mandatory}.
columns = "#{bindings." EmployeesView1.hints.LastName.displayWidth}.
maximumLength = "#{bindings." EmployeesView1.hints.LastName.precision}.
shortDesc = "#{bindings." EmployeesView1.hints.LastName.tooltip}"id ="it3">
< f: validator binding="#{row.bindings.LastName.validator}"/ >
< / af:inputText >
< / af:column >
< af:column sortProperty = "#{bindings." EmployeesView1.hints.DepartmentId.name}"sortable ="false ".
headerText = "#{bindings." EmployeesView1.hints.DepartmentId.label}"id ="c11">
"< af:selectOneChoice value =" #{row.bindings.DepartmentId.inputValue} "label =" #{row.bindings.DepartmentId.label} ".
required = "#{bindings." EmployeesView1.hints.DepartmentId.mandatory}.
shortDesc = "#{bindings." EmployeesView1.hints.DepartmentId.tooltip}"id ="soc1">
< f: selectItems value = "#{row.bindings.DepartmentId.items}" id = "si1" / > "
< / af:selectOneChoice >
< / af:column >
< / af:table >
< / af:panelBox >
Thank you
RajdeepHello
the reason in my opinion, this has to do with the creation of the employee, who sits on the company and not the iterator that displays the data in the table. Therefore, the iterator must re - query to view the data that you created in silent mode in the background
Addition of
employeesViewImpl.executeQuery ();
to your AppModule Impl class at the end of the creation of the employee solve the problem that you see
Frank
-
The center of the ADF table column data
I use JDeveloper 11.1.1.6
I would like to be able to focus some of the attributes stored for some columns in my table of the ADF. Here are 2 of the columns in my table ADF I tried to center data. For some reason, the data remain justified left. In my skin file I am centering the header values for all columns in all tables. I don't want to do that, but with the row data. For row data, I want to selectively choose the columns that are left centered or justified. Do you have any ideas on what I'm missing.
< af:table value = "#{bindings." Data1.collectionModel}.
var = "row".
lines = ' #{bindings. " Data1.rangeSize}.
emptyText = "#{bindings." Data1.viewable? "{'No data to display.': 'Access Denied.'}".
fetchSize = "#{bindings." Data1.rangeSize}.
rowBandingInterval = '1 '.
Binding = "#{backingBeanScope.backing_ui_pages_DataDispatch_Processing_update." Table"}
ID = "myTable" columnStretching = "last".
rowSelection = "single" displayRow = "selected".
selectedRowKeys = ' #{bindings. " Data1.collectionModel.selectedRow}.
selectionListener = "#{bindings." Data1.collectionModel.makeCurrent} ">"
...........
< af:column sortProperty = "MyId" sortable = "false".
headerText = "#{bindings." Data1.hints.MyID.label}.
ID = "c1" >
< af:outputText value = "#{rank." MyId}"id ="ot10.
inlineStyle = "" text-align: center; "/ >"
< / af:column >
< af:column headerText = "#{bindings." Data1.hints.size.label}.
ID = 'c4' width = "75" >
< af:selectOneChoice value = "#{row.bindings.Size.inputValue} '"
label = "#{row." Bindings.Size.label}.
required = "#{bindings." Data1.hints.size.mandatory}.
shortDesc = "#{bindings." Data1.hints.size.ToolTip}.
ID = "soc3" readOnly = 'true '.
inlineStyle = "" text-align: center; ">"
< f: selectItems value = "#{row.bindings.Size.items} '"
ID = "si3" / >
< / af:selectOneChoice >
< / af:column >
...........
< / af:table >I'm sorry. The attribute align = 'center' is at the level of the spine.
Try this:
Try this:
var = "row".
lines = ' #{bindings. " Data1.rangeSize}.
emptyText = "#{bindings." Data1.viewable? "{'No data to display.': 'Access Denied.'}".
fetchSize = "#{bindings." Data1.rangeSize}.
rowBandingInterval = '1 '.
Binding = "#{backingBeanScope.backing_ui_pages_DataDispatch_Processing_update." Table"}
ID = "myTable" columnStretching = "last".
rowSelection = "single" displayRow = "selected".
selectedRowKeys = ' #{bindings. " Data1.collectionModel.selectedRow}.
selectionListener = "#{bindings." Data1.collectionModel.makeCurrent}">...........
headerText = "#{bindings." Data1.hints.MyID.label}.
ID = "c1" align = "center" >
ID = 'c4' width = "75" align = "center" >
label = "#{row." Bindings.Size.label}.
required = "#{bindings." Data1.hints.size.mandatory}.
shortDesc = "#{bindings." Data1.hints.size.ToolTip}.
ID = "soc3" readOnly = 'true '.
>
ID = "si3" / >
...........
Thank you
Nini -
Hello
I try to get the data of the selected line in the bean on the change of SelectOneChoice in a column of table of the ADF.
There are two definitions of node in the iterator. When I try to access the data in the row. I see that the first definition of node data.
How to access the definition data another node?
I'm trying to access the "sponsorId" of the iterator. I use the code below. But his return null pointer exception.
The code I use to access the data in the row:
DCBindingContainer links =
(DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
DCIteratorBinding = dcItteratorBindings
bindings.findIteratorBinding ("sponsorIterator");
ViewObject voTableData = dcItteratorBindings.getViewObject ();
Line rowSelected = voTableData.getCurrentRow ();
System.out.println (":" + rowSelected.getAttribute ("sponsorId")); I am able to see the data correctly for sponsorCodeDesc, sponsorPercentage, sponsorStatusDesc
This is the iterator used for the table (page def):
< Tree IterBinding = "sponsorIterator" id = "sponsor1" >
< nodeDefinition DefName = "org.ieee.internal.ws.proxy.conf.types.ConferenceType.Sponsors.Sponsor"
Name = "sponsor10" >
< AttrNames >
< item Value = "sponsorCodeDesc" / >
< item Value = "sponsorPercentage" / >
< item Value = lie "sponsorStatusDesc" = "sponsorStatusDesc" / >
< / AttrNames >
< accessors >
< item Value = "sponsorDetails" / >
< / accessors >
< / nodeDefinition >
< nodeDefinition DefName = "org.ieee.internal.ws.proxy.conf.types.SponsorType"
Name = "sponsor11" >
< AttrNames >
< item Value = "sponsorId" / >
< item Value = "sponsorName" / >
< item Value = "isIEEE" / >
< item Value = "isNonProfit" / >
< item Value = "sponsorAcronym" / >
< item Value = "sponsorDesc" / >
< item Value = "sponsorEmail" / >
< item Value = "sponsorComment" / >
< item Value = "sponsorTypeId" / >
< item Value = "sponsorTypeDesc" / >
< item Value = "sponsorActive" / >
< item Value = "societyNumber" / >
< item Value = "businessUnit" / >
< item Value = "createdBy" / >
< item Value = "updatedBy" / >
< / AttrNames >
< / nodeDefinition >
< / tree >you have not yet a selectionlistener linked to the table... to make the currentrow as the selectedRow...
Can u please add the selectedRowKeys and the selectionlistener in the table asselectedRowKeys = "#{bindings.sponsor1.collectionModel.selectedRow} '"
selectionListener = "#{bindings.sponsor1.collectionModel.makeCurrent} '" -
How can I default first line below the selected line in the table of the adf
Hello
I use Jdeveloper 11 g,
I created Adf quick query with table and changed selectionListener table as #{CustRMMap.onRMGroupNameChange}.
and when I click on find fast query no row is selected.
I want the first row to be selected / highlighted by default when I click search.
Patel ImranYou can also set an attributeValue in pagedef.xml
bind this attributeValue with column of your table. This sets the value of the selected line to the variable attruibute.
Will now link this with your desired component attributeValue.
Put partial trigger on the component that should display this value.
This will save you to write custom code and use the default table selection listener property, which marks the first default line.Apart from this, if you want to govern the first default line of managed bean selection use this code...
+ _Table = selectionEvent.getSource ((richeTableau)) richeTableau; + *
+ / / the model in the Collection is the object that provides the structured data.
+ / / for rendering table +.
+ TableModel CollectionModel = table.getValue ((CollectionModel)); + *
+ / / the ADF object that implements the CollectionModel is JUCtrlHierBinding. IT +.
+ / /is wrapped by the CollectionModel API.
+ JUCtrlHierBinding adfTableBinding = tableModel.getWrappedData ((JUCtrlHierBinding)); + *
+ / / Acess the iterator ADF, binding that is used with the binding table ADF +.
+ DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding (); + *+ / / the role of this method is to synchronize the table feature selection +.
+ / / with the selection of the model of the ADF +.
+ Object selectedRowData = table.getSelectedRowData (); + *
+ / / cast of JUCtrlHierNodeBinding, which is the subject of the ADF that is +.
+ / line/a +.
+ JUCtrlHierNodeBinding nodeBinding = selectedRowData (JUCtrlHierNodeBinding); + *
+ / / get the key of the node binding line and set it as the current line in the +.
+ / / iterator +.
+ Key rwKey = nodeBinding.getRowKey (); + *
tableIteratorBinding.setCurrentRowWithKey (rwKey.toStringFormat (true)); + *and another way on the right is a custom like this code:
+ public void setDefaultRow (int count) {/ / call this method your method of selection custom, rom pass the line of the line to select index. count = 0, will select first row + *}
+ try {+ *}
Object oldRowKey = tblMag.getRowKey (); *
+ try {+ *}
This..getSelectedRowKeys () .clear ();
*
* +} catch (System.Exception e) {+ *}
System.out.println (e.getMessage ()); *
+}+
This..setRowIndex (count);
*
RKS RowKeySet =. getSelectedRowKeys();
*
(RKS). Add(. getRowKey());
*
RKS =. getSelectedRowKeys();
*
+.setRowKey (oldRowKey); +
* +} catch (System.Exception e) {+ *}
System.out.println ("error:" e.getMessage ()); + *
+}+
+}+Hope this helps
Concerning
Maryline Roussel
Maybe you are looking for
-
How to delete e-mail messages from the screen
I have my account set as IMAP email. If I trash a message he removes the server cox as well as screen mail for this account. Like Charlie on the MTA, it is lost and gone forever. (Kingston Trio) Is there a way to remove the display of other e-mail
-
The pages won't load right not and error OSCP
I'm having two issues probably related. The first is that Firefox is oddly loading some pages: e.g. addons.mozilla.org while in other browsers that they load fine. The second is that some pages not be loading not at all like the https://addons.cdn.mo
-
Original title: Security Windows symbol said no protection, but my anti virus software says that there is no threat to my computer. My anti virus system is up to date (Kaspersky). Why the red with an x on it to declare shield than the anti virus prot
-
Two file Commander in App drawer
I have updated my Sony Z2 from 4.4.4 to 5.0.2 and two "File Commander" are displayed when tap Applications. "Restore to factory" from phone and "Repair my phone" with PC Companion had not any effect. How could I remove the old version?
-
Where can I get my information from pop3 to set up my e-mail account?
Original title: "windows mail" How can I set up mail windows using windows vista? where can I get my information from pop3 to set up my e-mail account? Thank you