Rép : Re: problem of accents on FR data [RESOLVED]

2013-01-28 Thread Raymond NANEON
Hi Stéphan,The new argument works very well.Thanks a lot :)Envoyé depuis iCloudLe 26 jan 2013 à 15:30, Raymond NANEON rnan...@me.com a écrit :Ok Stéphan,  I go to change the init call _expression_. I tell you on monday at my office. Thanks  Envoyé de mon iPad  Le 26 janv. 2013 à 17:03, Stéphan Mertz s.me...@improve.fr a écrit :   Is your class in the application classpath ?  To be sure, could you change the init call with :  ERXJDBCAdaptor.setExpressionClassName(IVOracleExpression.class.getName(), ERXJDBCAdaptor.class.getName());Le 26 janv. 2013 à 16:07, Raymond NANEON rnan...@me.com a écrit :Hello Stéphan,I put breakpoint in my class but the override method never read. Did I forget something?   I go to upgrade to latest wonder (6) on monday and retryEnvoyé de mon iPhoneLe 26 janv. 2013 à 11:02, Stéphan Mertz s.me...@improve.fr a écrit :Hello Raymond,I don't see why the override is not used in your code.  Did you put a breakpoint in the override method ?Le 24 janv. 2013 à 11:06, Raymond NANEON rnan...@me.com a écrit :My package is etudiants.utt.fr.util.IVOracleExpression and I the this ERXJDBCAdaptor.setExpressionClassName("etudiants.utt.fr.util.IVOracleExpression", "er.extensions.jdbc.ERXJDBCAdaptor"); _expression_ in my init off Application.classRay  Envoyé depuis iCloudLe 23 jan 2013 à 09:32, Chuck Hill ch...@global-village.net a écrit :  On 2013-01-23, at 5:49 AM, Raymond NANEON wrote:Hi All,Can I have help on my problem? I stuck on it since 3 weeks.Thanks  Envoyé depuis iCloudLe 07 jan 2013 à 02:20, Raymond NANEON rnan...@me.com a écrit :Hi Stephan,I added the _expression_ ERXJDBCAdaptor.setExpressionClassName("com.resurgences.utils.IVOracleExpression"Is that really the package name and class that you put your code in?  Chuck  , "er.extensions.jdbc.ERXJDBCAdaptor"); in my Application class init method and I used these qualifiers "EOQualifier quaPrenom = EOQualifier.qualifierWithQualifierFormat(PRENOM_KEY+" LIKE %@", new NSArray(prenom));" or "PRENOM.like(prenom)" to get sqlStringForCaseInsensitiveLike method in the SQL _expression_ but I have allways the sqlStringForCaseInsensitiveLike method of EOSQLExpression class in my SQL. Have I forget something?Thanks  Envoyé depuis iCloudLe 21 déc 2012 à 01:07, Raymond NANEON rnan...@me.com a écrit :Hi Stéphan,  Thanks a lot. I am in holydays. I go to try it when I will go back at office.  Have nice dayEnvoyé de mon iPhoneLe 20 déc. 2012 à 16:25, Stéphan Mertz s.me...@improve.fr a écrit :And add this in the Application init to replace the original OracleExpression (you must change the IVOracleExpression class name and package with yours):  ERXJDBCAdaptor.setExpressionClassName("com.resurgences.utils.IVOracleExpression", "er.extensions.jdbc.ERXJDBCAdaptor");  Le 20 déc. 2012 à 15:37, Raymond NANEON rnan...@me.com a écrit :Hi Stéphan,Thanks for your help and I want to know if it returns rawrowSql or EOEntity data?   How can I use this class in my EOQualifier _expression_? An example I meanRayEnvoyé depuis iCloudLe 20 déc. 2012 à 15:31, Stéphan Mertz s.me...@improve.fr a écrit :Hi,I subclass OracleExpression like this :public class IVOracleExpression extends OracleExpression {public IVOracleExpression(EOEntity in_entity) {  super(in_entity);  }public String sqlStringForCaseInsensitiveLike(String in_s, String in_s1) {  String l_str = _NSStringUtilities.concat("CONVERT(upper(", in_s1, "), 'US7ASCII') LIKE CONVERT(upper(", in_s, "), 'US7ASCII')");return l_str;  }  }Le 14 déc. 2012 à 11:20, Raymond NANEON rnan...@me.com a écrit :Hi List,I have a little data fetching problem. In our data base we have names with accent and other do not. So when we do a SQL request in our WHERE CLAUSE we surround the instruction with the function func_enleve_accent which removes accents.i.e   SELECT nom, prenom WHERE upper(fonc_enleve_accents(i.prenom)) like upper(fonc_enleve_accents('severine')) )With this request we have all names with accents or not (sévérine or severine)In WO I try to reproduce the same thing but it does not work properly. When I have a name with accent like 'séverine' it works (we all names) but with 'severine' we have only name without accent.Here my qualifier// CLAUSE WHERE "PRENOM LIKE ..."  private static EOQualifier qualForPrenomLike(String prenom) {  String prenom_a = StringCtrl.chaineSansAccents(prenom, "?");  return PRENOM.like(prenom).or(PRENOM.like(prenom_a));  }How can I modify my qualifier to have the same result like SQL request?Thanks for you help  Envoyé depuis iCloud  ___  Do not post admin requests to the list. They will be ignored.  Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)  Help/Unsubscribe/Update your Subscription:  

ERXDisplayGroup setQualifier behaviour

2013-01-28 Thread Daniele Corti
Hi everyone,
my app is doing something of strange, and I don't understand what it's
wrong with my code.

I've some Entities that I've to display in a table, so I use the
ERXDisplayGroup class.

Here an example:

public ERXDisplayGroupCollaborator displayGroup() {

// IF Null instantiate it
if(_displayGroup == null){
  _displayGroup = new ERXDisplayGroupCollaborator();

  EOArrayDataSource dataSource = new
EOArrayDataSource(EOClassDescription.classDescriptionForEntityName(Collaborator.ENTITY_NAME),
editingContext());

  //Check user is logged in
  if(session().hasUserLogged()){
   //Check if user has chose the company
   if(session().hasChoosedCompany()){

 dataSource.setArray(Collaborator.fetchCollaboratorsForCompany(editingContext(),
session().company()));
   }
 }
  _displayGroup.setDataSource(dataSource);
  _displayGroup.setCurrentBatchIndex(1);

 _displayGroup.setNumberOfObjectsPerBatch(NUMBER_OF_OBJECTS_PER_BATCH);
  _displayGroup.fetch();
}
return _displayGroup;
}

this method is called as binding in the loop component:
wo:loop list = $displayGroup.displayedObjects item = $object

and the object binding is simply a variable of the component.
private Collaborator object;
//With public getter and setter

on each row I've a link that call:

public WOActionResults selectObj() {
  this.parent().takeValueForKey(object, selectedCollaborator);
  return performParentAction(selectCollaborator);
}

Ok, I'm able to filter the list using the setQualifier method of the
DisplayGroup:

public void setQualifier(EOQualifier qualifier){
displayGroup().setQualifier(qualifier);
displayGroup().fetch();
}

public EOQualifier qualifier() {
return null;
}

I call the list component passing the qualifier binding in the parent
componet:

wo:CollaboratorsList qualifier = $qualifier/wo:CollaboratorsList

When I pass a qualifier the page show the filtered list correctly.

The problem is: when I click on the link with action = $selectObj of the,
for example, 2nd object of filtered list, the object variable in the class
does not contain the instance related to the selected row, but the instance
in the second position of the full list of objects in the displayGroup.

Example:

a table with:

---
| link | Mario Rossi | The Address 1 | His City |
---
| link | John Smith | The Address 2 |  City2 |
---
| link | Francis Cabret | The Address| His City |
---

---

I filter the list for name LIKE *John Smit* and get only one row.

---
| link | John Smith | The Address 2 |  City2 |
---

but when I click on the link, in the action selectObj(), the object
variable contains the instance for Mario Rossi.

That's strange for me...

I thought this should have work, but, evidently, is not so!

Which is the correct way to use the ERXDisplayGroup.setQualifier method?

Thanks in advance!
-- 
Daniele Corti
--
I DON'T DoubleClick
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: SSL on all pages

2013-01-28 Thread Ramsey Gurley
Thanks Tim. 

That looks like it should do the trick. As soon as I figure out how to edit our 
conf file again, I'll try to make it work. I hate editing apache conf files :P

Ramsey

On Jan 25, 2013, at 5:20 PM, Tim Worman wrote:

 RedirectMatch 301 /appname https://my.server.com/appname$1
 
 On Jan 25, 2013, at 4:10 PM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 Mod rewrite?
 
 
 On Jan 25, 2013, at 2:04 PM, Ramsey Gurley rgur...@smarthealth.com wrote:
 
 Hi All,
 
 Is there an easy way to make every request use https? I'm using secure 
 cookies and new sessions get generated when hitting a http page because the 
 cookie isn't sent on the non-secure page.
 
 Thanks,
 
 Ramsey
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lists%40thetimmy.com
 
 This email sent to li...@thetimmy.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


ERModern and ERDControllerButton css

2013-01-28 Thread Tim Worman
I've overridden the css in my D2W project to show the ERDControllerButton. And I've set up a page controller delegate. I've also added a rule that this controller shows up for task = 'list' and entity.name = 'MyEntity'.100 : (task = 'list' and entity.name = 'MyEntity') = actions = {"left" = ("inspectAction", "controllerAction"); } [com.webobjects.directtoweb.Assignment]The problem I can't figure out is why additional controller buttons are becoming visible in other places outside the actual list - like in the attached example.TimUCLA GSEIS ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: ERModern and ERDControllerButton css

2013-01-28 Thread Ramsey Gurley
I believe there is a controller button on the page there. You may be able to 
omit it with a rule. 

Because it is there, it's going to get the default controller choices unless 
you override it with rules. 

100:pageConfiguration = 'ListMyEntity' = branchChoices = () [Assignment]
105:pageConfiguration = 'ListMyEntity' and object.isNonNull = 1 = 
branchChoices = (setNewPassword) [Assignment]

You might be able to get away with just one rule

100:pageConfiguration = 'ListMyEntity' and object.isNonNull  1 = 
branchChoices = () [Assignment]

I forget if that works. Or use annotations on your delegate method

@D2WDelegate (
scope = object, availableTasks = list, availablePages = 
ListMyEntity
)
public WOComponent setNewPassword(WOComponent sender) {
//Does stuff
}

Ramsey


On Jan 28, 2013, at 4:13 PM, Tim Worman wrote:

 I've overridden the css in my D2W project to show the ERDControllerButton. 
 And I've set up a page controller delegate. I've also added a rule that this 
 controller shows up for task = 'list' and entity.name = 'MyEntity'.
 
 100 : (task = 'list' and entity.name = 'MyEntity') = actions = {left = 
 (inspectAction, controllerAction); } 
 [com.webobjects.directtoweb.Assignment]
 
 The problem I can't figure out is why additional controller buttons are 
 becoming visible in other places outside the actual list - like in the 
 attached example.
 
 Tim
 UCLA GSEIS
 
 PastedGraphic-1.tiff
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: ERModern and ERDControllerButton css

2013-01-28 Thread Tim Worman
G. Annotations. And so continues my hate/love relationship with D2W. Yes, I 
know it is awesome. :-)

The one-liner rule worked. Thanks Ramsey.

T

On Jan 28, 2013, at 3:29 PM, Ramsey Gurley rgur...@smarthealth.com wrote:

 I believe there is a controller button on the page there. You may be able to 
 omit it with a rule. 
 
 Because it is there, it's going to get the default controller choices unless 
 you override it with rules. 
 
 100:pageConfiguration = 'ListMyEntity' = branchChoices = () [Assignment]
 105:pageConfiguration = 'ListMyEntity' and object.isNonNull = 1 = 
 branchChoices = (setNewPassword) [Assignment]
 
 You might be able to get away with just one rule
 
 100:pageConfiguration = 'ListMyEntity' and object.isNonNull  1 = 
 branchChoices = () [Assignment]
 
 I forget if that works. Or use annotations on your delegate method
 
 @D2WDelegate (
   scope = object, availableTasks = list, availablePages = 
 ListMyEntity
)
public WOComponent setNewPassword(WOComponent sender) {
   //Does stuff
}
 
 Ramsey
 
 
 On Jan 28, 2013, at 4:13 PM, Tim Worman wrote:
 
 I've overridden the css in my D2W project to show the ERDControllerButton. 
 And I've set up a page controller delegate. I've also added a rule that this 
 controller shows up for task = 'list' and entity.name = 'MyEntity'.
 
 100 : (task = 'list' and entity.name = 'MyEntity') = actions = {left = 
 (inspectAction, controllerAction); } 
 [com.webobjects.directtoweb.Assignment]
 
 The problem I can't figure out is why additional controller buttons are 
 becoming visible in other places outside the actual list - like in the 
 attached example.
 
 Tim
 UCLA GSEIS
 
 PastedGraphic-1.tiff
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com